Note: This article assumes you have the right specs for either all-in-one or for a separate database server for the expected number of managed devices.
Step 1: Use the PGTune Calculator
- Open the PGTune calculator
- Fill in all parameters based on your machine settings you've configured in.
- DB Version : Select your PostgreSQL version
- OS Type : Linux
- DB Type : Web Application
- Total Memory Size : Insert memory size based on the JetPatch Database server you chose
- Number CPU : Insert memory size based on the JetPatch Database server you chose
- Storage : HDD Storage
- Click Generate to get the recommended configuration.
- Log into the database server
Step 2: Apply Recommendations from PGTune
- Log into the Database Server.
-
Locate the
postgresql.conf
File:-
Default Path:
/var/lib/pgsql/[version#]/data/postgresql.conf
- Custom Mounts: If the file isn't in the default path, use the following command:
-
Default Path:
-
Update the Configuration File:
- Open the
postgresql.conf
file in a text editor likenano
orvi
: - Append the recommended configuration from PGTune to the bottom of the file and custom adjust
max_connections
Based on Environment Size:- Modify the
max_connections
value as per the table below:
- Modify the
- Open the
Environment Size | PostgreSQL: max_connections |
Superuser Reserve (will set in step 4) |
---|---|---|
Small (up to 4,000 devices) | 200 | 5 |
Medium (4,000-8,000 devices) | 250 | 10 |
Large (8,000-12,000 devices) | 300 | 15 |
X-Large (12,000-20,000 devices) | 350 | 25 |
Step 4: Restart Services and Verify
1. Restart PostgreSQL
- Restart the database service to apply the changes. Replace
<version#>
with your PostgreSQL version:
2. Verify max_connections
-
Log into PostgreSQL:
(Modify the username or database name if necessary. Use the database password found in the
intigua.properties
file.) -
Once inside PostgreSQL, run the following query to confirm the
max_connections
value:
3. Update datasource.rw.maximum-pool-size
-
Edit the
intigua.properties
file located at: -
Set the
datasource.rw.maximum-pool-size
value based on your environment size as per the table below:
#example
datasource.rw.maximum-pool-size=195
Environment Size | datasource.rw.maximum-pool-size |
---|---|
Small (up to 4,000 devices) | 195 |
Medium (4,000-8,000 devices) | 240 |
Large (8,000-12,000 devices) | 285 |
X-Large (12,000-20,000 devices) | 325 |
Comments
0 comments
Please sign in to leave a comment.