Performance tuning for web servers
|
Benchmarks
To assess whether tuning activities make sense, it is necessary to have concrete statistics about the web server. The Apache web server has its own benchmarking tool named ab , which works directly via HTTP/HTTPS and is applicable to the web server of your choice.
The tester configures the number of requests (-n <requests> ) and the number of concurrent requests (-c <concurrency> ). An example is provided in Figure 1 above.
A more complex benchmarking tool, which also comes from the Apache Software Foundation is the Java-based Jmeter. Additional tools include curl-loader and httperf . Care is advised when using these tools in a production environment in order not to bring a system down through an unintended denial-of-service attack.
Operators of a PHP application should look at a PHP profiler like Xhprof . This is the only way to determine how many resources PHP and the accompanying database queries require.
Conclusion
The Apache web server remains the most universal web server on the market. The Apache server continues to hold its own as a solution among its contemporaries because of optimized configuration, a solid understanding of web applications, and sufficient working memory.
In any case, before exchanging Apache for another web server, it makes sense to hunt down bottlenecks that might form as the result of a web application. When a slowdown occurs, the HTTP server is usually not the cause. Instead, the culprit is often an extensive PHP application that generates large numbers of database queries.
Infos
- Netcraft Web Server Survey May 2015: http://news.netcraft.com/archives/2015/05/19/may-2015-web-server-survey.html
- Apache Benchmark tool ab: http://httpd.apache.org/docs/2.2/en/programs/ab.html
- Versioning /etc Directory with etckeeper: http://blog.schaal-24.de/server/etc-mit-etckeeper-versionieren/?lang=en
- PHP FAQ about a threaded MPM: http://php.net/manual/en/faq.installation.php#faq.installation.apache2
- Comparing Apache with a PHP-Module and Nginx with PHP-FPM: http://www.eschrade.com/page/why-is-fastcgi-w-nginx-so-much-faster-than-apache-w-mod_php/
- Apache third-party modules: https://modules.apache.org
- Nagios plugins for the HTTP-Server: https://exchange.nagios.org/directory/Plugins/Web-Servers/Apache
- Icinga and the Apache web server: https://exchange.icinga.org
- Percona Apache monitoring template for Cacti: https://www.percona.com/doc/percona-monitoring-plugins/1.1/cacti/apache-templates.html
« Previous 1 2 3 4 5 Next »
Buy this article as PDF
Pages: 6
(incl. VAT)