On the Grails vs Rails benchmark
When Graeme’s Grails vs Rails Benchmark came out several days ago I was fully expecting a total bashing that usually accompanies such a post. Surprisingly though the response seemed pretty mild and even helpful in many cases. It was nice that Graeme took some of these suggestions to update his benchmark quickly.
When I asked how scalable is Ruby, I mentioned Mongrel but what really surprised me from reading Jared’s blog was that Mongrel isn’t multi-threaded. Maybe it is just because I’ve been in the Java world too long with having multi-threaded servers, but that seems a bit inefficient. It seems that if Mongrel is ‘the’ container to use then to really make Rails perform you would need some pretty good hardware (as in multiple CPUs) to make all those processes run. Maybe I’m wrong though.
Don’t miss anything, subscribe!
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Zed Shaw wrote a while back about why Mongrel is not by default multi-threaded.
The truth is that it’s more about ruby threading than Mongrel.
My understanding of what he is saying is this. Parallel threads in a Ruby
process (unless strictly co-operating) have the capability of destroying
each others dynamic environment. When classes are being extended and
method redefined at runtime, that is not managed on a per-thread basis.
It is done globally for the *process*. Anyway here is what he wrote
on Jun 5, 2006:
——————————
KATANA SUICIDE CONCURRENCY
I resisted doing this, but it’s going to come down sooner or later now
that François SIMOND figured it out. Mongrel was protecting the world
from the allow_concurrency “feature” but now it lets you kill yourself
in obscenely horrible ways.
If you set ActionController::Base.allow_concurrency=true in your
config/environments/* then Mongrel will *NOT* guard the Rails
Dispatcher. This means that you’ll get full threaded madness thrashing
your Rails controllers until they die horribly slicing themselves into
tiny little bits leaving you breathless with the destruction.
Mongrel will obnoxiously warn you about this, and people who try it will
NOT get support from me without mad amounts of dough. If you turn this
on, and your world comes crashing around your head, then I warned you.
Otherwise, go ahead and give it a try and see if that improves things
for you.
——————————
– Mike Berrow