X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C986A475E4D for ; Fri, 18 Apr 2003 17:52:32 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 21297475458 for ; Fri, 18 Apr 2003 17:52:32 -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 h3ILqQU6014485; Fri, 18 Apr 2003 17:52:26 -0400 (EDT) To: Sean Chittenden Cc: Babak Badaei , pgsql-admin@postgresql.org Subject: Re: max_connections limit In-reply-to: <20030418201826.GD79923@perrin.int.nxad.com> References: <20030317232640.GV23355@perrin.int.nxad.com> <000d01c30559$f9e41b10$6401a8c0@DDP7NX01> <20030418201826.GD79923@perrin.int.nxad.com> Comments: In-reply-to Sean Chittenden message dated "Fri, 18 Apr 2003 13:18:26 -0700" Date: Fri, 18 Apr 2003 17:52:26 -0400 Message-ID: <14484.1050702746@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.3 required=5.0 tests=BAYES_00,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/266 X-Sequence-Number: 8421 Sean Chittenden writes: > I wonder how correct the following is: > SHMMAXPGS = ((max_connections * shared_buffers * 16K) + (wal_buffers * > 8K) + (max_fsm_relations * 40B) + (max_fsm_pages * 6B)) / > page_size Not very. shared_buffers are 8K apiece, not 16K, and you don't multiply them by max_connections. There *is* a multiplier for max_connections but I'm not sure what it is --- less than 1K, probably. Also you should allow for the lock table, which will be some small multiplier times max_connections * max_locks_per_transaction. > SEMMNI = 2 * max_connections (????) > SEMMSL = SEMMNI > SHMSEG = 10 # (???? this is a per SysV process setting) > SEMMNS = 1.5 * max_connections (????) > SEMMNU = 0.75 * max_connections (????) > SEMUME = 10 (????) Dunno where you got these semaphore numbers from, either. regards, tom lane