HP-UX Reference (11i v2 04/09) - 5 Miscellaneous Topics (vol 9)
m
msgseg(5) msgseg(5)
(Tunable Kernel Parameters)
NAME
msgseg - number of System V IPC message segments in the system
VALUES
Default
8192
Failsafe
8192
Allowed Values
Minimum: 1
Maximum: 32767 or ((2ˆ32-1)/msgssz), whichever is smaller.
The product of
msgseg*msgssz
must not exceed a 32 bit integer value of 4,294,967,295 (2ˆ32)-1.
DESCRIPTION
The
msgseg specifies the total number of "segments" of system-wide shared memory message storage
space which is shared among all IPC message queues.
The total available space for messages in the system is defined by the product of
msgseg*msgssz, the
number of segments multiplied by the segment size.
Segments are only used to store messages larger than 64 bytes long. Messages smaller than or equal to
64 bytes long are stored in a different area and do not consume a segment.
If applications have consumed all message segments, the
msgsnd() call will block until segments
become available or return [EAGAIN] if IPC_NOWAIT was specified.
Messages larger than a single segment are allocated in a number of contiguous segments sufficient to hold
the message. As all segments are allocated as a table (contiguous memory), fragmentation can occur as
messages are added and removed. Therefore, if message sizes often exceed a single segment, consider
allocating more segments than are actually needed for message data, to allow for some fragmentation.
For more information about System V message queues, refer to the Overview section of the mesg(5) man-
page.
Who Is Expected to Change This Tunable?
Anyone.
Restrictions on Changing
Changes to this tunable take effect at the next reboot.
When Should the Value of This Tunable Be Raised?
Raise this tunable if applications block too frequently in
msgsnd(), requiring more or larger messages
be held in the kernel message queues.
When Should the Value of This Tunable Be Lowered?
Lower this tunable when applications no longer require as much message space.
What Other Tunable Values Should Be Changed at the Same Time?
All the System V message queue tunables are interrelated and should not be treated as independent vari-
ables. The set must be evaluated as a system to ensure the tunables reflect the application requirements.
The message tunables include
msgmap, msgmax, msgmnb, msgmni, msgseg, msgssz, and msgtql.
Specifically, the msgssz and msgtql tunables may need to be adjusted in conjunction with changes in
the msgseg 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. The 64 byte threshold may change in future releases of
HP-UX.
A table of message segments is allocated in kernel memory at boot time. This memory is reserved
whether or not it is used.
HP-UX 11i Version 2: September 2004 − 1 − Hewlett-Packard Company Section 5−−215