Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to set IPC limits in Solaris 2.51

Posted on 1997-09-07
2
Medium Priority
?
498 Views
Last Modified: 2013-12-26
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
news group or to: mshack@interaccess.com.

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.
0
Comment
Question by:mshack090797
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Expert Comment

by:runt
ID: 1294799
There is also a system inposed limit on the total number of messages that can be in queues, have you checked what your system has it set to?
0
 
LVL 3

Accepted Solution

by:
EricKaplan earned 100 total points
ID: 1294800
Check out the limits on: datasize, stackzize & memorysize
-Eric.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question