HP-UX 11i September 2002 Release Notes

Process, Threads, Memory, and Kernel Parameters
System-V InterProcess Communications (IPC)
Chapter 10
199
System-V InterProcess Communications (IPC)
System-V IPC Message Queue Enhancement
new at 11i
original release
System-V IPC is the System-V InterProcess Communications package developed by
AT&T and comprises mechanisms for arbitrary processes to send and receive data
messages, share virtual address space, and use semaphores to synchronize execution.
This enhancement applies only to the message subsystem.
The System-V IPC kernel tunable MSGMNB, which sets the maximum number of bytes
on a queue, has had its maximum upper limit increased from 64KB to 64MB. New or
recompiled applications will automatically use new, larger fields in the msqid_ds
structure which describes queue sizes. However, if queue sizes greater than 64KB are
desired, a compilation feature macro, __BIGMSGQUEUE_ENABLED, must be defined.
This may be done using the -D compiler option or the #define pre-processor directive
prior to any #include. (This requirement is temporary and used to maintain
compatibility during a transition period.)
As hardware system capacities (including CPU speed and memory) have increased, some
customer and third-party applications have been placing a greater demand upon the
System-V IPC message queues. By increasing the capacity of these queues, applications
are able to transfer large messages in a much more efficient manner. You will be able to
dedicate more system memory for this purpose. Also, this may ease porting of some
applications from other vendors platforms which use message queues.
This enhancement is available on all systems.
Impact
There is no impact on system resources unless you increase system memory dedicated to
System-V IPC message queues. To do this, the size of message memory segments
(MSGSSZ) kernel tunable and/or the number of these segments (MSGSEG) kernel
tunable may need to be increased.
An individual message queue cannot exceed the maximum queue size (MSGMNB)
kernel tunable. The size of an individual message cannot exceed the MSGMAX kernel
tunable.
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 dont use these fields will