Apache vs Nginx : Web Server Performance Deathwatch

8 views
Skip to first unread message

Thiwanka Lahiru

unread,
May 31, 2011, 1:57:53 AM5/31/11
to Sri-Lanka-We...@googlegroups.com



Apache vs Nginx : Web Server Performance Deathwatch

8:19 pm in Linux, Uncategorized by joe

Deathmatch may be an overstatement but here are the results from some performance benchmarking.

The Setup:

Server:

  • CENTOS 5.1
  • Dual 2.4GHz Xeon CPUs
  • 4GB RAM
  • RAID5 (4 x 15k disks)
  • Server and test client were connected via a consumer grade 10/100 switch

Configurations:

  • Basic static vhost
  • Keepalive turned on and with timeout of 15 seconds
  • GZIP turned on

I used autobench to perform the tests. Basically this is a perl script that sits on top of httperf and will run multiple tests in succession outputing the results to CSV. Awfully convenient.

All the tests were run against the same robots.txt file. Autobench ran the following command 20 times incrementing the request rate by 10 each time. I started at 10 requests per second and went up to 200.

httperf –timeout=5 –client=0/1 –server=HOST –port=80 –uri=/robots.txt –rate=X –send-buffer=4096 –recv-buffer=16384 –num-conns=5000 –num-calls=10

I performed two samples and arbitrarily used the second as the results shown here. At the bottom of this post I will have spreadsheet containing the data from these tests so you can check out all the results.

The Results:


2298818585_3baeeeb8a7.jpg

Both web servers performed well in all the tests and had no issues completing the requests. So I will not mention the metrics that they finished very closely on, only the ones that they did not have similar results.

There were three httperf related tests that Nginx and Apache differed on more than small amount, reply rate, network I/O and response time.


More information

http://www.joeandmotorboat.com/2008/02/28/apache-vs-nginx-web-server-performance-deathmatch/




Best Regards-

Thiwanka Rupasinghe
☆☆☆☆☆ - senpathi.com |
rooms.lk

0777 699 776


2298818585_3baeeeb8a7.jpg
Reply all
Reply to author
Forward
0 new messages