Salesforce

Calculating SEMMSL, SEMMNS and SEMMNU

« Go Back

Information

 
TitleCalculating SEMMSL, SEMMNS and SEMMNU
URL NameP4741
Article Number000138948
EnvironmentProduct: Progress
Version: 7.x, 8.x
Product: OpenEdge
Version: 10.x, 11.x, 12.x, 13.x
OS: UNIX
Other: Semaphores
Question/Problem Description
Calculating SEMMSL, SEMMNS and SEMMNU
Calculation for semaphore kernel parameters required by OpenEdge databases
How to determine what to set for semaphores in the kernel

 
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution

Semaphore parameters:

  1. SEMMSL is the maximum number of semaphores allowed per semaphore identifier (semaphore set).
  2. SEMMNS is the total number of semaphores allowed for the system.
  3. SEMMNU is the maximum number of semaphore undo structures allowed for the system.
  4. SEMOPM is the maximum number of semaphore operations allowed in one semop() call.
  5. SEMMNI is the maximum number of semaphore sets allowed across the system.

Semaphore calculation requirements for OpenEdge Databases:

The formulas below calculate the semaphore resources required by OpenEdge. They are not necessarily the final values that should be assigned to the operating-system kernel parameters.
  • A particular system or application may require increasing these limits as Progress/OpenEdge is not the only application or resource on a machine that makes use of semaphores. 
    The UNIX/Linux kernel settings are system-wide limits and must also provide sufficient capacity for the operating system, other OpenEdge databases, and other applications that use System V semaphores.
  • Refer to the operating-system documentation for additional kernel tuning requirements. Parameter availability, names, and behavior can vary between UNIX/Linux platforms and operating-system versions.

     


SEMMSL

  • SEMMSL specifies the maximum number of semaphores allowed in a single semaphore set.

    The number of semaphores required by OpenEdge is based on the maximum number of users (-n), maximum number of servers (-Mn), and, when multiple semaphore sets are configured, the -semsets startup parameter.

    When determining the appropriate -n value, allow sufficient user slots for OpenEdge auxiliary processes such as APWs, AIW, BIW, WDOG, AIMGT, RPLS, online backup, and additional PROMON sessions. The semaphore calculation should use the final configured -n value.

    When using a single semaphore set

    The traditional sizing recommendation is:  SEMMSL = -n + -Mn + 4

    When multiple semaphore sets are configured using -semsets, the user and server semaphores are distributed across the configured semaphore sets. Therefore, the SEMMSL calculation changes.

    When using multiple semaphore sets

    First calculate the total number of user and server semaphore slots:

    UserServerCount = -n + -Mn + 4

    Next, calculate the number of semaphores required in each user semaphore set:
    UserSetSize = ROUND UP [ UserServerCount / -semsets ]
    OpenEdge also creates a control semaphore set requiring 7 semaphores.
    Therefore: SEMMSL = the greater of 7 or UserSetSize

Example:

-n        = 2000
-Mn       = 1000
-semsets  = 60

Calculate the total user and server semaphore requirement:
UserServerCount = 2000 + 1000 + 4 = 3004
Divide this requirement across the 60 user semaphore sets:
UserSetSize =     ROUND UP [ 3004 / 60 ]   = 51
 
Compare the user semaphore set size with the 7 semaphores required by the OpenEdge control set:
SEMMSL = greater of 7 or 51 = 51
 
Note: SEMMSL is a system-wide operating-system limit. If multiple OpenEdge databases run on the same system, calculate the requirement for each database and configure SEMMSL to accommodate the largest individual semaphore set required by any database. Also consider the requirements of other applications that use System V semaphores.

SEMMNS

SEMMNS is the maximum total number of semaphores available across the system.

When OpenEdge uses a single semaphore set, the traditional sizing recommendation is:

  • SEMMNS = SEMMSL * the number of active databases 

Note:  Additional semaphore capacity may be required to accommodate other databases and applications running on the system.

 

When multiple semaphore sets are configured using -semsets, calculate the OpenEdge semaphore requirement for each database as:
  • SEMMNS = 7 + (-semsets × UserSetSize)
The value 7 represents the semaphores in the OpenEdge control semaphore set. UserSetSize is the value calculated in the SEMMSL section.

Continuing the previous example:

-semsets   = 60
UserSetSize = 51

SEMMNS = 7 + (60 × 51) = 3067

 

Note: SEMMNS is a system-wide operating-system limit. If multiple OpenEdge databases run concurrently, calculate the requirement for each database and add the results together. Also allow sufficient capacity for other applications and operating-system use.

SEMMNU

  • Allow one semaphore undo structure for each OpenEdge process connecting to a database, including server processes, self-service clients, page writers, BI writers, AI writers, watchdog processes, PROSHUT, and PROMON.
  • On operating systems that expose a configurable SEMMNU parameter, existing OpenEdge guidance recommends configuring SEMMNU equal to SEMMNS. Refer to the applicable operating-system documentation before changing this value. Not all UNIX/Linux platforms provide a configurable SEMMNU value.

SEMMNI

For one OpenEdge database using multiple semaphore sets:

SEMMNI required by OpenEdge = -semsets + 1

Continuing the previous example:

SEMMNI required by OpenEdge = 60 + 1 = 61

The additional 1 is the OpenEdge control semaphore set.

 

  • For multiple OpenEdge databases: SEMMNI = SUM(-semsets + 1 for each active database)

NOTE:  SEMMNI is a system-wide operating-system limit. Make sure to allow additional semaphore sets for other applications and operating-system usage.

SEMOPM

  • >=3

NOTE:  Do not lower an existing operating-system SEMOPM value to 3. If the operating system already provides a higher value, retain it.

If parameters are not set correctly, OpenEdge will display an error message when it attempts to start an additional user or server.  

Example:

Semaphore limit exceeded
Less than minimum number of semaphores available (1130)

 

Additional semaphore considerations:

The formulas above calculate the semaphore resources associated with the OpenEdge database semaphore-set configuration. Additional semaphore usage can depend on database licensing, locking behavior, and the use of spin locks (-spin). For additional information, refer to Does Progress use semaphores on multi-processor machines?
 
Workaround
Notes
Keyword Phrase
Last Modified Date11/11/2026 7:15 PM

Powered by