mod_rails vs thin vs ebb vs mongrel

With the recent release of mod_rails, I thought it was time for yet another benchmark. Mod_rails aims to make deployment of RubyOnRails applications comparable to deploying a PHP application on a shared host.

The contestants

mod_rails (Apache 2.2.8)

Thin 0.8.0 (Cluster of 4 behind nginx 0.5.33, both TCP and Unix socket)

Ebb 0.1.0 (Cluster of 4 behind nginx 0.5.33)

Mongrel 1.1.4 (Cluster of 4 behind nginx 0.5.33)

The benchmark is the index page of Leef je doel, the hardware used is a Dell D830 laptop with a T7300 (speedstep disabled), 2GB of RAM and a 7200RPM harddisk. The page runs a few queries and also serves a lot of fragments from memcached.

The results

-n 10000 -c 10
-n 10000 -c 50
mod_rails 79.2 77.4
thin(tcp) 84.22 84.06
thin(socket) 86.4 87.65
ebb 93.2 91.2
mongrel 79.22 75.92


Like my previous test, Ebb comes out on top, closely followed by Thin.

Using the default Apache2 config supplied by Ubuntu, mod_rails shows performance equal to mongrel_cluster behind nginx. I’m sure that by tweaking the Apache config files, some performance can be gained.

Compared to setting up nginx and thin/ebb/mongrel, setting up mod_rails is a lot simpler. Have a look at their screencast to see how easy it is, if you have a working Apache2, you’ll have mod_rails up and running within minutes. There are some small issues with mod_rails at the moment, for a list, check mod_rails’ Google Code page.

13 thoughts on “mod_rails vs thin vs ebb vs mongrel

  1. Pingback: 28 mod_rails / Passenger Resources To Help You Deploy Rails Applications Faster

  2. Pingback: Skiptree Thoughts » Blog Archive » mod_rails vs. thin vs. ebb

  3. Pingback: Dreamhost and mod_rails for your tiny Rails application | alex brie . net

  4. Pingback: Scott Motte » Blog Archive » Passenger (mod_rails) versus Thin on nginx

  5. I wonder what is the memory usage on the server, what would be more effective many Thin processes behind Apache load balancer or a single Apache with lots of child processes ???

  6. I wouldn’t recommend Apache at all for serving Thin. Nginx is a lot more efficient at serving static files and load balancing.

  7. Could you explain what means
    -n 10000 -c 10
    -n 10000 -c 50

    Maybe some update for mod_rails + nginx? :)

    Thx for your work!

  8. Good info thanks! I’m very curious to see what the memory usage was on these though??

    I would happily sacrifice 10% in speed if it meant half the memory usage or something similar.


  9. I didn’t understand and haven’t learned either ruby or its framework rails. But really read the mongrel and thin servers several times. are those server softwares dedicated to the ruby web application? can there be load-balancer for the web applications based upon other language?

  10. Thin and Mongrel are just Ruby webservers, not load balancers.

    If you need a general load balancer, look at Apache2’s mod_proxy or nginx.

  11. Pingback: Dreamhost and mod_rails for your tiny Rails application - Alex Brie : hack the day

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>