Modifying kernel shared memory settings on a lion install
What's the location of the sysctl.conf
file on lion? In Snow Leopard it was in /etc/sysctl.conf
but now that folder doesn't contain it anymore. Searching for the file in spotlight yields no results.
Have the shared memory settings been moved to a different conf file? What is it's name?
EDIT
I am trying to modify the kernel shared memory settings of the machine. When I didn't find the sysctl.conf
file in the right place, I created my own with the recommended settings and put into /etc
directory. However running sysctl -a
still shows me that the old memory settings are in place.
How do I go about modifying these settings on a lion install?
I believe /etc/sysctl.conf
is still the right place (and man sysctl.conf
agrees).
Did you reboot? changes to /etc/sysctl.conf
are not a real-time thing: They are only read/applied when the system enters multi-user mode during startup.
The location is still /etc/sysctl.conf
or more precisely /private/etc/sysctl.conf
. I had to tweak some settings because I wanted to run Postgresql on my machine and it turned out that I had to modify all of the five settings in order to get it running. So I created the file and put in something like this:
kern.sysv.shmmax=1610612736
kern.sysv.shmmin=1
kern.sysv.shmmni=256
kern.sysv.shmseg=64
kern.sysv.shmall=393216
Then I rebooted and it's been working ever since...
NB you don't have to reboot, you can use:
sudo sysctl -w kern.sysv.shmmax=1610612736
etc....
This makes the changes in real time, the file will make them persist between reboots