On Mon, 13 Oct 2008, Simon Waters wrote:
One of our servers is fairly pressed for memory (some of the time). Is there any way to measure the amount of churn in the shared_buffers, as a way of demonstrating that more is needed (or at this moment more would help)?
If you wander to http://www.westnet.com/~gsmith/content/postgresql/ my "Inside the PostgreSQL Buffer Cache" presentation goes over this topic in extreme detail.
Can I ask Postgres to tell me, or estimate, how much memory this table would occupy if fully cached in memory?
http://wiki.postgresql.org/wiki/Disk_Usage gives an example showing all the biggest tables/indexes in your data, and links to an article giving examples of how to find the size of all sorts of things. One of the queries in my presentation even shows you what % of each table is actually being cached by the dedicated database memory.
You also need to consider the OS buffer cache to get the full picture, which is a bit more complicated; http://www.kennygorman.com/wordpress/?p=250 gives an example there you might be able to use.
-- * Greg Smith gsmith@xxxxxxxxxxxxx http://www.gregsmith.com Baltimore, MD -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance