Last Updated: February 25, 2016
·
549
· jawnb

Postgres Tuning Tips

The out of the box defaults for postgres leave a LOT of performance left on the table. Here's an article describing some easy tuning that can be done.

http://www.revsys.com/writings/postgresql-performance.html

The short summary is that you should change shared_buffers in postgresql.conf to be 25% of your available RAM.

Doing this may also require you to increase your shared memory, in linux you can do this by running:

echo (shared_buffers * 8192) > /proc/sys/kernel/shmmax

Add this to your rc.local to persist the change.

These numbers should be treated as guidelines and not gospel. YMMV