Arezoo
Arezoo

Reputation: 472

Tune PostgreSQL by changing config parameters

I have postgresql 9.6 which is runnig on ubuntu server 16.04 with 122gb RAM, 320gb SSD, 18 vCPU on AWS. I want to know what parameters do I need to change in postgresql.config file according to these resource in order to get high performance? How to force postgresql to load the data in memory as much as possible?

Upvotes: 0

Views: 1285

Answers (1)

Valery Viktorovsky
Valery Viktorovsky

Reputation: 6726

For quick start you can use pgtune util or web alternative http://pgtune.leopard.in.ua. Let's assume you write web app:

# WARNING
# this tool not being optimal 
# for very high memory systems

max_connections = 200
shared_buffers = 31232MB
effective_cache_size = 93696MB
work_mem = 159907kB
maintenance_work_mem = 2GB
min_wal_size = 1GB
max_wal_size = 2GB
checkpoint_completion_target = 0.7
wal_buffers = 16MB
default_statistics_target = 100

Upvotes: 1

Related Questions