Comparing OS kernels
One man's 'magic' is another man's engineering.
G-WAN is much faster on Linux (Debian Desktop) than on Windows (Vista)
A few months ago, G-WAN redefined the Web performers hierarchy on Windows. But now (December 2009), G-WAN v1.0.6 is also faster than all on Linux – and raising interesting questions.
ApacheBench compared* G-WAN (100 KB), IBM Apache, Accoria Rock (specweb 2008/2009 winner) and Microsoft IIS:
Why G-WAN/Linux does not dwarf all other HTTP servers like on Windows?
- Linux does not slow-down applications like Windows does with its 300% user-mode overhead; this explains why everybody is faster on Linux, and why, on Windows, all (but G-WAN) are slower than IIS 7.0 in the kernel;
This explains why the gap between G-WAN/Linux and other servers is smaller than on Windows (where reaching kernel's performances is much harder).
At concurrency 1,000 G-WAN uses only 4% of the CPU** while Accoria Rock consumes +90% of the CPU (22.5x more) to process 1.6x less requests.
Also, getrusage() tells that G-WAN uses only ~1%** of this 4% CPU load while the kernel uses the other 99%. If G-WAN was 10x slower, its performances would be identical (it would not be the case for Rock).
Well-known Hardware and OS designs erected this wall. G-WAN just reveals how large the CPU/memory and CPU/IO progression margins are.
(*) ab and HTTP servers were run on the same Ubuntu 8.1 32-bit host (using this C code to launch ab) in order to compare their relative CPU efficiency: ab -k -c 1 -t 1 http://10.10.2.6/100.html; At concurrency 970 Rock went wild on the CPU with a ~100% load. Tunable options: no log files, accept_max=1024, keepalive_max=10,000.
(**) Start gwan. Start 'ab -n 1000000 -c 1000 -k http://10.10.2.6/100.html'. When ab has finished, press Ctrl+C to stop gwan (it displays user-mode and kernel-mode times).
NB: Rock is 6.4x slower than G-WAN for 404 errors: 'ab -n 1000000 -c 1000 -k http://10.10.2.6/I_do_not_exist.html'.