Installation guide

Setting Semaphores
Semaphores can be described as counters which are used to provide synchronization between processes or be-
tween 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 ker-
nel releases them in sets. The number of semaphores per set can be defined through the kernel parameter
SEMMSL.
To see all semaphore settings, run:
# ipcs -ls
------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767
You can also use the following command:
# cat /proc/sys/kernel/sem
250 32000 32 128
The SEMMSL Parameter
This parameter defines the maximum number of semaphores per semaphore set.
The recommended minimum value of SEMMSL is 250.
NOTE:
If a database gets thousands of concurrent connections where the ora.init parameter PROCESSES is very large,
then SEMMSL should be larger as well. Referencing Metalink Notes:187405.1 and 184821.1, the SEMMSL
setting should be 10 plus the largest PROCESSES parameter of any Oracle database on the system. Even
though these notes reference9i databases, this SEMMSL rule also applies to 10g databases. An example for set-
ting semaphores for higher PROCESSES settings can be found in the Example for Semaphore Settings section
in this document.
The SEMMNI Parameter
This parameter defines the maximum number of semaphore sets for the entire Linux system. Oracle validates
Oracle 10.2 and 11.1 configurations with SEMMNI = 142.
The SEMMNS Parameter
This parameter defines the total number of semaphores (not semaphore sets) for the entire Linux system. A
semaphore set can have more than one semaphore, and as the semget(2) man page explains, values greater
than SEMMSL * SEMMNI makes it irrelevant. The maximum number of semaphores that can be allocated on a
Linux system will be the lesser of: SEMMNS or (SEMMSL * SEMMNI).
22 | www.redhat.com