Skip to content

Postgres tuning

thedudeabides requested to merge postgres-tuning into master

According to https://pgtune.leopard.in.ua/ and our version of postgres, we can do some tuning.

Postgres:

# DB Version: 9.2
# OS Type: linux
# DB Type: web
# Total Memory (RAM): 4 GB
# CPUs num: 4
# Connections num: 100
# Data Storage: hdd

max_connections = 100
shared_buffers = 1GB
effective_cache_size = 3GB
maintenance_work_mem = 256MB
checkpoint_completion_target = 0.7
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 4
effective_io_concurrency = 2
work_mem = 10485kB
checkpoint_segments = 32

Kernel settings:

kernel.shmmax=2147483648
kernel.shmall=524288

Merge request reports