Sponsored Content
Full Discussion: posix ipc message queue
Operating Systems HP-UX posix ipc message queue Post 302072105 by cadanir on Thursday 27th of April 2006 12:46:13 PM
Old 04-27-2006
pipcs -qa gives me somthing like this :

POSIX IPC status as of Thu Apr 27 15:59:08 2006
T MODE OWNER GROUP REFCNT QNUM MNUM QBYTES NAME
POSIX Message Queues:
q rw-rw---- abmd AZZX 1 0 100000 22 /abLVxy
q rw-rw---- abcd ABZY 13 0 50000 256 /abgxy
q rw-rw---- abcd ABZY 3 0 1000 256 /abILxy
q rw-rw---- abcd ABZY 1 0 50000 256 /ab0xy
q rw-rw---- abcd ABZY 1 0 50000 256 /abMD1xy
... etc
q rw-rw---- acc4d AZZX 0 0 1024 256 /abSOxy
q rw-rw---- acc4d AZZX 0 901 1024 256 /ab0Axy
q rw-rw---- acc4d AZZX 0 4 1024 256 /ab10xy
q rw-rw---- abcd ABZY 0 0 100000 14 /abB1xy
q rw-rw---- u91134 ABZY 0 0 100 10 /aby
q rw-rw---- acc4d AZZX 0 5 1024 256 /abITxy
q rw-rw---- abcd ABZY 2 0 100000 14 /abW1xy

And if I try to create a new one, with msg size 32 and queue length 128 :

mqopen 128 32 -c /test_32x128

There is no pb.

...but if I use :

mqopen 1024 10000 -c /test (this also is ok)
mqopen 1024 10000 -c /test2 (this fails ...)
mq_open(): No space left on device

It's ok, if I reduce the number of messages on the queue :
mq_open -b 1024 -m 5000 -c /test2 (this works)

The pb is that we have 12 Go of physical RAM available...

This link http://docs.hp.com/en/32650-90879/ch03s03.html says :
"
MESSAGE [ENOSPC] No space left on device. (POSIX.1 ERROR 28)

CAUSE During a write() function on a regular file, or when extending a directory, there was no free space left on the device.

ACTION Deallocate unneeded disk space.
"

Here the error occurs when we try to create a new queue not when we try to write a message on a queue.

Under Linux kernel 2.6 and probably under FreeBSD 7, posix queues use a "virtual file system" to make permanent the content of the queue between reboot and use shared memory. This is something like a filesystem in memory... in turn shared memory is implemented using ipc sys v shared memory system calls : shmat(), etc ...We already allow max usage os shared mem with kernel params. I try to know what is limiting us now ? Max adressable space for shared mem is 1.75 GB under HP-UX, but we cannot create any queue after that all existing queues use approx. 900 MB...

Of course there is a lot of apps running and sharing the same space of 1.75 GB. vmstat says we still have 407000 free page (if a page is 4096 Bytes), this gives 450 MB available. Of course I don't know if this RAM is contiguous or fragmented... this perhaps explain why we fail with a queue of 10 MB and not 5MB... I don't know if there is a way to unfragment memory without rebooting...

It's very strange that on a system with 12GB RAM, HP-UX fixed the shared memory adress range from 0x8000 0000 to 0xefff ffff... Is this the way they understand virtual memory ? Or perhaps I misunderstand their man pages...

Thank you again for your interest on this problem,
Cengiz ADANIR.
 

10 More Discussions You Might Find Interesting

1. Programming

POSIX Message Queue - Settings

How can I increase the POSIX Msg Q parameter SC_MQ_PRIO_MAX? The maximum is defined as 32. Can I increase the number? If so, how? Deepa (0 Replies)
Discussion started by: Deepa
0 Replies

2. UNIX for Dummies Questions & Answers

Posix vs System V IPC quesions

What are the differences/similarities between posix and system V ipc and their mechanisms? also, why is system v only limited to inter-process communication on a single node? thanks (0 Replies)
Discussion started by: jsimpson
0 Replies

3. Linux

POSIX message queue size

