Group: pgsql.admin


Subject: shared memory settings on MAC OS X
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 10/28/2007 1:14:12 PM
Maximilian Tyrtania <mty@fischerappelt.de> writes: > 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? 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 So one obvious gotcha would be if you have a /etc/sysctl-macosxserver.conf file that sets 'em differently. 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. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Subject: shared memory settings on MAC OS X
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 10/28/2007 3:14:53 PM
Maximilian Tyrtania <mty@fischerappelt.de> writes: > I tried other numbers as well. Tiger wouldn't change that shmmax value from > 4194304. Not sure what's going on there. Weird. As a debugging measure, see what happens if you change that last sysctl line in /etc/rc. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings

Subject: shared memory settings on MAC OS X
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 10/29/2007 9:40:10 AM
Maximilian Tyrtania <mty@fischerappelt.de> writes: > Tom, I suspect you have Mac OS X Server installed, right? That's probably > why your /etc/sysctl.conf file mentions that /etc/sysctl-macosxserver.conf > file, while mine doesn't. Uh, no, I'm looking at my laptop. Curious that yours has no reference to the other file. > And frankly, to me it looks as if it means "if there is a /etc/sysctl.conf > file, then read it and accept its settings. Then overwrite the sysctl > settings with the default values, no matter what." You're forgetting the point I made that the first complete set of shmem settings wins. If we could change the settings on the fly after that, all this would be a whole lot easier, but the OSX kernel locks them down somehow. BTW, I dunno if you read awk at all, but that awk command effectively says "print lines that contain = and do not contain #". You didn't try appending comments to the setting lines in your file did you? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster