Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D4F6264FCE9 for ; Thu, 18 Dec 2008 13:07:28 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 72073-06 for ; Thu, 18 Dec 2008 13:07:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id EB75964FCE3 for ; Thu, 18 Dec 2008 13:07:23 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id mBIH7KA01987; Thu, 18 Dec 2008 12:07:20 -0500 (EST) From: Bruce Momjian Message-Id: <200812181707.mBIH7KA01987@momjian.us> Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <20081217152038.GB4453@alvh.no-ip.org> To: Alvaro Herrera Date: Thu, 18 Dec 2008 12:07:20 -0500 (EST) CC: Tom Lane , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1229620039-5875-2_" Content-Transfer-Encoding: 7bit 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: 200812/26 X-Sequence-Number: 5033 --ELM1229620039-5875-2_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Alvaro Herrera wrote: > Bruce Momjian wrote: > > > I decided I didn't like what I did either; updated version with new > > headings and shorter descriptions: > > > > http://momjian.us/tmp/pgsql/kernel-resources.html > > This version seems good to me, except please put back the B to the end > of "770 k". Patch applied with "B" re-added, though I would like to mention again that it is inconsistent because we don't mention bytes in any other row in that column. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1229620039-5875-2_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" Index: runtime.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v retrieving revision 1.423 retrieving revision 1.424 diff -c -c -r1.423 -r1.424 *** runtime.sgml 16 Dec 2008 19:30:43 -0000 1.423 --- runtime.sgml 18 Dec 2008 17:03:09 -0000 1.424 *************** *** 1,4 **** ! Operating System Environment --- 1,4 ---- ! Operating System Environment *************** *** 1080,1120 **** ! Configuration parameters affecting ! <productname>PostgreSQL</productname>'s shared memory usage</> <tgroup cols="2"> <thead> <row> ! <entry>Name</> ! <entry>Approximate multiplier (bytes per increment) as of 8.3</> </row> </thead> <tbody> <row> ! <entry><xref linkend="guc-max-connections"></> ! <entry>1800 + 270 * <xref linkend="guc-max-locks-per-transaction"></entry> </row> <row> ! <entry><xref linkend="guc-autovacuum-max-workers"></> ! <entry>1800 + 270 * <xref linkend="guc-max-locks-per-transaction"></entry> </row> <row> ! <entry><xref linkend="guc-max-prepared-transactions"></> ! <entry>770 + 270 * <xref linkend="guc-max-locks-per-transaction"></entry> </row> <row> ! <entry><xref linkend="guc-shared-buffers"></> ! <entry>8400 (assuming 8 kB <symbol>BLCKSZ</>)</entry> </row> <row> ! <entry><xref linkend="guc-wal-buffers"></> ! <entry>8200 (assuming 8 kB <symbol>XLOG_BLCKSZ</>)</entry> </row> <row> --- 1080,1124 ---- <table id="shared-memory-parameters"> ! <title><productname>PostgreSQL</productname> shared memory usage</> <tgroup cols="2"> <thead> <row> ! <entry>Usage</> ! <entry>Approximate shared memory bytes required (as of 8.3)</> </row> </thead> <tbody> <row> ! <entry>Connections</> ! <entry>(1800 + 270 * <xref ! linkend="guc-max-locks-per-transaction">) * <xref ! linkend="guc-max-connections"></entry> </row> <row> ! <entry>Autovacuum workers</> ! <entry>(1800 + 270 * <xref ! linkend="guc-max-locks-per-transaction">) * <xref ! linkend="guc-autovacuum-max-workers"></entry> </row> <row> ! <entry>Prepared transactions</> ! <entry>(770 + 270 * <xref ! linkend="guc-max-locks-per-transaction">) * <xref linkend="guc-max-prepared-transactions"></entry> </row> <row> ! <entry>Shared disk buffers</> ! <entry>(<xref linkend="guc-block-size"> + 208) * <xref linkend="guc-shared-buffers"></entry> </row> <row> ! <entry>WAL buffers</> ! <entry>(<xref linkend="guc-wal-block-size"> + 8) * <xref linkend="guc-wal-buffers"></entry> </row> <row> *************** *** 1125,1142 **** </tgroup> </table> - <note> - <para> - The multipliers for <varname>shared_buffers</> and - <varname>wal_buffers</> should be the number of buffers, not the - amount in bytes. To find out the number of shared or wal buffers, divide - the amount in bytes by <xref linkend="guc-block-size"> and - <xref linkend="guc-wal-block-size">, respectively. - </para> - </note> </sect2> - <sect2> <title>Resource Limits --- 1129,1136 ---- --ELM1229620039-5875-2_--