posix_mq RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* Max value for "msgmax"?
@ 2010-01-08  0:01 Iñaki Baz Castillo
  2010-01-08  0:11 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Iñaki Baz Castillo @ 2010-01-08  0:01 UTC (permalink / raw)
  To: ruby.posix.mq

Hi, after setting:

  sysctl fs.mqueue.msg_max=100

then I can not create queues:

  "`initialize': Cannot allocate memory - mq_open (Errno::ENOMEM)"

How could I know the max value? Why is so bad a value of 100?

Thanks.


-- 
Iñaki Baz Castillo <ibc@aliax.net>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Max value for "msgmax"?
  2010-01-08  0:01 Max value for "msgmax"? Iñaki Baz Castillo
@ 2010-01-08  0:11 ` Eric Wong
  2010-01-08  0:18   ` Iñaki Baz Castillo
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2010-01-08  0:11 UTC (permalink / raw)
  To: ruby.posix.mq

Iñaki Baz Castillo <ibc@aliax.net> wrote:
> Hi, after setting:
> 
>   sysctl fs.mqueue.msg_max=100
> 
> then I can not create queues:
> 
>   "`initialize': Cannot allocate memory - mq_open (Errno::ENOMEM)"
> 
> How could I know the max value? Why is so bad a value of 100?

It's probably because your user process doesn't have enough memory to
create that (check with "ulimit -q" in bash).  So 100 messages * 8192
bytes per message is probably 10x greater than the default of 81920
bytes.

You should probably create the queue as root with "posix-mq.rb".
Afterwards, it can be opened by any user (assuming approrpriate
permissions).

-- 
Eric Wong

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Max value for "msgmax"?
  2010-01-08  0:11 ` Eric Wong
@ 2010-01-08  0:18   ` Iñaki Baz Castillo
  0 siblings, 0 replies; 3+ messages in thread
From: Iñaki Baz Castillo @ 2010-01-08  0:18 UTC (permalink / raw)
  To: ruby.posix.mq

El Viernes, 8 de Enero de 2010, Eric Wong escribió:
> Iñaki Baz Castillo <ibc@aliax.net> wrote:
> > Hi, after setting:
> >
> >   sysctl fs.mqueue.msg_max=100
> >
> > then I can not create queues:
> >
> >   "`initialize': Cannot allocate memory - mq_open (Errno::ENOMEM)"
> >
> > How could I know the max value? Why is so bad a value of 100?
> 
> It's probably because your user process doesn't have enough memory to
> create that (check with "ulimit -q" in bash).  So 100 messages * 8192
> bytes per message is probably 10x greater than the default of 81920
> bytes.

Yes :)

 
> You should probably create the queue as root with "posix-mq.rb".
> Afterwards, it can be opened by any user (assuming approrpriate
> permissions).

Thanks a lot. 


-- 
Iñaki Baz Castillo <ibc@aliax.net>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-08  0:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-08  0:01 Max value for "msgmax"? Iñaki Baz Castillo
2010-01-08  0:11 ` Eric Wong
2010-01-08  0:18   ` Iñaki Baz Castillo

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/ruby_posix_mq.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).