by powertower · 14y ago · 0 comments
He might as well have benchmarked Apache against an FTP server.
Hitting the same HTML page/file over and over is not realistic. There is so much more to a web-server than this.
What you absolutely must do is benchmark a dynamic PHP-driven, with MySQL access, website. Because that's what Apache is mostly used for (rarely for file serving).
And I don't mean the first page only. But the entire website using a stress profile that mimics real world usage (including writing to the database).
Then you'll get results that mean something.
As it is right now, this test has only proven that Nginx can handle more concurrent requests for a single static file vs. Apache 2.4 (which is something we all already know to be true).
It's reasonable if you're trying to test concurrent connection limits.
"What you absolutely must do is benchmark a dynamic PHP-driven, with MySQL access, website."
That's something nginx is also used for, and it's far from the only thing apache is used for. I agree that would be a useful benchmark, but it's not the only meaningful one.
"you've only proven that Nginx can handle more concurrent requests for a single static file vs. Apache 2.4 (which is something we all already know to be true)."
No, we didn't know this. This was testing apache 2.4's new event [0] MPM [1]. Arguably we still don't know this, since this apache configuration seems artificially limited and there's no comparison of the resource usage of apache and nginx.
[0] http://httpd.apache.org/docs/2.4/mod/event.html [1] http://httpd.apache.org/docs/2.4/mpm.html
Next, if you want to test the PHP interfaces, you can do that, but this test setup was perfectly adequate for testing the speed of the daemon. (once the configuration issues are handled)
You eventually have to test the whole, not the part, unless you want to see benchmarks for useless/no-context metrics.
On the other hand I do realize its fun to see tests like this, and they can even give you a bit of insight... For example, that Apache now comes close to competing with Nginx on static loads, especially for larger files (9KB vs 54KB).