X-Original-To: pgsql-admin@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 5B52A9256CB for ; Thu, 22 May 2003 10:53:59 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 52189-02 for ; Thu, 22 May 2003 10:53:53 -0400 (EDT) Received: from perrin.int.nxad.com (internal.ext.nxad.com [69.1.70.251]) by developer.postgresql.org (Postfix) with ESMTP id 6B13E925B83 for ; Thu, 22 May 2003 05:53:08 -0400 (EDT) Received: by perrin.int.nxad.com (Postfix, from userid 1001) id 881A721062; Thu, 22 May 2003 02:53:07 -0700 (PDT) Date: Thu, 22 May 2003 02:53:07 -0700 From: Sean Chittenden To: Yusuf Cc: pgsql-admin@postgresql.org Subject: Re: Increasing Shared Memory size, in order to increase shared buffer size Message-ID: <20030522095307.GH71079@perrin.int.nxad.com> References: <3ECA2B8F.6080908@netscape.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3ECA2B8F.6080908@netscape.net> X-PGP-Key: finger seanc@FreeBSD.org X-PGP-Fingerprint: 3849 3760 1AFE 7B17 11A0 83A6 DD99 E31F BC84 B341 X-Web-Homepage: http://sean.chittenden.org/ User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/300 X-Sequence-Number: 8862 > I want to increase the buffer size on my postgresql installation, in > order to improve the performance. > > Now, when I execute top, on my FreeBSD system, the memory part shows: > > Mem: 26M Active, 1062M Inact, 146M Wired, 199M Buf, 776M Free > Swap: 4080M Total, 8K Used, 4080M Free > > The size of the database in PGDATA/base is 415 MB. I want to increase > the shared buffer size so that I could avoid swap pagein activities. > > What should I increase the shared memory size of FreeBSD to be? Have you recompiled your kernel with the values suggested in /usr/local/pgsql/post-install-notes ? > What would be a good value for the shared buffer size? See the archives, there's plenty of discussion on the topic. Be sure that you're not trying to prevent paging of inactive pages to disk: that isn't harmful and helps performance. FreeBSD is relatively aggressive about paging inactive pages and isn't harmful as it frees up additional ram for other processes/PostgreSQL. -sc -- Sean Chittenden