On Aug 16, 2009, at 6:51 PM, MaurĂ­cio Linhares wrote:

>
> On Sun, Aug 16, 2009 at 10:47 PM, s.ross<[email protected]> wrote:
>>
>> Why do you say this? Most request/response cycles are so quick that
>> they are unlikely to benefit significantly from multithreading. How
>> "huge" a win is multi-threading in the timespan of ... say ... <  
>> 30ms?
>>
>
> It's a HUGE win 'cos if you have a machine with multiple processing
> cores (something that's as common as a keyboard and a mouse nowadays)
> your server can benefit from them without a separate process and all
> the monitoring/memory/OS footprint that this solution carries.
>

It's a huge win if you have blocking tasks. It's not if you have tasks  
that cannot be parallelized. My point is that a good deal of the stuff  
you do between when you get a request and when you serve a response is  
done in a linear manner. If you were going out and foraging among  
several Web services to create a composite response then fine,  
multithread away.

Multithreading is just peachy for systems where orthogonal bodies of  
work can be isolated into threads and run at their own pace and/or  
block on external dependencies like IO, to coalesce when possible. For  
example, finding and formatting a bunch of data and populating a  
listbox in a client app without freezing the UI. But such  
orthogonality is seldom, in my experience, found in that brief instant  
between a user request and the time the response must be issued.

So my question is still: How much of a practical (not theoretical) win  
is MT for a Web application and does the J in JRuby really increase  
the win over green threads for this brief a set of tasks?

Just asking...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to