I have a small dynamic web site (Wordpress) that I run on a VPS.net server with 376MB RAM. Web serving is the only thing the server in question does, as I've offloaded the database to another geographically separate VPS node.
I'm stuck between running Apache 2 and nginx. Apache 2 is a royal RAM hog, but nginx is painfully slow on page loads.
So, I decided to objectively test each web server by hammering them both with a 30-second siege of 15 concurrent sessions from my database server. Here are the results when serving via Apache 2:
Code:
Transactions: 262 hits
Availability: 100.00 %
Elapsed time: 29.69 secs
Data transferred: 4.04 MB
Response time: 1.11 secs
Transaction rate: 8.82 trans/sec
Throughput: 0.14 MB/sec
Concurrency: 9.77
Successful transactions: 262
Failed transactions: 0
Longest transaction: 1.63
Shortest transaction: 0.86
And nginx/FastCGI:
Code:
Transactions: 150 hits
Availability: 100.00 %
Elapsed time: 30.14 secs
Data transferred: 2.56 MB
Response time: 2.34 secs
Transaction rate: 4.98 trans/sec
Throughput: 0.09 MB/sec
Concurrency: 11.67
Successful transactions: 150
Failed transactions: 0
Longest transaction: 3.06
Shortest transaction: 1.10
Apache is handling twice as many transactions per second than nginx. What gives? Is nginx just not that great at serving dynamic content?