Message queues on Linux

You are recommended to place the following settings in file /etc/sysctl.conf:
kernel.msgmni=128               #Max # of msg queue identifiers
kernel.msgmnb=163840            #Size of message queue
kernel.msgmax=40960             #Max size of a message
The MSGMNI variable determines the maximum number of message queue identifiers system wide. This is typically set to 128 which is sufficient for the normal number of concurrent requests expected to be processed.