Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
To: Rainbows! list <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Subject: Re: c10k paradigm
Date: Tue, 16 Apr 2013 17:24:17 +0000	[thread overview]
Message-ID: <20130416172417.GA12658@dcvr.yhbt.net> (raw)
In-Reply-To: <516D338C.9060408-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>

Alexandre Riveira <alexandre-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org> wrote:
> Em 15-04-2013 19:34, Eric Wong escreveu:
> >Yes, you would use EventMachine.threadpool_size = 50, though, with
> >Rainbows::EventMachine::TryDefer
> >
> >http://rainbows.rubyforge.org/Rainbows/EventMachine/TryDefer.html
> >
> >I forgot about this, not sure if it's used much, but "app.deferred?" is
> >an ad-hoc extension which Thin also supports
> * EventMachine (less memory and cpu usage)
> I did a test  using a  core  with  ab-n  3000-c  1000
> and  rainbows  with 3  workers,
> EventMachine  then 25%  cpu free while  XEpollThreadPool  left only
> 5%  free.

With Matz Ruby, XEpollThreadPool is only a win if much of your
code/extensions releases the GVL (or if you don't feel like porting
your code to take advantage of EM).

> *EventMachine.threadpool_size = 50
> I found  this code  and run  perfectly.  But  he has  a kind of lock
> slowness  as if using  XEpollThreadPool  but memory consumption  was
> lower.  Wonder  you can put  some  of the  rails Controllers  work
> by  EventMachine  without using  threads  while others  controlles
> using  threads.  Explain  the need.

"lock slowness" - which version of Ruby is this?

Did you modify your app to use app.deferred? + TryDefer as I pointed
you to in the other message?

> Could it be that  the controllers  of the  rails  would run without
> party  pool  threads  only with  EventMachine  (C10K) while others
> would use the  controller  with  EventMachine thread pool  (erp)?

That should allow some rails controllers to use threads
(app.deferred? => true) while others do not use threads
(app.deferred? => false).  Keep in mind this is not a very common
configuration, so not many people have experience with it in
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
Do not quote signatures (like this one) or top post when replying

  parent reply	other threads:[~2013-04-16 17:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-15 11:45 c10k paradigm Alexandre Riveira
     [not found] ` <516BE872.5060006-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>
2013-04-15 18:30   ` Eric Wong
     [not found]     ` <516C2A48.3070808@objectdata.com.br>
     [not found]       ` <516C2A48.3070808-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>
2013-04-15 19:34         ` Eric Wong
     [not found]           ` <20130415193403.GA742-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2013-04-16 10:59             ` Alexandre Riveira
2013-04-16 11:18             ` Alexandre Riveira
     [not found]               ` <516D338C.9060408-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>
2013-04-16 17:24                 ` Eric Wong [this message]
     [not found]                   ` <20130416172417.GA12658-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2013-04-16 15:11                     ` Alexandre Riveira
     [not found]                       ` <516D6A0C.50406-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>
2013-04-16 18:35                         ` Eric Wong
     [not found]                           ` <20130416183500.GA10540-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2013-04-16 17:19                             ` Alexandre Riveira
     [not found]                               ` <516D882B.4070402-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>
2013-04-16 20:48                                 ` Eric Wong
     [not found]                                   ` <20130416204813.GA15083-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2013-04-16 20:27                                     ` c10k paradigm [SOLVED] Alexandre Riveira
2013-04-16 18:19                     ` c10k paradigm Mark J. Titorenko
     [not found]                       ` <37F3CDA5-C42E-4B91-A74F-E748B956D6BF-Tt5uHDgV0oUB085IDyDbTA@public.gmane.org>
2013-04-16 15:45                         ` Alexandre Riveira
     [not found]                           ` <516D7237.6000700-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>
2013-04-16 19:00                             ` Mark J. Titorenko

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:

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

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

  git send-email \
    --in-reply-to=20130416172417.GA12658@dcvr.yhbt.net \
    --to=normalperson-rmlxzr9ms24@public.gmane.org \
    --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \


* 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


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).