Howto optimize Apache and PHP for performance

by on May 28, 2007 · 4 comments· LAST UPDATED May 28, 2007

in , ,

Learn what slows Apache web server down, and how to get the most out of PHP.

Linux, Apache, MySQL, and PHP (or Perl) form the basis of the LAMP architecture for Web applications. Many open source packages based on LAMP components are available to solve a variety of problems. As the load on an application increases, the bottlenecks in the underlying infrastructure become more apparent in the form of slow response to user requests. The previous article showed you how to tune the Linux system and covered the basics of LAMP and performance measurement. This article focuses on the Web server components, Apache and PHP.

From the article:

Applications using the LAMP (Linux®, Apache, MySQL, PHP/Perl) architecture are constantly being developed and deployed. But often the server administrator has little control over the application itself because it's written by someone else. This series of three articles discusses many of the server configuration items that can make or break an application's performance. This second article focuses on steps you can take to optimize Apache and PHP.

This article focused on tuning the Web server, both Apache and PHP. With Apache, the general idea is to eliminate extra checks the Web server must do, such as processing the .htaccess file. You must also tune the Multi-Processing Module you're using to balance the system resources used with the availability of idle workers for incoming requests. The best thing you can do for PHP is to install an opcode cache. Keeping your eye on a few resource settings also ensures that scripts don't hog resources and make the system slow for everyone else.

Tuning LAMP systems, Part 2: Optimizing Apache and PHP

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 4 comments… read them below or add one }

1 php October 6, 2007 at 4:15 pm

Another article about optimizing the performance of apache & php for high traffic loads:
http://kevin.vanzonneveld.net/techblog/article/survive_heavy_traffic_with_your_webserver

Reply

2 Smith Obot September 19, 2010 at 8:04 pm

In order to increase performance is it necessary to disable Etag?

Reply

3 Dwi Cahyo December 12, 2010 at 5:53 am

nice,, but how to I disable the cgi script for spesific user..?

thanks

Reply

4 Mazhar Shahzad October 10, 2012 at 5:33 pm

Thanks for share us this information if you more define about cgi script its highly appreciated

Reply

Leave a Comment

Previous post:

Next post: