Optimization guide for Linux web/db servers
** The author takes no responsibility for the effect of the use of this guide upon the users computer.
/etc/sysctl.conf is used to modify kernel parameters at runtime. The parameters available are those listed under /proc/sys/
The lines below are some nice tweaks you can use for a heavy loaded server. To add them edit your /etc/sysctl.conf file
kernel.sem = 100 32000 100 100 kernel.shmmni = 4096 kernel.shmall = 2097152 kernel.shmmax = 2147483648 fs.file-max = 65536
To see your current values type the following: sysctl -a |egrep "shmmax|shmall|shmmni|sem|file-max"
kernel.sem defines the Semaphores values. Semaphores are counters which are used to provide synchronization between processes or between threads within a process for shared resources like shared memories. System V semaphores support semaphore sets where each one is a counting semaphore. So when an application requests semaphores, the kernel releases them in "sets". kernel.sem as you can see above has 4 values. The four values represent: SEMMSL, SEMMNI, SEMMNS and SEMOPM. SEMMSL defines the maximum number of semaphores per semaphore set
SEMMNI defines the maximum number of semaphore sets in the entire Linux system.
SEMMNS defines the total number of semaphores (not semaphore set) in the entire Linux system. A semaphore set can have more than one semaphore, and according to the semget(2) man page, values greater than SEMMSL * SEMMNI makes it irrelevant.
SEMOPM defines the maximum number of semaphore operations that can be performed per semop(2) system call.
Full article can be read here.
You cannot post until you login.