[AWS] Praise - and a very simple (and early) benchmark.
Emmanuel Briot
briot at adacore.com
Fri Jan 21 16:35:44 CET 2011
A follow up to Thomas's benchmark.
I did a test with a hello world server written in node.js (a javascript
framework for writing faster servers). It has the reputation of being very fast.
I compared with the hello world demo provided with AWS, compiled with -O2.
The demo was modified to use 50 threads (Node.js behaves differently, because
all user code runs in a single thread -- you perform actions like reading a
file, querying a database,... asynchronously and when that operation is done
Node.js calls back your code, still in a single thread). In that respect,
Node.js is simpler to configure since you do not have to configure the number of
maximum connections you can accept, something which is hard to estimate with AWS.
Ada code also modified to return the same message as Node.js ("Hello World!")
Benchmarking was also done using the Apache Benchmark (ab2), running 1000
queries, 100 at a time.
---------------------
Here are the results for node.js
Document Length: 12 bytes
Time taken for tests: 0.143 seconds
Complete requests: 1000
Total transferred: 76000 bytes
HTML transferred: 12000 bytes
Requests per second: 7007.12 [#/sec] (mean)
Time per request: 14.271 [ms] (mean)
Time per request: 0.143 [ms] (mean, across all concurrent requests)
Transfer rate: 520.06 [Kbytes/sec] received
--------------------
And the results for AWS
Document Length: 12 bytes
Time taken for tests: 0.189 seconds
Complete requests: 1000
Total transferred: 174590 bytes
HTML transferred: 12324 bytes
Requests per second: 5299.95 [#/sec] (mean)
Time per request: 18.868 [ms] (mean)
Time per request: 0.189 [ms] (mean, across all concurrent requests)
Transfer rate: 903.63 [Kbytes/sec] received
Although AWS has a faster transfer rate, it is actually slower than a server
written in javascript (fewer requests per second and time to process the
requests longer).
The strange thing is the amount of text that is transfered by Node.js compared
to that of AWS. I suspect AWS loses time formatting headers correctly, whereas
Node.js (in this basic hello_world demo) doesn't waste time with it. Maybe this
accounts for the different, but it might be interesting to investigate if
someone feels up to it.
More information about the AWS
mailing list