HP-UX Reference (11i v1 05/09) - 5 Miscellaneous Topics (vol 9)

s
shmmni(5) shmmni(5)
(Tunable Kernel Parameters)
NAME
shmmni, shmmni_extended - number of System V shared memory segment identifiers in the system
VALUES
Default [shmmni]
200 identifiers
Allowed values [shmmni]
Minimum: 3
Maximum: 1024 for a 32 bit kernel,
and 8192 for a 64 bit kernel
Default [shmmni_extended]
0 (use value of shmmni )
Allowed values [shmmni_extended]
Minimum: 0
Maximum: 32768
shmmni_extended
is only available for 64 bit kernels with ShmemExtensions.
DESCRIPTION
Shared memory is an efficient InterProcess Communications (IPC) mechanism. One process creates a
shared memory segment and attaches it to its address space. Any processes looking to communicate with
this process through the shared memory segment, then attach the shared memory segment to their
corresponding address spaces as well. Once attached, a process can read from or write to the segment
depending on the permissions specified while attaching it.
These tunables effectively set the number of unique segments creatable system wide, since each segment is
assigned an identifier by the kernel. The identifier is simply a reference generated by the kernel such that
any user process can request a particular segment for sharing with a simple integer, and let the kernel
determine which segment this corresponds to.
If ShmemExtensions is not installed on the system (or if the system is 32 bit) then
shmmni alone deter-
mines the number of identifiers.
If ShmemExtensions is installed on a 64 bit system, then the
shmmni_extended tunable becomes avail-
able. Set to the default value of 0, this tunable is ignored by the system and
shmmni sets the number of
identifiers as before. For systems requiring more shared memory identifiers than
shmmni allows, setting
the value of
shmmni_extended
to a positive non-zero value makes shmmni_extended determine the
number of identifiers instead, allowing a greater number of identifiers in the system.
Strong caution is advised when using the
shmmni_extended
tunable if Memory Windows are also in
use. The system requires a fixed amount of memory based on the
max_mem_window
and either shmmni
or shmmni_extended
tunables. If the maximum number of identifiers is 8,192 the amount of memory
required is approximately 1 Mb plus 0.25 Mb for each memory window allowed on the system. If
shmmni_extended is in use and the maximum number of identifiers is increased to 32,768 the memory
requirement increases to 5Mb plus 1Mb for each memory window allowed on the system. This memory can
not be returned to the system for other uses and may lead to memory starvation for user applications or
other system needs - causing inordinate paging, performance degradation or failure to boot the system
entirely.
Who is Expected to Change This Tunable?
Anyone.
Restrictions on Changing
Changes to these tunables take effect at the next reboot.
When Should the Value of This Tunable Be Raised?
shmmni should be raised if users of System V shared memory are receiving the [ENOSPC] error message
on shmget() calls.
Section 5340 Hewlett-Packard Company 1 HP-UX 11i Version 1: September 2005