Hi all, Please tell me how to change POSIX message queue maximum size? "ulimit" is not a solution because it controls shell resources. But i need to control queue size before login in and starting the shell. It is needed to limit queue size for applications started before login in. Sorry for my... (7 Replies)
Discussion started by: Vourhey
7 Replies

4. Programming

How to limit max no of message in a posix message queue

Hii can anyone pls tell how to limit the max no of message in a posix message queue. I have made changes in proc/sys/fs/mqueue/msg_max But still whenever i try to read the value of max. message in the queue using attr.mq_curmsgs (where struct mq_attr attr) its giving the default value as 10.... (0 Replies)
Discussion started by: mohit3884
0 Replies

5. Programming

IPC - queue problems

Hi, I´m having a lot of problems when working with message queues, both on HP-UX Systems and Sun Solaris. When we fill a queue with a messages, the system hangs and locks everything that relies on the use of IPC resources. Anyone knows how to eliminate this problem? Thanks, Haroldo Teixeira (2 Replies)
Discussion started by: haroldo
2 Replies

6. UNIX for Dummies Questions & Answers

IPC Message Queue. msgrcv doesnt work..

Hi everybody, this is the situation. there is a programm XYZ which opens a message queue with the key 47110815 and waits for a SIGUSR1. After receiving this signal it sends a message with type 100 and a number (as ASCII) in the message-body. I have to write a prog which frist sends the... (1 Reply)
Discussion started by: daredevil82m
1 Replies

7. Programming

kill() function problem in client-server ipc message using 2 FIFOs

I want to have a message send & receive through 2 uni-direction FIFO Flow of data FIFO1 stdin--->parent(client) writefd--->FIFO1-->child(server) readfd FIFO2 child(server) writefd2---->FIFO2--->parent(client) readfd2--->stdout I need to have boundary structed message... (3 Replies)
Discussion started by: ouou
3 Replies

8. Programming

Please help:program hang stuck there signal handling on POSIX Message Queue UNIX C programming

in a single main() function,so need signal handling. Use Posix Message Queue IPC mechanism , can ignore the priority and other linked list message,to implement the scenario: client:Knock Knock server:who's there client: Eric Server:Eric,Welcome. client:exit all process terminated ... (1 Reply)
Discussion started by: ouou
1 Replies

9. Programming

POSIX Message Queue Memory Allocation

Hi, I wanted to know whether the POSIX message queues are statically allocated memory by the kernel based on the parameters specified in the open or as and when we send messages, memory are allocated? Does the kernel reserve the specified memory for the message queue irrespective of whether... (1 Reply)
Discussion started by: sumtata
1 Replies

10. Programming

POSIX message queue mq_open directory

hello, I try to test the POSIX mq_open function on book unp like below: #include "unpipc.h" # include <mqueue.h> int main(int argc, char **argv) { int c, flags; mqd_t mqd; flags = O_RDWR | O_CREAT; while ((c = getopt(argc, argv, "e")) != -1) { ... (3 Replies)
Discussion started by: anpufeng
3 Replies
IPCS(1) 						     Linux Programmer's Manual							   IPCS(1)

NAME
ipcs - provide information on ipc facilities SYNOPSIS
ipcs [-asmq] [-tclup] ipcs [-smq] -i id ipcs -h DESCRIPTION
ipcs provides information on the ipc facilities for which the calling process has read access. The -i option allows a specific resource id to be specified. Only information on this id will be printed. Resources may be specified as follows: -m shared memory segments -q message queues -s semaphore arrays -a all (this is the default) The output format may be specified as follows: -t time -p pid -c creator -l limits -u summary SEE ALSO
ipcrm(1), ipcmk(1) CONFORMING TO
The Linux ipcs utility is not fully compatible to the POSIX ipcs utility. The Linux version does not support the -b and -o options, but does support the -l and -u options not defined by POSIX. The portable application shall not use the -a, -b, -o, -l, and -u options. AUTHOR
krishna balasubramanian (balasub@cis.ohio-state.edu) AVAILABILITY
The ipcs command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. Linux 0.99 9 October 1993 IPCS(1)
All times are GMT -4. The time now is 08:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy