pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <gsmith@gregsmith.com>
To: Simon Waters <simonw@zynet.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: [GENERAL] Drupal and PostgreSQL - performance issues?
Date: Mon, 13 Oct 2008 17:21:27 -0400 (EDT)
Message-ID: <Pine.GSO.4.64.0810131710090.26116@westnet.com> (raw)
In-Reply-To: <200810131549.33863.simonw@zynet.net>
References: <2434A118-CEFA-43A9-BA88-006EC1F80326@hoegh.org>
	<06DDE07E-3CF9-4B3E-8536-7C164BAB8FC6@hoegh.org>
	<dcc563d10810130719v799e0601rdcb7234bdbe61fea@mail.gmail.com>
	<200810131549.33863.simonw@zynet.net>

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@gregsmith.com http://www.gregsmith.com Baltimore, MD



view thread (68+ messages)  latest in thread

Message-ID: <Pine.GSO.4.64.0810131710090.26116@westnet.com>
Permalink:  ../Pine.GSO.4.64.0810131710090.26116@westnet.com/
Also on:    postgresql.org/message-id/Pine.GSO.4.64.0810131710090.26116@westnet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: gsmith@gregsmith.com, simonw@zynet.net
  Subject: Re: [GENERAL] Drupal and PostgreSQL - performance issues?
  In-Reply-To: <Pine.GSO.4.64.0810131710090.26116@westnet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox