Slashdot Mirror


Optimize PHP and Accelerate Apache

An anonymous reader writes "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. This article discusses many of the server configuration items that can make or break an application's performance and focuses on steps you can take to optimize Apache and PHP."

3 of 191 comments (clear)

  1. Re:want performance from php? by gbjbaanb · · Score: 4, Insightful

    They are for static content.

    Now lighttpd serves 6 out of the top 250 sites. Do you think the other 246 run IIS or something?

    Lighttpd is good, but is best used in specialised instances, for specific (mainly static content) tasks. Its pointless using it for PHP as the cost of forking out a process to run the script will outweigh any saving from running a lighter-weight http server.

  2. Re:want performance from php? by malsdavis · · Score: 5, Insightful

    "PHP is slower than Perl or Python for most stuff."

    I'd say that in practice (i.e. when performing the vast majority of dynamic web functionality: e.g. database lookups) the opposite is true. Perl & Python are quicker at some tasks, but every-time I've rewritten a website between PHP and Perl (I don't program in Python because it's named after my most hated animal), PHP has come out slightly on top.

  3. Re:want performance from php? by SQL+Error · · Score: 5, Insightful

    The problem is not that Apache is slow, it's that it uses huge amounts of memory. If your database is running slow for some reason - say, during backups - requests will start to queue up, Apache will start more and more threads to handle those requests, and things will spiral rapidly out of control.

    Lightppd doesn't have that problem.