Starting size guidelines

The lore for sizing shared_buffers generally specifies a suggestion in terms of a percentage of system RAM. Some advocate only 10-15%. The thorough academic exploration in the paper Tuning Database Configuration Parameters with iTuned at http://www.cs.duke.edu/~shivnath/papers/ituned.pdf found 40% optimal on a 1 GB system being tested on a wide range of queries. And occasionally, reports appear where 60% or more of total RAM turns out to be optimal.

Generally, if you have a server where OS overhead is small relative to total memory (any modern system with 1 GB or more of RAM), giving the database 25% of total RAM is a reasonable starting setting for shared_buffers in the middle of the effective range. It may not be ...

Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.