From: Charles Oliver Nutter Date: 2008-07-02T05:31:36+09:00 Subject: Re: Threads and Ruby ara.t.howard wrote: > one of the reasons this is true is that for a heavily threaded ruby > program (green threads) you end up with the entire process sometimes > blocked on io and the threads end up getting into a pattern where all of > them need to write at once - a kind of rhythm - with processes the > ability for the OS to schedule access to resources ends up staggering > the phase of execution so access is generally faster than it 'ought' to > be taking only TPS into account. Of course that's mostly a factor of Ruby's rather simplistic thread scheduling, which has a 10ms timeslice and a fairly basic selection algorithm. Obviously OS scheduling will be better/more advanced, but that applies equally well to native threads (like in JRuby). - Charlie