Blog / Benchmark4
Hello this is another set of benchmarks of the hinsightd webserver. Again hinsightd v0.10 is a multithreaded server and the current branch under active development while hinsightd v0.9 is a singlethreaded server with more features but also more bugs.
What we test here is how fast the server responds to increases in concurrent connections. While this is not a perfect metric for servers, a webserver that can respond to more requests in a given time period is not only more likely to resist a DDoS attack but you can also add more processing per request before the delays become noticeable. Please consult a full list of features before deciding which webserver to use for your own site.
Testing a small 102 bytes file. This tests how fast a server can open a connection, parse headers, and close the connection, nothing that impressive. But it should be noted the multithreaded branch is the fastest server tested.
|index.html -c 50||93850.01||127296.1||117020.65||56887.03||40069.56||37654.71|
|index.html -c 100||95571.23||121204.78||114876.51||56396.17||41065.91||36727.71|
|index.html -c 250||90076.29||106621.17||106724.72||53473.93||38698.64||35235.71|
|index.html -c 500||78003.12||91496.33||91003.4||50046.54||35879.2||33626.33|
|index.html -c 750||71083.31||83508.7||82136.87||50651.63||35209.66||32187.05|
|index.html -c 1000||66276.52||77152.16||76078.6||48633.87||33906.01||31376.68|
For a more realistic test, the current jquery library, a 89.7kB minified js file. Unfortunately my server doesn't support sendfile so to make the test 'fair' I've disabled it across the board. I actually believe without sendfile this is a more realistic benchmark because in the web development world of today you rarely have unencrypted or uncompressed connections. This should test how fast a server is able to get data from the disk and push it to the http client with minimal changes.
In previous benchmarks (and in the 0.9 branch) the lack of TCP CORK flag really slowed down everything, adding support for it vastly improved performance but it's still under other servers. Further research and optimization needed.
|jquery.js -c 50||2103.32||28276.54||36029.15||18746.64||26397.06||28822.85|
|jquery.js -c 100||3288.06||27483.85||32395.48||18618.75||27594.5||28424.11|
|jquery.js -c 250||5974.85||25550.88||31045.68||18116.5||24566.16||27583.62|
|jquery.js -c 500||10033.39||23537.39||30233.58||17595.81||23997.39||26233.43|
|jquery.js -c 750||10200.92||21585.31||29622.17||17745.63||23632.95||25614.69|
|jquery.js -c 1000||9777.69||21598.88||28680.33||17556.98||23047.9||24684.84|
index.html via ssl
While I would like to benchmark SSL connections, previous tests proved that without a secondary machine this is impossible, testing SSL connections is very CPU intensive so without another machine it just tests how fast the benchmark software can create connections on a CPU bottlenecked system, not very useful data.
If you find these tests useful a more comprehensive set of tests and benchmarks is include with the source code in the external/tests directory.
- tests were ran on a 4 core machine with no hyperthreading. hinsightd 0.10.1 and nginx have 4 workers/threads enabled the rest are left at the default.
- tests are run 6 times for each concurrency level and only the highest result is taken into account.
- both hinsightd branches are using the current HEAD.
- nginx config
- lighttd config
- the apache2 config is too complicated to post, but it's the distribution default.
- caddy config