question about IPC limit settings for Solaris Message Queues and other oddities

question about IPC limit settings for Solaris Message Queues and other oddities

Post by Mark Shacklett » Sat, 06 Sep 1997 04:00:00



Hi:

I've got a little program that is trying to add (about) 1000 messages to
an IPC message
queue that it has created.  I've set the following system parameters in
Solaris
2.51 in /etc/system to:  

        set msgsys:msginfo_msgtql = 65560
        set msgsys:msginfo_msgmnb = 1024000

This should set the maximum number of messages in any queue to be 65K,
and the total
number of bytes for a message queue to 1M.

The program is running on an Ultra 1 with 128 meg of memory, and the
system is not taxed.
The program is to add a finite number of messages to the queue, and a
reader
is to later read the messages from the queue.

I am able to create ONLY 341 messages before I get the error EAGAIN
(errno == 11),
and strerror() prints the text:  "Resource temporarily unavailable".  I
limit at 341
regardless of whether IPC_NOWAIT is set in the flags or not.

I have changed the msgtql from 65560 to 512, and I can still add only
341 messages
before croaking.  Does anyone know what's going on here?  

One other simple question:  Do Solaris Message Queues have built-in
semaphore protection
(unlike Shared Memory where you have to roll  your own semaphores)?
That is to say,
can multiple processes add to and remove from a particular Message Queue
without
having to implement a semaphore?

Any help would be most gratefully appreciated.  Please respond to the

Thanks.

Mark

PS:

What I'm trying to do is to obtain timing information from a
transactional processing
system.  I want to track a number (say, 1000) of transactions through
their lifetimes
in the system.  Each application type will create a message recording
the transaction type, their application type, and the time that the
transaction was
acted upon by the application. Each of these "timings" are then to be
added to
the message queue.  For 1000 records, the message queue needs to be able
to hold about
5000 21-byte messages.  We are using a message queue because we want to
be able
to "live" store a number of "timing records" with as little trouble and
impact (ala
Heisenberg) as possible.  Once all the transactions have been processed,
we
want to dump the message queue out via a reader and analyze the timings.
If you have any suggestions as to how this can be better done by
something other
than message queues, please let me know.  I'm using message queues
because
they have IPC, a record-based structure capable of storing more than one
message/record easily, and because I think it has built-in semaphore
support.
Please advise if there are caveats to that last assumption.

--
****************************************************************
J. Mark Shacklette
Committee on Social Thought        
University of Chicago


****************************************************************

 
 
 

question about IPC limit settings for Solaris Message Queues and other oddities

Post by Vince Arcur » Wed, 17 Sep 1997 04:00:00


Mark,

Sounds like you stilll need to tweek another variable like maxusers in
/etc/system


> Hi:

> I've got a little program that is trying to add (about) 1000 messages to
> an IPC message
> queue that it has created.  I've set the following system parameters in
> Solaris
> 2.51 in /etc/system to:

>         set msgsys:msginfo_msgtql = 65560
>         set msgsys:msginfo_msgmnb = 1024000

> This should set the maximum number of messages in any queue to be 65K,
> and the total
> number of bytes for a message queue to 1M.

> The program is running on an Ultra 1 with 128 meg of memory, and the
> system is not taxed.
> The program is to add a finite number of messages to the queue, and a
> reader
> is to later read the messages from the queue.

> I am able to create ONLY 341 messages before I get the error EAGAIN
> (errno == 11),
> and strerror() prints the text:  "Resource temporarily unavailable".  I
> limit at 341
> regardless of whether IPC_NOWAIT is set in the flags or not.

> I have changed the msgtql from 65560 to 512, and I can still add only
> 341 messages
> before croaking.  Does anyone know what's going on here?

> One other simple question:  Do Solaris Message Queues have built-in
> semaphore protection
> (unlike Shared Memory where you have to roll  your own semaphores)?
> That is to say,
> can multiple processes add to and remove from a particular Message Queue
> without
> having to implement a semaphore?

> Any help would be most gratefully appreciated.  Please respond to the

> Thanks.

> Mark

> PS:

> What I'm trying to do is to obtain timing information from a
> transactional processing
> system.  I want to track a number (say, 1000) of transactions through
> their lifetimes
> in the system.  Each application type will create a message recording
> the transaction type, their application type, and the time that the
> transaction was
> acted upon by the application. Each of these "timings" are then to be
> added to
> the message queue.  For 1000 records, the message queue needs to be able
> to hold about
> 5000 21-byte messages.  We are using a message queue because we want to
> be able
> to "live" store a number of "timing records" with as little trouble and
> impact (ala
> Heisenberg) as possible.  Once all the transactions have been processed,
> we
> want to dump the message queue out via a reader and analyze the timings.
> If you have any suggestions as to how this can be better done by
> something other
> than message queues, please let me know.  I'm using message queues
> because
> they have IPC, a record-based structure capable of storing more than one
> message/record easily, and because I think it has built-in semaphore
> support.
> Please advise if there are caveats to that last assumption.

> --
> ****************************************************************
> J. Mark Shacklette
> Committee on Social Thought
> University of Chicago


> ****************************************************************


 
 
 

1. How/Where do I set the system limits for IPC Message Queues (msgtql, msgmnb, etc)?

Hi:

I'm trying to find out how to set the system IPC limits for
message queues, semaphores, etc.  In solaris, you would set
the following variables (among others) in /etc/system:

        set msgsys:msginfo_msgtql = xxxx
        set msgsys:msginfo_msgmnb = xxxx

Anybody know how to configure this in Linux?

Thanks in advance,

Mark

--
****************************************************************
J. Mark Shacklette
Committee on Social Thought        
University of Chicago


****************************************************************

2. Trailer module for Apache

3. IPC Message Queue Limits

4. Request time scripts

5. POSIX IPC message queues implementation error on Solaris 2.6

6. Kernel (ext2?) problems on news (INN) site

7. Solaris (SysV) IPC Message Queues

8. Minicom problem -- problem initializing

9. Solaris 2.4 IPC Message Queues?

10. Question about logic - IPC Message Queue and Socket

11. Are UNIX IPC message queues bad?

12. IPC: message queue

13. IPC message queues