Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D876464FE35 for ; Tue, 16 Dec 2008 21:33:41 -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 53946-03 for ; Tue, 16 Dec 2008 21:33:39 -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 EE1F464FD14 for ; Tue, 16 Dec 2008 21:33:38 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id mBH1Xac23918; Tue, 16 Dec 2008 20:33:36 -0500 (EST) From: Bruce Momjian Message-Id: <200812170133.mBH1Xac23918@momjian.us> Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <17528.1229470697@sss.pgh.pa.us> To: Tom Lane Date: Tue, 16 Dec 2008 20:33:36 -0500 (EST) CC: Alvaro Herrera , 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="ELM1229477616-5875-1_" 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/19 X-Sequence-Number: 5026 --ELM1229477616-5875-1_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Tom Lane wrote: > Bruce Momjian writes: > > OK, updated patch. I added item descriptions and removed Alvaro's > > paragraph; I worked with Alvaro on this patch. > > This still seems pretty misleading, as for example > > > > > > > > > ! 1800 + 270 * > ! linkend="guc-max-locks-per-transaction"> bytes per connection > > > > sounds like it might mean bytes per *active* connection, when of course > the correct way to figure it is by multiplying by max_connections. > If you're going to give a formula, why not just give a formula, eg > > (1800 + 270 * max_locks_per_transaction) * (max_connections + autovacuum_max_workers) > > regards, tom lane You mean like this: http://momjian.us/tmp/pgsql/kernel-resources.html -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1229477616-5875-1_ Content-Transfer-Encoding: 7bit Content-Type: text/plain Content-Disposition: inline; filename="/pgpatches/shared_mem_table" Index: doc/src/sgml/runtime.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v retrieving revision 1.423 diff -c -c -r1.423 runtime.sgml *** doc/src/sgml/runtime.sgml 16 Dec 2008 19:30:43 -0000 1.423 --- doc/src/sgml/runtime.sgml 17 Dec 2008 01:30:21 -0000 *************** *** 1087,1141 **** Name ! Approximate multiplier (bytes per increment) as of 8.3 ! ! 1800 + 270 * ! ! ! ! ! 1800 + 270 * ! 770 + 270 * ! 8400 (assuming 8 kB BLCKSZ) ! 8200 (assuming 8 kB XLOG_BLCKSZ) Fixed space requirements ! 770 kB ! ! ! The multipliers for shared_buffers and ! 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 and ! , respectively. ! ! ! ! Resource Limits --- 1087,1132 ---- Name ! Shared memory bytes required, as of 8.3 ! , ! (1800 + 270 * ) * ( + ) ! (770 + 270 * ) * ! ( + 208) * ! ( + 8) * Fixed space requirements ! 770k bytes ! ! These shared memory allocations are reserved at database server ! start and remain static. ! Resource Limits --ELM1229477616-5875-1_--