Skip to content

Instantly share code, notes, and snippets.

@smellman
Created September 10, 2020 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smellman/8fd43d7bf385fd70c5458c2718c1a271 to your computer and use it in GitHub Desktop.
Save smellman/8fd43d7bf385fd70c5458c2718c1a271 to your computer and use it in GitHub Desktop.

PostgreSQL tuning via https://pgtune.leopard.in.ua/

# DB Version: 9.6
# OS Type: linux
# DB Type: dw
# Total Memory (RAM): 32 GB
# CPUs num: 8
# Data Storage: ssd

max_connections = 40
shared_buffers = 8GB
effective_cache_size = 24GB
maintenance_work_mem = 2GB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 500
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 26214kB
min_wal_size = 4GB
max_wal_size = 16GB
max_worker_processes = 8
max_parallel_workers_per_gather = 4

command option

command: postgres -c max_connections=40 -c shared_buffers=8GB -c effective_cache_size=24GB -c maintenance_work_mem=2GB -c checkpoint_completion_target=0.9 -c wal_buffers=16MB -c default_statistics_target=500 -c random_page_cost=1.1 -c effective_io_concurrency=200 -c work_mem=26214kB -c min_wal_size=4GB -c max_wal_size=16GB -c max_worker_processes=8 -c max_parallel_workers_per_gather=4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment