Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 6F8F29F9F13 for ; Sun, 28 Oct 2007 15:15:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 63594-02 for ; Sun, 28 Oct 2007 15:15:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from fischerappelt.de (mail.fischer-appelt.de [217.110.127.211]) by postgresql.org (Postfix) with ESMTP id 7A68A9FB45E for ; Sun, 28 Oct 2007 15:15:30 -0300 (ADT) Received: from [84.191.186.22] (account mty HELO [192.168.5.2]) by fischerappelt.de (CommuniGate Pro SMTP 5.1.7) with ESMTPA id 5503706; Sun, 28 Oct 2007 19:15:28 +0100 User-Agent: Microsoft-Entourage/11.3.3.061214 Date: Sun, 28 Oct 2007 19:15:27 +0100 Subject: Re: shared memory settings on MAC OS X From: Maximilian Tyrtania To: Tom Lane CC: "pgsql-admin@postgresql.org" Message-ID: Thread-Topic: [ADMIN] shared memory settings on MAC OS X Thread-Index: AcgZjoP1wkUyQoWBEdyGqgARJHaMlA== In-Reply-To: <870.1193591652@sss.pgh.pa.us> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200710/281 X-Sequence-Number: 27195 Hi, >> I am trying to increase the amount of shared memory on my Mac OS 10.4 >> machine (i have 5 GB RAM installed), but without too much success. > > Weird, those same exact settings work fine for me. How up-to-date > is your 10.4.x installation? Ah, sorry, it's up to date, 10.4.10. > The relevant part of /etc/rc in mine is > > > if [ -f /etc/sysctl-macosxserver.conf ]; then > awk '{ if (!index($1, "#") && index($1, "=")) print $1 }' < > /etc/sysctl\ > -macosxserver.conf | while read > do > sysctl -w ${REPLY} > done > fi > if [ -f /etc/sysctl.conf ]; then > awk '{ if (!index($1, "#") && index($1, "=")) print $1 }' < > /etc/sysctl\ > .conf | while read > do > sysctl -w ${REPLY} > done > fi > > sysctl -w kern.sysv.shmmax=4194304 kern.sysv.shmmin=1 kern.sysv.shmmni=32 > kern.\ > sysv.shmseg=8 kern.sysv.shmall=1024 Thanks for digging that out. > So one obvious gotcha would be if you have a > /etc/sysctl-macosxserver.conf file that sets 'em differently. Good to know. Unfortunately I don't seem to have that file. Weird. > The gotchas I know about in this area are: > > * The OSX kernel seems to lock down the shmem settings as soon as all > five have been correctly specified via sysctl. This is why the sysctl > done last in /etc/rc doesn't overwrite yours. > * It's fairly draconian about what "correctly specified" is --- notably, > at least some versions insist on shmmax being an exact multiple of the > page size. But the numbers you quoted look OK. I tried other numbers as well. Tiger wouldn't change that shmmax value from 4194304. Not sure what's going on there. Thanks again, - Maximilian Tyrtania | mty@fischerappelt.de fischerAppelt Kommunikation GmbH Tucholskystr.18 | D-10117 Berlin | Germany Tel. ++49-30-726146-728 http://www.fischerappelt.de --