On Aug 18, 3:58 pm, pharrington <[email protected]> wrote:
> On Aug 18, 3:59 pm, Charles Oliver Nutter <[email protected]> wrote:
>
> > Multithreading in JRuby doesn't mean you need to write multi-threaded
> > Rails apps; it means you get to take advantage of Rails thread-safe
> > mode (2.2+) to shove as many requests as you possibly can through a
> > single instance. No other Ruby implementation can do that.
>
> What prevents this from working properly in Ruby 1.9?

Ruby 1.9 has a "giant lock" that prevents threads from running in
parallel. So even though they're native, you'd still need 16 processes
to utilize 16 cores fully. The only implementations to support actual
parallel-executing threads are JRuby, IronRuby, and MacRuby. Of these,
only IronRuby and JRuby run Rails. Of these, only JRuby is production-
ready and fast.

Ruby 1.9 *may* also suffer from issues common to other GIL-based
systems like Python (giant interpreter lock), since you start to have
the OS scheduler and the GIL scheduler fighting each other. Here's a
good presentation on the issues in Python:

http://blip.tv/file/2232410/

- Charlie
--~--~---------~--~----~------------~-------~--~----~
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