shmmni(5) shmmni(5)
Tunable Kernel Parameters
NAME [Toc] [Back]
shmmni - number of System V shared memory segment identifiers in the
system
VALUES [Toc] [Back]
Default
400 identifiers
Allowed values [Toc] [Back]
Minimum: 3
Maximum: 32768
DESCRIPTION [Toc] [Back]
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 kernel determine which
segment this corresponds to.
Who is Expected to Change This Tunable?
Anyone.
Restrictions on Changing [Toc] [Back]
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.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: Sep 2004
shmmni(5) shmmni(5)
Tunable Kernel Parameters
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 [Toc] [Back]
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.
Installation of optional kernel software, from HP or other vendors,
may cause changes to tunable parameter values. After installation,
some tunable parameters may no longer be at the default or recommended
values. For information about the effects of installation on tunable
values, consult the documentation for the kernel software being
installed. For information about optional kernel software that was
factory installed on your system, see HP-UX Release Notes at
http://docs.hp.com.
AUTHOR [Toc] [Back]
shmmni was developed by HP.
SEE ALSO [Toc] [Back]
shmem(5), shmmax(5), shmseg(5).
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: Sep 2004 [ Back ] |