Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id ADD22650AD3 for ; Sat, 12 Jul 2008 11:30:52 -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 48617-07 for ; Sat, 12 Jul 2008 11:30:41 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sn.sai.msu.ru (sn.sai.msu.ru [195.208.220.215]) by postgresql.org (Postfix) with ESMTP id B5A49650AD2 for ; Sat, 12 Jul 2008 11:30:46 -0300 (ADT) Received: from sn.sai.msu.ru (localhost [127.0.0.1]) by sn.sai.msu.ru (8.14.1/8.12.8) with ESMTP id m6CEUid4016282; Sat, 12 Jul 2008 18:30:44 +0400 Received: from localhost (megera@localhost) by sn.sai.msu.ru (8.14.1/8.12.8/Submit) with ESMTP id m6CEUiuw016279; Sat, 12 Jul 2008 18:30:44 +0400 X-Authentication-Warning: sn.sai.msu.ru: megera owned process doing -bs Date: Sat, 12 Jul 2008 18:30:44 +0400 (MSD) From: Oleg Bartunov X-X-Sender: megera@sn.sai.msu.ru To: Jessica Richard cc: pgsql-performance@postgresql.org Subject: Re: how to estimate shared_buffers... In-Reply-To: <93721.43246.qm@web56401.mail.re3.yahoo.com> Message-ID: References: <93721.43246.qm@web56401.mail.re3.yahoo.com> 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.133 tagged_above=0 required=5 tests=AWL=-0.992, DNS_FROM_RFC_BOGUSMX=2.125, RCVD_IN_DNSWL_LOW=-1 X-Spam-Level: X-Archive-Number: 200807/118 X-Sequence-Number: 30718 On Sat, 12 Jul 2008, Jessica Richard wrote: > On a running production machine, we have 900M configured on a 16G-memory Linux host. The db size for all dbs combined is about 50G. There are many transactions going on all the times (deletes, inserts, updates). We do not have a testing environment that has the same setup and the same amount of workload. I want to evaluate on the production host if this 900M is enough. If not, we still have room to go up a little bit to speed up all Postgres activities. I don't know enough about the SA side. I just would imagine, if something like "top" command or other tools can measure how much total memory Postgres is actually using (against the configured 900M shared buffers), and if Postgres is using almost 900M all the time, I would take this as an indication that the shared_buffers can go up for another 100M... > > What is the best way to tell how much memory Postgres (all Postgres related things) is actually using? there is a contrib/pg_buffers which can tell you about usage of shared memory. Also, you can estimate how much memory of OS cache occupied by postgres files (tables, indexes). Looks on http://www.kennygorman.com/wordpress/?p=246 for some details. I wrote a perl script, which simplifies estimation of OS buffers, but it's not yet ready for public. Regards, Oleg _____________________________________________________________ Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru), Sternberg Astronomical Institute, Moscow University, Russia Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(495)939-16-83, +007(495)939-23-83