Arie’s Blog

mod_rails vs thin vs ebb vs mongrel

April16

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

Performance

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.

10 Comments to

“mod_rails vs thin vs ebb vs mongrel”

  1. On May 23rd, 2008 at 22:05:10 28 mod_rails / Passenger Resources To Help You Deploy Rails Applications Faster Says:

    [...] It looks at Passenger’s memory use and how Passenger integrates with Apache (somewhat). mod_rails vs thin vs ebb vs mongrel – A comparison of four different Rails serving techniques. Ebb appears to have the edge. [...]

  2. On May 24th, 2008 at 05:05:01 Skiptree Thoughts » Blog Archive » mod_rails vs. thin vs. ebb Says:

    [...] when i thought it was safe to use thin…  here comes another performance analysis… Leave a [...]

  3. On May 29th, 2008 at 05:05:45 Dreamhost and mod_rails for your tiny Rails application | alex brie . net Says:

    [...] performance tests show it to be pretty fast, and it uses shared memory in a better way than mongrel, making it [...]

  4. On July 13th, 2008 at 18:07:05 Scott Motte » Blog Archive » Passenger (mod_rails) versus Thin on nginx Says:

    [...] Here’s a good post on Passenger versus Thin, and here is a better benchmark that includes thin on nginx. [...]

  5. On August 5th, 2008 at 21:08:37 Dinooz Says:

    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. On August 5th, 2008 at 23:08:45 Arie Says:

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

  7. On May 8th, 2009 at 15:05:28 ming Says:

    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. On May 8th, 2009 at 15:05:36 Arie Says:

    10000 requests with a concurrency of 10, and 10000 requests with a concurrency of 50.

  9. On May 19th, 2009 at 21:05:47 Brian Armstrong Says:

    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.

    Thanks!
    Brian

  10. On October 14th, 2009 at 18:10:24 vs Says:

    vs.

Email will not be published

Website example

Your Comment: