LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > Fibers (rails, ruby 1.9) and SAPI

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2010, 06:37 AM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
Default Fibers (rails, ruby 1.9) and SAPI

Did you plan support Fibers in sapi?

What is Fibers? It is async no- blocking rails instances that can handle more that 1 request at the same time (no threads!).

More info you can get here: http://blog.envylabs.com/2010/07/no-...eads-ruby-1-9/

I tested it with Thin and works greate - from 0.5 req/s (slow action) i get to 2.4 r/s on ruby instance.

I'm consider to switch from sapi to thin if you not plan support it.
__________________
Grzegorz Derebecki
www: http://fdb.pl
Reply With Quote
  #2  
Old 08-12-2010, 11:16 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
This is a dramatic change in ruby/rails infrastructure, not sure it is can be mature enough and being adopted widely. After all, many code is not friendly with non-blocking mode. It is going to be disastrous if ruby blocked somewhere for some reason.

It could save on memory, but I am not sure it going to be really faster than profork mode, comparing one non-blocking ruby handling 10 concurrent requests to 10 prefork ruby handling 10 concurrent requests. The non-blocking ruby may not able to take advantage SMP server if only one instance is used.

We will see how it evolves then make decision on whether to provide a non-blocking LSAPI interface.
Reply With Quote
  #3  
Old 08-12-2010, 11:55 AM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
Quote:
Originally Posted by mistwang View Post
This is a dramatic change in ruby/rails infrastructure, not sure it is can be mature enough and being adopted widely. After all, many code is not friendly with non-blocking mode. It is going to be disastrous if ruby blocked somewhere for some reason.

It could save on memory, but I am not sure it going to be really faster than profork mode, comparing one non-blocking ruby handling 10 concurrent requests to 10 prefork ruby handling 10 concurrent requests. The non-blocking ruby may not able to take advantage SMP server if only one instance is used.

We will see how it evolves then make decision on whether to provide a non-blocking LSAPI interface.
Here is exemple app http://github.com/igrigorik/async-rails/
There is already mysql async gem, rack async (rack-fiber_pool) and http async.

I'm wonder if we can join prefork with fibers (lets say 4 rails process all supports async request).
__________________
Grzegorz Derebecki
www: http://fdb.pl
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:11 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.