Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C79B964FD22 for ; Mon, 13 Oct 2008 18:21:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 57066-06 for ; Mon, 13 Oct 2008 18:21:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id 6BD8C64FD2D for ; Mon, 13 Oct 2008 18:21:29 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id m9DLLRRY015629; Mon, 13 Oct 2008 17:21:27 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id m9DLLRls015626; Mon, 13 Oct 2008 17:21:27 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Mon, 13 Oct 2008 17:21:27 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: Simon Waters cc: pgsql-performance@postgresql.org Subject: Re: [GENERAL] Drupal and PostgreSQL - performance issues? In-Reply-To: <200810131549.33863.simonw@zynet.net> Message-ID: References: <2434A118-CEFA-43A9-BA88-006EC1F80326@hoegh.org> <06DDE07E-3CF9-4B3E-8536-7C164BAB8FC6@hoegh.org> <200810131549.33863.simonw@zynet.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200810/70 X-Sequence-Number: 31651 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