The Basic Steps to Set Semaphore with Oracle
This is summary of setting semaphores with Oracle from Metalink Note: 153961.1.
Semaphores and shared memory are two very distinct sets of Operating System resources. Semaphores are a system resource that Oracle utilizes for interprocess communication and they occupy a relatively small memory space, while shared memory is utilized to contain the SGA and can garner a large portion of physical memory.
Semaphores are very important to Oracle which is running on Unix. Therefore, setting appropriate value of semaphores is vital before starting an oracle database.
Basically, there are three steps to samephores success.
- Understand The Basic Concept Behind Semaphores
- Understand How Many Semaphores Your Oracle Instance(s) Will Attempt to Grab From The Operating System.
- Configure Your OS Kernel To Accomodate all Your Oracle Instance(s) And also Allow For Future Growth
Step 1: How are semaphores released by the OS for use by an application?
- SEMMNI –>OS limit on the Number of Identifiers or sets
- SEMMSL –>The number of semaphores in an identifier or set
- SEMMNS –> The total Number of Semaphores allowed system wide
- For instance:
Let’s say SEMMNI = 100000000 and SEMMSL= 100000000 while SEMMNS=10
Even though SEMMNI is 100000000 and SEMMSL is 100000000, the max # of semaphores
available on your system will only be 10, because SEMMNS is set to 10. - Inversely:
Let’s say SEMMNI = 10 and SEMMSL = 10 while SEMMNS= 100000000000000000000000000
Because SEMMNI is 10 and SEMMSL is 10, the max # of semaphores avail on your system will only be 100 or (10 X 10), despite what SEMMNS is set too. - The max # of semaphores that can be allocated on a system will be the lesser of: (semmsl * semmni) or semmns.
Step 2: How many semaphores will my Oracle instance(s) require?
- With Oracle8, Oracle8i, Oracle9i and Oracle10g:
The number of semaphores required by an instance is equal to 2 times the setting of the ‘processes’ parameter in the init.ora for the instance. Keep in mind, however, that Oracle only momentarily grabs 2 X ‘processes’ then releases half at instance startup. This measure was apparently introduced to ensure Oracle could not exhaust a system of semaphores.
Step 3: Configure your OS kernel to accomodate all your Oracle instances
- Calculating Oracle’s SEMAPHORE Requirements (Note:15654.1)
Solving Semaphores related errors:
- UNIX: Resolving the ORA-27123 error (Note:115753.1)
- SOLARIS: How to Relocate the SGA (Note:1028623.6)
- How to determine SGA Size (7.x, 8.x, 9.x, 10g) (Note:1008866.6)
Popularity: 3% [?]
Tags:none















