Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 on a lion install?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.