Archive

Posts Tagged ‘semaphore’

Linux: Changing the kernel semaphore setting in linux

May 4th, 2009 bayu No comments

To check shared memory segment, semaphore array, and message queue limits, issue the ipcs -l command.

Modify the kernel parameters by adding the following entries to the default system control configuration file,
/etc/sysctl.conf:
kernel.sem = 250 256000 32 1024
Set the numbers as needed, and the above numbers are respectively :
1.max semaphores per array
2.max semaphores system wide
3.max ops per semop call
4.max number of arrays
where :
max semaphores system wide = max number of arrays x max semaphores/array

Run sysctl with -p parameter to load in sysctl settings from the default file /etc/sysctl.conf.
sysctl -p
The entries from the sysctl.conf file are read during startup by the network initialization script.
On some distributions you may be required to add sysctl -p in one of the system initialization files (for example, rc.local) so that kernel parameters are set after each reboot.

Categories: linux Tags: , , ,

Switch to our mobile site