From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,c6e7b2205d16f0eb X-Google-Attributes: gidfee84,public From: ivegotan%at%ombomb%dot%org@spam.spam.die.net (Dr. Strangelove) Subject: Re: Maximum Message Queue in Digital UNIX Date: 1997/12/11 Message-ID: <348fbfe6.3681081@132.147.160.254>#1/1 X-Deja-AN: 297193908 References: <349049A1.875131F9@ce.kmitl.ac.th> Organization: Internet Network Services Reply-To: ivegotan%at%ombomb%dot%org@spam.spam.die.net Newsgroups: comp.unix.osf.osf1 On Thu, 11 Dec 1997 13:14:27 -0700, Kraisit Vittinanon wrote: > I would like to extend the msg-mnb value (Maximun number of bytes on >queue) (SYSTEM IV IPC parameter) but I don't know the size limit of it. >And what is the effect if I extend this parameter? If you know about >this, please give me an advice. There are three parameters concerned with message queues that you can play with: msgtql - Number of message headers system wide msgmax - Maximum size of any one message msgmnb - Maximum nuber of bytes on a message queue To my knowledge you can set the msgmnb parameter to any sensible value up to the size of your system memory. However, if performance increase is what you're after, then changing these parameters isn't going to help you a great deal. The reason for this is that a process will be put to sleep until there is sufficient space to place the message on the queue. Presumably your code puts a message on a queue and waits for a reply using the msgsnd() and msgrcv() system calls respectively. If this is the case your program will be put to sleep by the OS until it recieves a reply, therefore the only reason for a large msgmnb value is to avoid the occasional extra context switch which results when a message cannot be written to the queue or there are no free message queue headers. The only thing you really need to ensure is that msgmnb is at least as big as msgmax and that msgtql is sufficiently big for the number of processes writing to and reading from the message queue. These are the values I use on an Alphaserver 1000 4/266 with apporximately 200 users using our database system: msgmax 4096 msgmnb 32768 msgtql 200 Hope this helps. Dr. Strangelove Rewrite the address with the obvious bits taken out if you want to mail me. mailto:ivegotan%at%ombomb%dot%org%with%no%spam%please http://www.ombomb.org/ "Put your money on 'The Bribes', they always win." - Jello Biafra