StatusCode: Our Weekly Programming Newsletter. You're not just a Rubyist, you're a software developer, right? :-) Check out StatusCode Weekly, our language and architecture agnostic newsletter that covers the biggest news across the entire software development world.

RubyFlow The Ruby and Rails community linklog


The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Popular Ruby web framework benchmarks!

The Padrino Team was frequently asked about how our framework stacks up ‘speed-wise’ to existing alternatives. Even though we are not benchmark fans (usually too misleading), we pitted the major ruby frameworks against each other in three key benchmark tests. The benchmark implementation and results are available at the benchmark github repo. Please help us improve these if you can!


In case this isn’t clear, the actual results for each benchmark are found with the benchmark implementation in the three ‘non-master’ branches. The closest thing to a ‘real-world’ test would be the more_advanced branch.

how is padrino faster than sinatra when padrino is a layer on sinatra?

Good question anon! The answer is that Padrino uses a more sophisticated and efficient router called Usher and we do more ‘intelligent’ caching of routes, templates and layouts among other optimizations we perform that Sinatra does not.

Consider that for example sinatra check fo static files and log request (also for production env) or try to check layout (also if not exist) for each request.

Nothing that cannot be resolved with few code, but as we say in our readme we compare frameworks without special optimizations.

would be interesting (and matter of discussion) include Django and others frameworks in the benchmark…:)…

From my experience, Rails is faster than Django in my real-world test (this was with both in production mode under Apache, rails w/ mod_rails, django w/ mod_python, doing the same task displaying a simple gallery of images, pulling image filenames from MySQL). I’d love to see some benchmarks to prove me wrong though.

i used to go gaga over performance numbers until I deployed actual apps. the reality is you rarely get the same performance numbers in production because of the latency of the internet. for example, locally i can serve a static page with nginx at around 7000 req/sec. when i test this on my VPS, i get 600 req/sec. neither the CPU nor memory is maxed out, it’s just the nature of the web. you can drive a Ferrari, but when you’re on the freeway with traffic, you will not be faster than a corolla. this framework looks like a keeper though.

Yep, Mark I agree.

From our readme:

no one on our team is a big fan of benchmarks since they can often be misleading and real world usage is generally quite different.

Yes, I absolutely agree as well. Benchmarks don’t mean much in in terms of real world deployments since the bottlenecks in reality tend to be latency, data retrieval and other things not related to the framework. We did these purely as an exercise because we kept getting asked the question.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in