Setting Semaphores; The Semmsl Parameter; The Semmni Parameter; The Semmns Parameter - Red Hat ENTERPRISE LINUX 5.1 - LINUX ORACLE Tuning Manual

Oracle 9i and 10g tuning guide
Table of Contents

Advertisement

Chapter 8.

Setting Semaphores

Semaphores can best be described as 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. The number of semaphores per
set can be defined through the kernel parameter SEMMSL.
To see all semaphore settings, run:
ipcs -ls

8.1. The SEMMSL Parameter

This parameter defines the maximum number of semaphores per semaphore set.
Oracle recommends SEMMSL to be at least 250 for 9i R2 and 10g R1/R2 databases except for 9i
R2 on x86 platforms where the minimum value is lower. Since these recommendations are minimum
settings, it is best to set it always to at least 250 for 9i and 10g databases on x86 and x86-64
platforms.
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. Note what Metalink
Note:187405.1 and Note:184821.1 have to say regarding SEMMSL: "The SEMMSL
setting should be 10 plus the largest PROCESSES parameter of any Oracle database on
the system". Even though these notes talk about 9i databases this SEMMSL rule also
applies to 10g databases. I have seen low SEMMSL settings to be an issue for 10g RAC
databases where Oracle recommended to increase SEMMSL and to calculate it according
to the rule mentioned in these notes. An example for setting semaphores for higher
PROCESSES settings can be found at

8.2. The SEMMNI Parameter

This parameter defines the maximum number of semaphore sets for the entire Linux system.
Oracle recommends SEMMNI to be at least 128 for 9i R2 and 10g R1/R2 databases except for 9i
R2 on x86 platforms where the minimum value is lower. Since these recommendations are minimum
settings, it is best to set it always to at least 128 for 9i and 10g databases on x86 and x86-64
platforms.

8.3. 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).
Section 8.6, "An Example of Semaphore
Settings".
19

Advertisement

Table of Contents
loading

Table of Contents