Somebody asked similar question earlier i guess...why run multiple instances of mongrel..when it is threaded?
The simple answer is...ruby threads are not native threads.And hence..all the ruby threads are running your current interpretor.

Also, if you have multi-core CPUs..you won't be able to take advantage of that with single mongrel process..even though it is threaded and hence in production mode....you should run 8 to 10 mongrel servers( as per official documentation,but depends upon your hardware and hit rate)

Again..i could be wrong..but thats my humble opinion.

On 9/4/06, Kirk Haines <[EMAIL PROTECTED]> wrote:
On 9/4/06, Kris Leech <[EMAIL PROTECTED] > wrote:
> Jeroen Houben wrote:

> >My understanding is that one mongrel can only handle one request at a
> >time. Therefore 3 mongrel can process 3 request simultaniously.
> >
> >
> I see, and this is because Mongrel is not threaded, so its kind of like
> replicating threads by using whole instances.

Mongrel is threaded.  It will create a new thread for each connection.
However, Rails does bad, unfriendly things when one tries to run
multiple threads of it at the same time.  So the Mongrel handler for
Rails synchronizes Rails calls so that only one runs at a time.  Thus,
to handle simultaneous Rails requests with Mongrel one needs more than
one Mongrel process.


Kirk Haines



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



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

Reply via email to