X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B2A9E475B85 for ; Fri, 18 Apr 2003 20:40:22 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 04AA74758C9 for ; Fri, 18 Apr 2003 20:40:22 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h3J0eNU6018253; Fri, 18 Apr 2003 20:40:23 -0400 (EDT) To: Sean Chittenden Cc: Babak Badaei , pgsql-admin@postgresql.org Subject: Re: max_connections limit In-reply-to: <20030418220942.GK79923@perrin.int.nxad.com> References: <20030317232640.GV23355@perrin.int.nxad.com> <000d01c30559$f9e41b10$6401a8c0@DDP7NX01> <20030418201826.GD79923@perrin.int.nxad.com> <14484.1050702746@sss.pgh.pa.us> <20030418220942.GK79923@perrin.int.nxad.com> Comments: In-reply-to Sean Chittenden message dated "Fri, 18 Apr 2003 15:09:42 -0700" Date: Fri, 18 Apr 2003 20:40:23 -0400 Message-ID: <18252.1050712823@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/268 X-Sequence-Number: 8423 Sean Chittenden writes: > I know they're 8K, but going off of the hint from postgresql.conf, I > changed it to 16K instead of 2 * 8K: > #shared_buffers = 64 # 2*max_connections, min 16, typically 8KB each > Each shared buffer is 8K, need two shared buffers per connection is > how I read that comment. It's not very well phrased then. I just updated the comments to look like this: #shared_buffers = 64 # min 16, at least max_connections*2, 8KB each #max_locks_per_transaction = 64 # min 10, ~260*max_connections bytes each #wal_buffers = 8 # min 4, 8KB each # fsm = free space map #max_fsm_relations = 1000 # min 100, ~50 bytes each #max_fsm_pages = 20000 # min max_fsm_relations*16, 6 bytes each # note: increasing max_connections also costs about 500 bytes each, # in addition to costs from shared_buffers and max_locks_per_transaction. The multipliers for max_connections and max_locks_per_transaction are based on some experiments I just did (alter parameter, note change in size of shared memory block...). They're probably somewhat architecture-dependent, but these should be close enough for the purpose. regards, tom lane