|
G-WAN is a FREE Web (application) server with ANSI C scripts.
G-WAN is faster on Linux (Ubuntu) than on Windows (Vista)
A few months ago, G-WAN redefined the Web performers hierarchy on Windows.
Now, G-WAN is also faster than all on Linux -and raising interesting questions.
ApacheBench (ab) compared* G-WAN (100 KB), IBM Apache and Accoria Rock (the official specweb 2008/2009 champion):
HTTP Keep-Alives:
No HTTP Keep-Alives:
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;
- Linux is faster, but it has also its limits. As G-WAN takes much less CPU time than the kernel to operate (all other servers consume much more CPU time), the Linux kernel is a bottleneck only for G-WAN.
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=1000, G-WAN uses only 4% of the CPU** while Rock needs +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).
With a 90% CPU load, Rock takes (90-4)/4=21x more time than the kernel and is therefore thousand times (21x100) slower than G-WAN. Linux only shows a 1.6x difference between G-WAN and Rock because, while Rock is slowing-down the kernel, G-WAN is slowed-down by the kernel.
Would the kernel let G-WAN saturate the CPU, G-WAN would theorically process 25x (4%x25=100%) more requests per second (while Rock could only add 10% to its score since it already uses +90% of the CPU resources).
Well-known Hardware and OS designs erected this wall. G-WAN just reveals how large the CPU/memory and CPU/IO progression margins are.
Solaris will tell us (soon) how much an OS can make the difference -and if a better designed hardware platform is required to let G-WAN saturate a CPU.
(*) ab and HTTP servers were run on the same 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/Idonotexist.html'.
|