Shared memory and Mac OS X

Started by Wesabout 21 years ago4 messagesgeneral
Jump to latest
#1Wes
wespvp@syntegra.com

The problem with not being able to set shmmax and shmall in a startup script
in Mac OS X is not that you are setting them too late in the boot process.
It is that you can set them only once. In fact, you can set them from a
terminal window after booting and logging in - as long as they haven't
already been set.

If you comment out the sysctl's for shmall and shmmax in /etc/rc, reboot,
then log in and bring up a terminal window, you will see that they are set
to -1. You can then set them to whatever you want (as root of course).
However, if you try to set the value again, the first value remains set.

Unfortunately, this doesn't help much, as Apple's default /etc/rc sets
values. If you comment out these, you can set the values in a startup
script, but you're still screwed when the next update re-enables the
settings in /etc/rc, which are set before SystemStarter is called. I guess
the best you can do is have a startup script that notifies you if the values
are wrong.

Wes

#2Jonel Rienton
jonel@road14.com
In reply to: Wes (#1)
Re: Shared memory and Mac OS X

have you tried using /etc/sysctl.conf and saving the shmax value there?

On Thu, 20 Jan 2005 21:51:02 -0600, Wes wrote

The problem with not being able to set shmmax and shmall in a
startup script in Mac OS X is not that you are setting them too late
in the boot process. It is that you can set them only once. In fact,
you can set them from a terminal window after booting and logging
in - as long as they haven't already been set.

If you comment out the sysctl's for shmall and shmmax in /etc/rc,
reboot, then log in and bring up a terminal window, you will see
that they are set to -1. You can then set them to whatever you want
(as root of course). However, if you try to set the value again, the
first value remains set.

Unfortunately, this doesn't help much, as Apple's default /etc/rc
sets values. If you comment out these, you can set the values in a startup
script, but you're still screwed when the next update re-enables the
settings in /etc/rc, which are set before SystemStarter is called.
I guess the best you can do is have a startup script that notifies
you if the values are wrong.

Wes

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

--
Jonel Rienton
http://jonel.road14.com

#3Wes
wespvp@syntegra.com
In reply to: Jonel Rienton (#2)
Re: Shared memory and Mac OS X

On 1/20/05 10:27 PM, "Jonel Rienton" <jonel@road14.com> wrote:

have you tried using /etc/sysctl.conf and saving the shmax value there?

Unfortunately, the -p parameter does not appear to be valid, nor does
'strings -a' show 'conf' in the binary (unlike the RedHat sysctl).

Wes

#4Wes
wespvp@syntegra.com
In reply to: Wes (#3)
Re: Shared memory and Mac OS X

On 1/21/05 1:50 AM, "Jonel Rienton" <jonel@road14.com> wrote:

I have found this at the docs of Postgres:

Yes, I knew about that. My email was in regards to an earlier discussion on
why you had to update /etc/rc as of 10.3 (probably should have dug that one
up and replied to it). The previous statement had been that they had to be
in /etc/rc because startup scripts were now too late in the boot process. I
was just clarifying the reason.

Wes