DEV Community

Chiazam Ochiegbu
Chiazam Ochiegbu

Posted on

Postgresql Optimization- shared_buffers

shared_buffers

This parameter determines how much system memory is allocated to Postgres database for data caching.

Advantages of a high buffer

Having higher shared_buffer value allows more data to be saved in caches and then reduce necessary disk reads. It is the simplest way to improve the performance of a Postgres database server.
By default the shared_buffer value is normally set to 32MB which is pretty low for most modern hardware. On a system having more than 1 GB memory, it is good practice to allocate 25% of the total RAM, in case of a system having less than 1 GB RAM, allocate 15% out of total RAM is good.

Let us consider the effect of cache size in the next article.

Top comments (0)