Insufficient Resource Error on msgsnd Call

Charles Noren noren at dinl.uucp
Thu May 25 07:28:39 AEST 1989


Investigating my problem some more, I found some interesting things and
I want to bounce some ideas off the net.  In examining the <sys/msg.h>
file I found some interesting comments and definitions.  These seem
to imply:

   1.  Each message queue is limited to a default size set at
       system configuration time.  On our system, this is
       currently set to 2048 bytes (MSGMNB in msg.h).

   2.  While each message queue has a limit, all the messages
       queues are limited to a certain amount of memory.
       On our system, this is currently set to 8k bytes
       (MSGPOOL in msg.h).

   3.  There is also a fixed limit to the number of message
       packets in the message queue system.  This is defined
       in our system as 50 packets (MSGMNI -- number of message
       queue identifiers, MSGTQL -- number of system message
       headers.

In modifying my debug utilities that access message queue
statisics,  I found that when I was "stuck", none of the
messages in the message queues exceeded the 2048 byte
limit, and the total did not exceed 4k, well within the
8k limit.  However, I found that I had 50 messages queued
to all the queues -- the limit in msg.h for the count of message
queue identifiers.

I know how to turn on message queues on the Sun (thanks to answers
from a previous posting), but how do I tune those parameters?
Do I edit msg.h and reconfigure?

Another question:  There is a parameter in msg.h, right below the comment,
"The following parameters are assumed not to require tuning", named
MSGMAP that is the number of entries in the map.  It is set to 100.
If I change the number of packets in the system to 650, will I need to
set this as well?

Finally, am I wrong in my guesses?  Will a knowledgable comment on
my guesses?  Also, are there any references to the inside implementation
details on message queues, semaphores, shared memory, sockets, kernal
stuff that you would recommend?

Thanks to those who have replied and started pointing me in the right direction.


-- 
Chuck Noren
NET:     ncar!dinl!noren
US-MAIL: Martin Marietta I&CS, MS XL8058, P.O. Box 1260,
         Denver, CO 80201-1260
Phone:   (303) 971-7930



More information about the Comp.unix.questions mailing list