Thread: OS X Kernel settings

OS X Kernel settings

From
Jamie Deppeler
Date:
Is it possible to set shared memory settings on the fly in OS X like you
can in Linux e.g. sysctl -w kernel.shmmax=134217728

I have tried sysctl -w kern.sysv.shmmax=134217728 with no luck, i know you can edit /etc/sysctl.conf file.
But i would sooner set these settings as part of the postgresql control script.


Jamie


Re: OS X Kernel settings

From
Guido Neitzer
Date:
On 03.04.2007, at 23:00, Jamie Deppeler wrote:

> Is it possible to set shared memory settings on the fly in OS X
> like you can in Linux e.g. sysctl -w kernel.shmmax=134217728

If this wasn't changed recently - no you can't.

If you use /etc/sysctl.conf make sure it is loaded in /etc/rc before
the values are set in there. I'm not sure whether Apple has fixed the
bug in the startup script, where the external file was referred AFTER
the values where set. And when they are set, they are final ...

cug



OS X Kernel settings

From
Jamie Deppeler
Date:
Is this a safe setting for g5 1gig ram Os 10.4.9

sysctl -w kern.sysv.shmmax=167772160
sysctl -w kern.sysv.shmmin=1
sysctl -w kern.sysv.shmmni=32
sysctl -w kern.sysv.shmseg=8
sysctl -w kern.sysv.shmall=65536

Re: OS X Kernel settings

From
Guido Neitzer
Date:
On 04.04.2007, at 16:55, Jamie Deppeler wrote:

> Is this a safe setting for g5 1gig ram Os 10.4.9
>
> sysctl -w kern.sysv.shmmax=167772160
> sysctl -w kern.sysv.shmmin=1
> sysctl -w kern.sysv.shmmni=32
> sysctl -w kern.sysv.shmseg=8
> sysctl -w kern.sysv.shmall=65536

Why shouldn't it be safe?

cug

Re: OS X Kernel settings

From
Scott Ribe
Date:
> I'm not sure whether Apple has fixed the
> bug in the startup script, where the external file was referred AFTER
> the values where set.

Yes. You can now edit /etc/sysctl.conf and nothing else is required. I
learned this ~10.4.8, so I don't know when it actually happened.

--
Scott Ribe
scott_ribe@killerbytes.com
http://www.killerbytes.com/
(303) 722-0567 voice



Re: OS X Kernel settings

From
Guido Neitzer
Date:
On 05.04.2007, at 09:09, Scott Ribe wrote:

> Yes. You can now edit /etc/sysctl.conf and nothing else is required. I
> learned this ~10.4.8, so I don't know when it actually happened.

Okay, that's good. They had the wrong order of commands before, so
that the values in /etc/rc were used and not the values from the
external file. That was a bug in the script.

cug