Benchmark: Monkey v/s GWan in a Linux 64 bit platform

Monkey aim to empower embedded devices but on this time we have benchmarked against a closed source web server named GWan in a Linux x86_64 system.

Introduction

Monkey is known as a lightweight HTTP web server and stack which hits a huge performance due to it architecture and carefully design. On these benchmarking series we are testing Monkey on different platforms against other web solutions available.

GWan is a free but closed source web application server, it claims to be 3-4x times faster than open sources solutions such as NginX or Lighttpd.

Environment

Intel board, some details:

  • Kernel : 3.2.0 - x86_64
  • CPU : Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz (4 cores)
  • RAM : 8 GB
  • Filesystem: ext4 on a SATA disk

The target HTTP servers are:

  • Monkey web server 1.1.0 (development branch)
  • GWan 3.3.28

The benchmarking tool used is Siege, it uses asyncrhonous sockets to perform the tests so it have a low latency compared with Apache Benchmark, so it provide more accurate results. The test is performed with the following command:

$ siege -b -t10S -c500 http://localhost:PORT/linux.jpg
We set the benchmarking mode and during 10 seconds, Siege will scale up to 500 concurrent clients which will perform as many request as it can over the file linux.jpg (200KB jpeg image).

Monkey have configured and compiled from sources, for GWan we are using the binaries provided in their web site.

Results

After the test over each HTTP server, Siege have provided the following results:

    Monkey v1.1.0-dev
    Transactions:		       29832 hits
    Availability:		      100.00 %
    Elapsed time:		        9.25 secs
    Data transferred:	     5751.94 MB
    Response time:		        0.15 secs
    Transaction rate:	  3225.08 trans/sec
    Throughput:		      621.83 MB/sec
    Concurrency:		      485.78
    Successful transactions:       29832
    Failed transactions:	           0
    Longest transaction:	        1.38
    Shortest transaction:	        0.00
    
    GWan 3.3.28
    Transactions:		       23235 hits
    Availability:		      100.00 %
    Elapsed time:		        9.13 secs
    Data transferred:	     4479.96 MB
    Response time:		        0.19 secs
    Transaction rate:	    2544.91 trans/sec
    Throughput:		      490.69 MB/sec
    Concurrency:		      480.86
    Successful transactions:       23235
    Failed transactions:	           0
    Longest transaction:	        1.63
    Shortest transaction:	        0.00
    

Monkey was capable to serve the linux.jpg file 3225.08 times per second and GWan only 2544.91, that means that Monkey is ~12% faster serving static content than GWan in a Linux x86_64 box.

This is a great result as it reflects that even Monkey is focusing on embedded devices, it can perform pretty well in high production environments. Is good to mention that Monkey is NOT caching any content of the requested file and is doing a great optimization of the system resources.


Disclaimer

The test was made in localhost mode, which does not reflect a real internet environment, so under different circumstances re results could be different. The localhost test helps to determinate how the server perform over a high load as it reduces the TCP and networking overhead in general.