Live data from Hacker News

Web Framework Benchmarks

techempower.com

391–400 of 415 posts

Re: Web Framework Benchmarks

#391
post #118
post #110

Im surprised to see that Sinatra on JRuby often performs worse than Sinatra on MRI, while Rack on the other hand performs much better.

We were surprised by the sinatra-jruby tests as well. If you read our "expected questions" section, it's not clear to us why Sinatra's performance on JRuby was weak. We'd love to hear from a JRuby expert about how to address Sinatra's "wrong" looking numbers.

Yeah, the Sinatra numbers really ought to be more in line with the straight Rack numbers. Something's amiss.

Glad to see that on Rack, where I'd expect us to be fast...we are doing ok. On par with PHP (not a big thing to brag about, perhaps) and Play (worth bragging about, since it's Java/Scala end to end).

Obviously there's more work needed not just in JRuby but in the servers that server it and the frameworks that run on it. The slow performance of Rails here, for example, is largely Rails' fault.

But yeah...the sinatra numbers are wack.

Re: Web Framework Benchmarks

#392

It's interesting to note the time per request when you invert these. Even some of the most drastic differences (like Spring vs. Django) turn out to be the difference of a millisecond or two. That's pocket change in terms of user experience.

It is a good and interesting observation, but as the benchmarks approach real-world scenarios, the difference is more than a millisecond or two.

For instance, if you're running on EC2 hardware (which is common enough) and you're executing ~20 DB queries/request (which is probably, unfortunately, common enough), the difference between Java servlets and Rails is more like 10ms.

Then what happens when more than 89 real-world users start to hit your Rails server each second?

(Note: I really like Ruby and Rails. Much more so than Java and its offerings.)

Re: Web Framework Benchmarks

#393

Earlier quoted context omitted.

Preface: This post is going to come across as a Rails apologist piece, but please read the entire thing before you reach a conclusion. Please also consider that you could apply these same arguments to just about any of the high-level language based frameworks on the list. I use Ruby on Rails in my comparisons, but I'm a huge fan of Node.js, Python/Django, and Go. I fully respect the JVM family of languages as well. I…

Don't conflate Ruby with Rails. Ruby _is_ slow: http://benchmarksgame.alioth.debian.org/u32/benchmark.php?te... http://benchmarksgame.alioth.debian.org/u32/benchmark.php?te... and so is Python: http://benchmarksgame.alioth.debian.org/u32/benchmark.php?te... The only time Ruby or Python are fast is when the program is not running Ruby or Python but running some C code underneath. If your programs only consist of that,…

You should really check out Alex Gaynor's slide deck. Nothing I said disagrees with what you've said here, provided you take the entire thing in context.

Re: Web Framework Benchmarks

#394
post #137

This is exactly why I decided to use PHP for my startup. I have something along these lines that I hope to blog about in the coming weeks (I tested php-fpm on nginx/go/node.js/silk.js and php won by a landslide when it came to speed). I would love to see php-fpm on nginx included in this test.

When it comes to speed, considering you are using nginx, the way to go is using nginx as an app server not just fastcgi frontend. Lua-nginx-module combined with proper database module (async with connection pool support like ngx_drizzle or ngx_postgres) can give you speed. OpenResty provides the simplified preconfigured way to try it and adds some features too. http://agentzh.org/misc/slides/libdrizzle-lua-nginx

Re: Web Framework Benchmarks

#396
node.js is single threaded and EC2 large instance has 4 CPUs. So to be fair you must either:

a) bench on a single core processor (a small EC2 instance)

b) configure node.js as a cluster with as many instances as processors.

Re: Web Framework Benchmarks

#398

This is super awesome. I wish Yesod/Warp was available though :)

I've just send a pull request[1] with an Yesod implementation.

It runs pretty well, scoring similar to webgo for the JSON pong benchmark, is almost at the same level as grails for the 1 query benchmark and is slightly faster that Play for the last benchmark.

So, Yesod is in the same performance gap as Play or Grails, and is 3~4x faster that Django or Rails.

But I've tested those on a mono-core Virtual Box, and I know Yesod scales pretty well on a multi-threaded environment.

Also, keep in mind that most of the top performing frameworks are not fully featured web framework but asynchronous I/O libraries (netty, go, nodejs, vertx, ...) which implementations just write mindlessly the raw response directly on the socket whatever the HTTP request was.

[1] https://github.com/TechEmpower/FrameworkBenchmarks/pull/39

Re: Web Framework Benchmarks

#399

This is super awesome. I wish Yesod/Warp was available though :)

I've just send a pull request[1] with an Yesod implementation. It runs pretty well, scoring similar to webgo for the JSON pong benchmark, is almost at the same level as grails for the 1 query benchmark and is slightly faster that Play for the last benchmark. So, Yesod is in the same performance gap as Play or Grails, and is 3~4x faster that Django or Rails. But I've tested those on a mono-core Virtual Box, and I know…

Thanks, Raphaelj! Pat (pfalls) will be in touch if he has any questions. Really appreciate the contribution!
Post reply on HN