Skip site navigation (1) Skip section navigation (2)

Re: shared_buffers in 8.3 w/ lots of RAM on dedicated PGmachine

From: Peter Schuller <peter(dot)schuller(at)infidyne(dot)com>
To: Kenneth Marshall <ktm(at)rice(dot)edu>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: shared_buffers in 8.3 w/ lots of RAM on dedicated PGmachine
Date: 2008-02-15 13:58:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
> PostgreSQL still depends on the OS for file access and caching. I
> think that the current recommendation is to have up to 25% of your
> RAM in the shared buffer cache.

This feels strange. Given a reasonable amount of RAM (let's say 8 GB
in this case), I cannot imagine why 75% of that would be efficiently
used for anything but the buffer cache (ignoring work_mem, stacks,
etc). Obviously the OS will need memory to do it's usual stuff
(buffering to do efficient I/O, and so on). But the need for that
should not increase with the amount of RAM in the machine, all else
being equal.

What type of file I/O, other than reading pages of PostgreSQL data
which are eligable for the PostgreSQL buffer cache, does PostgreSQL do
that would take advantage of the operating system caching so much

(Assuming the database is not extreme to the point of file system meta
data being huge.)

If the 25% rule still holds true, even under circumstances where the
assumption is that the PostgreSQL buffer cache is more efficient (in
terms of hit ratio) at caching PostgreSQL database data pages, it
would be useful to understand why in order to understand the
trade-offs involved and make appropriate decisions.

Or is it a matter of PostgreSQL doing non-direct I/O, such that
anything cached in shared_buffers will also be cached by the OS?

/ Peter Schuller

PGP userID: 0xE9758B7D or 'Peter Schuller <peter(dot)schuller(at)infidyne(dot)com>'
Key retrieval: Send an E-Mail to getpgpkey(at)scode(dot)org
E-Mail: peter(dot)schuller(at)infidyne(dot)com Web:

In response to


pgsql-performance by date

Next:From: Linux GuruDate: 2008-02-15 14:14:48
Subject: Re: Creating and updating table using function parameter reference
Previous:From: Kenneth MarshallDate: 2008-02-15 13:37:34
Subject: Re: shared_buffers in 8.3 w/ lots of RAM on dedicated PGmachine

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group