Optimize your database configuration based on the PGTune calculator
- Open the link and fill in all parameters based on your machine settings you've configured in.
- DB Version : Insert version based on your DB.
- OS Type : Linux
- DB Type : Web Application
- Total Memory Size : Insert memory size based on the JetPatch Machine you chose.
- Number CPU : Insert memory size based on the JetPatch Machine you chose.
- Storage : HDD Storage
- Click on 'Generate'
- Modify the 'Postgres.conf' configuration file based on the recommendations given in the PGTune link. Paste the configuration at the bottom of the file. The configuration file path is /var/lib/pgsql/[version#]/data/postgresql.conf
- Restart DB service - postgresql (you need to add version number manually)
systemctl restart postgresql-<version number>.service
Note: max_connections will always be suggested to be 200, so after adding to postgres.conf, then go to intigua.properties (/usr/share/tomcat/default/conf/intigua.properties) and set the following value to 195 (which allows room for some super user connections)
datasource.rw.maximum-pool-size=195
After making this change, please restart Tomcat for it to take effect.
Please note:
- The settings above refer to a standalone DB machine. If you have chosen the "All-In-One" option. please fill in the following
- Micro: Memory 8, CPU 4
- Small: Memory 16, CPU 8
- Medium: Memory 32, CPU 16
- If the configuration is not located in the default location run the following to locate it:
sudo updatedb
locate postgresql.conf
Comments
0 comments
Please sign in to leave a comment.