c10k paradigm

Alexandre Riveira alexandre at objectdata.com.br
Tue Apr 16 10:59:55 UTC 2013


Em 15-04-2013 19:34, Eric Wong escreveu:
Hi Eric,


* EventMachine (less memory and cpu usage)
I did a test  using a  core  with  ab-n  3000-c  1000 
http://127.0.0.1:3000/manager and  rainbows  with 3  workers,  
EventMachine  then 25%  cpu free  while  XEpollThreadPool  left only  
5%  free.

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

The application  that  runs on  rainbows  +  rails  is an Enterprise 
Resource Planning  ERP  to  support  e-commerce.  That same  ERP and  
e-commerce  rotate in the same  rainbows.  But  the conclusion  that 
ERP  is  best  run  with  XEpollThreadPool  (or EventMachine + pool 
threads),while the  site was  high competition  C10K  is  best  run  
with  EventMachine.A detail about e-commerce  is that  as much as 
possible  the pages  are cached.


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)?
I appreciate the help!


Alexandre Riveira

Em 15-04-2013 19:34, Eric Wong escreveu:
> Alexandre Riveira <alexandre at objectdata.com.br> wrote:
>> Em 15-04-2013 18:30, Eric Wong escreveu:
>>> Alexandre Riveira <alexandre at objectdata.com.br> wrote:
>>>> What is A better paradigm for C10K paradigm
>>>>
>>>>
>>>>  From what I'm seeing are the best:
>>>>
>>>> EventMachine (less memory and cpu usage)
>>> Not all DB adapters are fully non-blocking.  If you want to do uncached
>>> filesystem I/O, you'll either have to use threads or block, too.
>> would be possible to combine being EventMachine and Threads,
>> If the thread is blocked it would to anotherexample:
>>
>>   use :EventMachine, :pool_size => 50
> (top-posting corrected, Cc: to list re-added)
>
> 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
>



More information about the rainbows-talk mailing list