Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 599BD9F9FE2 for ; Sat, 18 Nov 2006 12:17:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 69848-03 for ; Sat, 18 Nov 2006 16:17:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 8EA2D9F9424 for ; Sat, 18 Nov 2006 12:17:02 -0400 (AST) Received: (qmail 2234 invoked from network); 18 Nov 2006 16:17:01 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.14?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 18 Nov 2006 16:17:01 -0000 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <82E59D2F-0946-4405-8F11-4CF5184A9399@fastcrypt.com> Cc: pgsql-performance@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: shared_buffers > 284263 on OS X Date: Sat, 18 Nov 2006 11:17:01 -0500 To: Brian Wipf X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/147 X-Sequence-Number: 21917 Brian, On 16-Nov-06, at 7:03 PM, Brian Wipf wrote: > I'm trying to optimize a PostgreSQL 8.1.5 database running on an > Apple G5 Xserve (dual G5 2.3 GHz w/ 8GB of RAM), running Mac OS X > 10.4.8 Server. > > The queries on the database are mostly reads, and I know a larger > shared memory allocation will help performance (also by comparing > it to the performance of the same database running on a SUSE Linux > box, which has a higher shared_buffers setting). > > When I set shared_buffers above 284263 (~ 2.17 GB) in the > postgresql.conf file, I get the standard error message when trying > to start the db: > > FATAL: could not create shared memory segment: Cannot allocate memory > DETAIL: Failed system call was shmget(key=5432001, > size=3289776128, 03600). > > shmmax and shmall are set to 4GB, as can be seen by the output from > sysctl: > hw.physmem = 2147483648 > hw.usermem = 1885794304 > hw.memsize = 8589934592 > kern.sysv.shmmax: 4294967296 > kern.sysv.shmmin: 1 > kern.sysv.shmmni: 32 > kern.sysv.shmseg: 8 > kern.sysv.shmall: 1048576 > > Has anyone else noticed this limitation on OS X? Any ideas on how I > might get shared_buffers higher than 284263? My guess is something else has taken shared memory ahead of you. OS X seems to be somewhat strange in how it deals with shared memory. Try allocating more to shmmax ? Dave > > Brian Wipf > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings >