Xref: utzoo comp.unix.questions:13837 comp.unix.wizards:16374 Path: utzoo!utgpu!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!unmvax!ncar!dinl!noren From: noren@dinl.uucp (Charles Noren) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Insufficient Resource Error on msgsnd Call Summary: System limits of packets and memory. Keywords: msgsnd, msgrcv, Ingres, UNIX, System V, message queues, Sun, SunOS4.0 Message-ID: <1026@dinl.mmc.UUCP> Date: 24 May 89 21:28:39 GMT References: <1023@dinl.mmc.UUCP> <589@biar.UUCP> Reply-To: noren@dinl.UUCP (Charles Noren) Followup-To: comp.unix.questions Organization: Martin Marietta I&CS, Denver CO. Lines: 52 Investigating my problem some more, I found some interesting things and I want to bounce some ideas off the net. In examining the 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