Using EDB Postgres Tuner
Suggest editsYou can use EDB Postgres Tuner in two ways: to automatically apply all tuning recommendations or to manually apply selected tuning recommendations.
Automatic tuning
To automatically apply all tuning recommendations, set the edb_pg_tuner.autotune
parameter to true
. Restart Postgres to apply the change. EDB Postgres Tuner then begins applying tuning recommendations.
Note
Automatic tuning isn't currently supported for BigAnimal.
Manual tuning
To manually apply selected tuning recommendations, make sure the edb_pg_tuner.autotune
parameter is set to false
, which is the default. Then, use the edb_pg_tuner_recommendations
function to inspect the tuning recommendations from the output.
You can set the format of the tuning recommendations to either conf
or sql
. For example:
Where:
conf
provides an output likeparameter = value
, which you can copy and paste into your configuration file. This is the default.sql
provides an output likeALTER SYSTEM SET parameter = value
, which you can execute in your preferred Postgres client tool.
Example
This example shows how to manually apply tuning recommendations to a postgresql.conf
file.
Here's an example of settings in a postgresql.conf
file:
The following command provides tuning recommendations for the postgresql.conf
file in the default conf
format:
The following command provides an output in the sql
format:
You can copy and paste the tuning recommendations in the conf
format into the postgresql.conf
file:
You can execute the tuning recommendations in the sql
format in your preferred Postgres client tool:
Recommended GUCs
EDB Postgres Tuner can recommend the following GUCs. The static
category provides fixed recommendation settings. The dynamic
category uses specific algorithms to suggest a better setting according to your workload or hardware resources.
Note
If edb_pg_tuner.autotune
is enabled on EDB Postgres Advanced Server 15 or later, any GUC that requires a restart is set when the service starts. Hence, you don't need to restart the service to apply the recommendations. On earlier EDB Postgres Advanced Server versions (14 and earlier), you do need to restart the service.
GUC | Category | Recommendation | Version |
---|---|---|---|
autovacuum | static | on | |
checkpoint_completion_target | static | 0.9 | |
effective_cache_size | dynamic | based on resources | |
enable_async_append | static | on | |
enable_bitmapscan | static | on | |
enable_gathermerge | static | on | |
enable_group_by_reordering | static | on | |
enable_hashagg | static | on | |
enable_hashjoin | static | on | |
enable_incremental_sort | static | on | 13+ |
enable_indexonlyscan | static | on | |
enable_indexscan | static | on | |
enable_material | static | on | |
enable_memoize | static | on | 14+ |
enable_mergejoin | static | on | |
enable_nestloop | static | on | |
enable_parallel_append | static | on | 11+ |
enable_parallel_hash | static | on | 11+ |
enable_partition_pruning | static | on | 11+ |
enable_partitionwise_aggregate | static | on | |
enable_partitionwise_join | static | on | |
enable_seqscan | static | on | |
enable_sort | static | on | |
enable_tidscan | static | on | |
fsync | static | on | |
full_page_writes | static | on | |
log_checkpoints | static | on | |
max_wal_size | dynamic | based on workload | |
maintenance_work_mem | dynamic | based on resources | |
parallel_leader_participation | static | on | |
seq_page_cost | static | 1.0 | |
shared_buffers | dynamic | based on resources | |
track_activities | static | on | |
track_counts | static | on | |
zero_damaged_pages | static | on |
- On this page
- Automatic tuning
- Manual tuning
- Recommended GUCs
Could this page be better? Report a problem or suggest an addition!