Operating System - HP-UX
1835358 Members
3692 Online
110078 Solutions
New Discussion

Re: message kernel parameters

 
Vijayakrishna
Occasional Advisor

message kernel parameters

After installing the patch PHKL_21518, which enables to set msgmnb to 64MB (with out patch 64K), the new kernel parameters set are
msgssz 40, msgmnb 921600, msgtql 125,000, msgseg 25,000 and msgmap to 25,000.
After this I expect the max. simoultaneous messages system wide will be 125,000, but I am not getting more than 25,000. Is there any limitation on msgtql related to msgmap? Our typical message size will be 8 bytes.
8 REPLIES 8
James R. Ferguson
Acclaimed Contributor

Re: message kernel parameters

Hi:

'msgtql' is limited by your system's memory. See this document for more information (on 11.0):

http://docs.hp.com/hpux/onlinedocs/os/KCparams.OverviewAll.html

See here, for 11i:

http://docs.hp.com/hpux/onlinedocs/TKP-90202/TKP-90202.html

Regards!

...JRF...
Vijayakrishna
Occasional Advisor

Re: message kernel parameters

Hi, ..JRF..

Thanks for quick respose, With that assumption only the value to msgtql set to 125,000 (change is Successful). But my system is not allowing more than 25,000 even the kernel built with 125,000.

Thanks
VK
Jeff Schussele
Honored Contributor

Re: message kernel parameters

Vijay,

msgssz*msgseg is the total message storage space. Set msgssz*msgseg equal to or grater than the maximum a single large message queue can hold. If many large queues are expected, that will need to be factored in.

The msgssz tunable specifies the size, in bytes, of a "segment" of memmory space reserved for storing IPC messages. Space for messages is acquired in segment-sized increments as required to contain the message. Some space may be unused and inaccessible in the last segment acquired while the message remains stored. The potential for fragmentation should be considered.

The msgtql tunable specifies the maximum total system-wide individual messages across all message queues. Every message has a header to specify message type and location and the total number of headers is limited by msgtql. Headers are stored in shared swappable memory. Therefore there is some impact on memory usage, though minimal, resulting from the value of this tunable.
If msgtql is set high as a result of expecting large numbers of small messages, the impact of all other System V message tunables should be considered.


msgmap - number of entries in the System V IPC message space resource map
--------------------------------------------------------------------------------
VALUES
Failsafe
(2+msgtql)
Default
(2+msgtql)
Allowed values
Minimum: 3
Maximum: msgtql+2 or msgtql+2, whichever is lower.
--------------------------------------------------------------------------------
DESCRIPTION

The msgmap tunable specifies the size of the message space resource map that tracks the free space in shared IPC message space. Each resource map entry is an offset-space pair which points to the offset and size (bytes) of each contiguous series of unused message space "segments".
Message queues are implemented as linked lists in shared memory. Each message consists of one or more contiguous segments of reserved memory space. As messages are added and removed, the reserved shared memory area can become fragmented. Free-space fragmentation generally increases as message size variation increases. Since the resource map requires an entry pair for each fragment of free space, excess fragmentation can cause the free-space map to completely fill. If the map is full when message space is acquired or released, the system issues the DANGER: mfree map overflow. warning message



So, as pointed out, you're probably encountering memory limits.
Increase msgmap to 2*msgtql


HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jeff Schussele
Honored Contributor

Re: message kernel parameters

Sorry - that's 2 + msgtql.

Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Vijayakrishna
Occasional Advisor

Re: message kernel parameters

Hi Jeff,

msgmap has two limitations, msgmap must be less than or equal to (msgtql + 2),
msgmap must be less than or equal to (msgseg + 2)
So I can't increase msgmap more than msgseg+2 which is a lower value in my case. Also I cn't increase msgseg more than 32767. So this means the system can't have more than 32767 messages at a given time??

Thank you

VK
James R. Ferguson
Acclaimed Contributor

Re: message kernel parameters

Hi VK:

From the 'mesg(5)' man pages for 11i (via the link I provided, above):

"All the System V IPC Message subsystem tunables are interrelated and should not be treated as independent variables. The set of eight tunables must be evaluated as a system to ensure they reflect the application requirements. The mesg tunables include msgmap, msgmax, msgmnb, msgmni, msgseg, msgssz, and msgtql."

Regards!

...JRF...
Jeff Schussele
Honored Contributor

Re: message kernel parameters

Sure appears that way.
Also note:

msgmnb specifies the maximum total size, in bytes, of all messages that can be queued simultaneously on a message queue
msgmnb must be greater than or equal to msgmax

msgmnb must be less than or equal to ( msgssz * msgseg)

So I would set msgseg to max value (32767) & msgmbn to ( msgssz * msgseg) - that's as much as you're going to get according to the "rules", now.

Although you may want to check out PHKL_26136 as this has superseded PHKL_21518

http://us-support.external.hp.com/wpsl/bin/doc.pl/screen=wpslDisplayPatch/sid=b84beeb01a3ecc9d1a?PACH_NAM=PHKL_26136&HW=s800&OS=11.00

Also it appears you may have needed PHKL_21684 AND PHKL_21778 as a three-patch-set when you pulled PHKL_21518

See the PHKL_26136 description section for 21518 in the above URL.

HTH,
Jeff

PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Vijayakrishna
Occasional Advisor

Re: message kernel parameters

Hi Jeff,

I did the same thing, setting msgmnb as per msgseg and msgssz. But as msgtql is memory limited, it should allow system to have defined total messages (125,000) at given time. I am not clear about any other limitations msgtql has. I am verifying the patches.

Thank you

Vijay