UNIX semaphore parameters

Semaphores are kernel resources with a typical size of 1 byte each. Semaphores for the database server are in addition to any that you allocate for other software packages. You can set some UNIX™ semaphore parameters.

Each instance of the database server requires the following semaphore sets:
  • One set for each group of up to 100 virtual processors (VPs) that are started with the database server
  • One set for each additional VP that you might add dynamically while the database server is running
  • One set for each group of 100 or fewer user sessions connected through the shared-memory communication interface
Tip: For best performance, allocate enough semaphores for double the number of ipcshm connections that you expect. Use the NETTYPE configuration parameter to configure database server poll threads for this doubled number of connections.

Because utilities such as onmode use shared-memory connections, you must configure a minimum of two semaphore sets for each instance of the database server: one for the initial set of VPs and one for the shared-memory connections that database server utilities use. The SEMMNI operating-system configuration parameter typically specifies the number of semaphore sets to allocate. For information about how to set semaphore-related parameters, see the configuration instructions for your operating system.

The SEMMSL operating-system configuration parameter typically specifies the maximum number of semaphores per set. Set this parameter to at least 100.

Some operating systems require that you configure a maximum total number of semaphores across all sets, which the SEMMNS operating-system configuration parameter typically specifies. Use the following formula to calculate the total number of semaphores that each instance of the database server requires:
SEMMNS = init_vps + added_vps + (2 * shmem_users) + concurrent_utils 
init_vps
is the number of virtual processors (VPs) that are started with the database server. This number includes CPU, PIO, LIO, AIO, SHM, TLI, SOC, and ADM VPs. The minimum value is 15.
added_vps
is the number of VPs that you intend to add dynamically.
shmem_users
is the number of shared-memory connections that you allow for this instance of the database server.
concurrent_utils
is the number of concurrent database server utilities that can connect to this instance. It is suggested that you allow for a minimum of six utility connections: two for ON-Bar and four for other utilities such as onstat, and oncheck.

If you use software packages that require semaphores, the SEMMNI configuration parameter must include the total number of semaphore sets that the database server and your other software packages require. You must set the SEMMSL configuration parameter to the largest number of semaphores per set that any of your software packages require. For systems that require the SEMMNS configuration parameter, multiply SEMMNI by the value of SEMMSL to calculate an acceptable value.