posix_mq RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: ruby.posix.mq@librelist.com
Subject: Re: "mode" and varios processes sharing the same queue for writting
Date: Sat, 9 Jan 2010 23:55:31 +0100	[thread overview]
Message-ID: <201001092355.31532.ibc@aliax.net> (raw)
In-Reply-To: 20100109194851.GA7480@dcvr.yhbt.net

El Sábado, 9 de Enero de 2010, Eric Wong escribió:
> > It's really great for me. It works really well by having different
> > writers  processes and different reader processes sharing the same mqueue
> > (load balancing out of the box) :)
> 
> Good to know, I've yet to test them under high load myself :)

I've done some benchmarks as follows:

- Unicorn with 8 workers and each worker also writting in a shared mq 
(maxmsg=50) for each HTTP request (non-blocking writting).

- Other 8 processes acting as mq readers in parallel (blocking reading). For 
each message the reader simulates some work by sleeping during 0.002 seconds.

- Apache ab test with 5000 requests and concurrency 10.

With these settings there are no errors (the queue is always available). By 
incrementing a bit the sleeping time then some errors occur since the queue 
buffer gets full sometimes (totally expected of course).

But the more great thing is the fact that each mq reader process receives a 
similar ammount of messages, so the kernel gives us a perfect load balancing 
system :)



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

      reply	other threads:[~2010-01-09 22:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-08 11:12 "mode" and varios processes sharing the same queue for writting Iñaki Baz Castillo
2010-01-08 11:27 ` Iñaki Baz Castillo
2010-01-08 13:25 ` "mode" and varios processes sharing the same queue for writting [SOLVED] Iñaki Baz Castillo
2010-01-08 19:52 ` "mode" and varios processes sharing the same queue for writting Eric Wong
2010-01-09 17:24   ` Iñaki Baz Castillo
2010-01-09 19:48     ` Eric Wong
2010-01-09 22:55       ` Iñaki Baz Castillo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/ruby_posix_mq/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201001092355.31532.ibc@aliax.net \
    --to=ibc@aliax.net \
    --cc=ruby.posix.mq@librelist.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).