9

how should I set the shm* values in Mac Os X 10.5.6 Leopard in a persistent manner?

2
  • sorry, actually this works. I just had a typo and edited the wrong file syslog.conf...
    – Alex. S.
    May 20, 2009 at 5:22
  • I changed the original wording, and put the solution as answer (only to help somebody else)
    – Alex. S.
    May 20, 2009 at 5:26

3 Answers 3

10

put this

kern.sysv.shmmax=524288000
kern.sysv.shmmin=1
kern.sysv.shmmni=64
kern.sysv.shmseg=16
kern.sysv.semmns=130
kern.sysv.shmall=131072000
kern.sysv.maxproc=2048
kern.maxprocperuid=512

on this file /etc/sysctl.conf

and then reboot.

to verify run this command

 sysctl kern.sysv.shmmax 

and it should give 524288000

1
  • If you don't want to reboot you can do it this way and it will be updated until your next reboot: sudo sysctl -w kern.sysv.shmmax=xxxxx
    – Hack-R
    Sep 6, 2022 at 18:56
4

(from: http://willbryant.net/software/mac_os_x/postgres_initdb_fatal_shared_memory_error_on_leopard)

One wat to fix it is to run:

sudo sysctl -w kern.sysv.shmall=65536
sudo sysctl -w kern.sysv.shmmax=16777216

and then run the initdb command. To persist the changes you need to edit/create the file /etc/sysctl.conf with this:

kern.sysv.shmall=65536
kern.sysv.shmmax=16777216
1

What do you get when you run 'sysctl -p' ? does it load your settings from /etc/sysctl.conf? What file is listed as default when you do 'sysctl --help' ?

1
  • thanks for your response, I just wrote the wrong command to edit the wrong file. /etc/sysctl.conf works as expected.
    – Alex. S.
    May 20, 2009 at 5:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .