HP-UX 11i June 2001 Release Notes
Process, Threads, Memory, and Kernel Parameters
System-V IPC Message Queue Enhancement (new at 11i original release)
Chapter 8174
Compatibility Issues
This change allows execution of existing binary programs. However, as
described in the msgget (2) and msgctl (2) manpages, if binaries built on
pre-11i HP-UX are used, the queue should not be created in excess of
64KB. To ensure this, the programs which create the queue (that is, via
the IPC_CREAT option to msgget should not be recompiled with the
symbol “__BIGMSGQUEUE_ENABLED” defined. Also, the IPC_SET
command to msgctl should not specify a msg_qbytes value in excess of
64KB.
The reason for this is that pre-11i binaries use 16-bit fields in the
msqid_ds structure for msg_qbytes and msg_cbytes queue size
information. If the actual queue sizes exceed 64K, these fields are capped
at 64K (that is, 65535 - the maximum value 16 bits can represent). It
should be noted that binary programs which don’t use these fields will
operate properly even with larger queues. Even some of those programs
which do use the fields may do so in such a manner that the inaccuracy
does not adversly affect program behavior.
These concerns arise only for separately-built binaries which share
common message queues. A group of binary programs which use queues
less than or equal to 64K are not affected by a separate group of
programs which may be using other queues greater than 64K.
The special compile-time symbol, “__BIGMSGQUEUE_ENABLED”
selects the enhanced capabilities. It is anticipated that, at the major
release to follow 11i, the default will be switched so that programs
recompiled without this symbol will create big queues. Programs
recompiled on 11i will be capable of handling the larger queue size fields,
even if not compiled with” __BIGMSGQUEUE_ENABLED”. You should
consider whether your applications should be recompiled on 11i to
prepare for that future release.
Performance Issues
The purpose of increasing the size limits on System-V IPC message
queues is to improve performance of applications which pass large
messages between processes. The necessity to break messages into
smaller pieces is eliminated. It also reduces the high rate of context
switching associated with such techniques.