At Fri, 7 Sep 2007 15:39:33 -0700,
Ezra Zygmuntowicz <[EMAIL PROTECTED]> wrote:
> […]
>
> > On 9/7/07, Erik Hetzner <[EMAIL PROTECTED]> wrote:

> […]

> >> I know why we are getting greater performance, and again, I don't
> >> think it's artificial. But, in any case, it was a demonstration,
> >> mostly for the original responder, who claimed that you would never
> >> get more performance from Ruby threads.
>
> Yeah I actually said that you would never get more performance out of
> one mongrel running 10 threads then you would with 10 mongrels
> running one thread. Just to clarify ;)

My apologies for misquoting you, and also apologies for referring to
you as ‘the original responder’ - a bit rude, really. :) Here is your
original message:

> Hey Roger-

> No it would not be as fast at all. Current ruby threads are green
> threads, meaning that they do not use native OS threads so there is
> no real parallel execution. Ruby has an internal timer and just
> switches between threads really fast. So 10 mongrels will trounce
> one thread safe mongrel.

> Ruby 1.9, Jruby and Rubinius will eventually have native threads and
> may make this situation better but for now such is life.

I’ve just tested this on my uniprocessor machine. 10 single-threaded
mongrels of my sample sleep + fibonacci web server, balanced behind an
apache load balancer, versus 1 multithreaded mongrels without a load
balancer. The performance, in terms of requests/second, is almost
identical.

best,
Erik Hetzner
;; Erik Hetzner, California Digital Library
;; gnupg key id: 1024D/01DB07E3

Attachment: pgpJWAodDO4h3.pgp
Description: PGP signature

_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to