Async frameworks “Hello World” showdown
Posted in: Programming, By: SaltwaterC, At: May 12th, 2012
This is not intended to be a proper comparison between these frameworks. However, since the “Hello World” test is the lowest common denominator, it is a pretty clear indicator that an application can’t exceed in performance these numbers. Also, what Guillermo did not understand from my comment is the fact that 1000 requests at the concurrency of 10 is way to few for get a proper picture of a “Hello World” showdown.
Tested frameworks:
- node.js – v0.6.17
- vert.x – v1.0 final + OpenJDK 7 installed from the Ubuntu repository – using the JavaScript bindings
- luanode – built from the master branch using the Ubuntu provided lua dependencies
- luvit – built from the master branch
I also wanted to test node.native, but it kept crashing on me. You can see that it is a pretty old issue. I didn’t have the patience to make the v0.1.0 branch to work with the previously used code. But I’d like to give it a run for its money.
The system used for the testing is a modest Athlon II X2 240e (2.8GHz) with 4GB or DDR2 800MHz running the latest Kubuntu 12.04 LTS amd64. Since ab pretty much takes a CPU core for itself, the frameworks ran a single process that occupied a single CPU core. I tried running a node.js HTTP server wrapped with the cluster module. Or passing -instances 2 to the vertx framework. The results were pretty much the same, therefore using just a single CPU core is a fair comparison.
The ab command that I used to hammer the Hello World! output:
ab -r -k -n 1000000 -c 1000 http://127.0.0.1:{port_name}/
The command ran at least a couple of times before saving the results. Just to make sure that everything is properly warmed up.
The averages graph:
The test sources and full ab output is available on this gist. There’s interesting output in the results.txt file for the stats nerds.
