Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id CCB5B64FCB2 for ; Tue, 16 Dec 2008 23:31:25 -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 75109-07 for ; Tue, 16 Dec 2008 23:31:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 1867F64FD09 for ; Tue, 16 Dec 2008 23:31:22 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mBH3VFaP020539; Tue, 16 Dec 2008 22:31:15 -0500 (EST) To: Bruce Momjian cc: Alvaro Herrera , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 Subject: Re: [ADMIN] shared_buffers and shmmax In-reply-to: <200812170133.mBH1Xac23918@momjian.us> References: <200812170133.mBH1Xac23918@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Tue, 16 Dec 2008 20:33:36 -0500" Date: Tue, 16 Dec 2008 22:31:15 -0500 Message-ID: <20538.1229484675@sss.pgh.pa.us> From: Tom Lane 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/20 X-Sequence-Number: 5027 Bruce Momjian writes: > Tom Lane wrote: >> If you're going to give a formula, why not just give a formula, eg > You mean like this: > http://momjian.us/tmp/pgsql/kernel-resources.html Yeah, more or less. A couple thoughts now that I see it worked out: * Combining the entries for max_connections and autovacuum_max_workers is probably just making it look more complicated than it needs to. How about two rows that just happen to have similar formulas, viz max_connections (1800 + 270 * max_locks_per_transaction) * max_connections autovacuum_max_workers (1800 + 270 * max_locks_per_transaction) * autovacuum_max_workers * The right-hand column header should be something like "Approximate shared memory bytes..." to avoid the impression that these formulas are meant to be exact. * If we do it like this then the left-hand column is really redundant, not to say wrong because the right-hand formulas depend on more than the single variable mentioned. How about something like Table 17-2 PostgreSQL shared memory usage Purpose Approximate number of bytes required (as of 8.3) Per-connection state (1800 + 270 * max_locks_per_transaction) * max_connections Autovacuum worker state (1800 + 270 * max_locks_per_transaction) * autovacuum_max_workers Prepared transaction state ... Shared disk buffers ... WAL buffers ... Fixed space requirements 770kB regards, tom lane