HP-UX Reference (11i v2 03/08) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)

s
shmmni(5) shmmni(5)
(Tunable Kernel Parameters)
NAME
shmmni - number of System V shared memory segment identifiers in the system
VALUES
Default
400 identifiers
Allowed values
Minimum:
3
Maximum: 8192
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.
This tunable effectively sets 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 ker-
nel determine which segment this corresponds to.
Who is Expected to Change This Tunable?
Anyone.
Restrictions on Changing
Changes to this tunable take effect immediately.
Attempting to lower shmmni below the current number of identifiers in use or below the current value of
shmseg will result in an [EINVAL] error message.
Attempts to raise the value of
shmmni when insufficient memory is available to the kernel to create the
needed structures will result in an [ENOMEM] error message.
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.
What Are the Side Effects of Raising the Value?
Kernel memory usage will be slightly increased, as the data structures used to track the segments are
allocated based on this tunable.
When Should the Value of This Tunable Be Lowered?
If kernel memory is at a premium, or it is known that few segments will be needed, a slight savings can
be gained from decreasing this tunable, and thus decreasing the data structure memory usage associated
with it.
What Are the Side Effects of Lowering the Value?
Kernel memory usage will be slightly reduced.
What Other Tunable Values Should Be Changed at the Same Time?
shmmax and shmseg should be considered. shmseg should be changed in the same manner as
shmmni, since lowering the total number of segments but raising the number available per process only
makes sense if you want a few processes taking all the segments.
shmmax is more complex and any changes to it really depend on the effect desired. Refer to the
shmmax(5) manpage for more information before changing this tunable.
WARNINGS
All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its
meaning changed in future releases of HP-UX.
HP-UX 11i Version 2: August 2003 1 Hewlett-Packard Company Section 5271