Get a fast web site with simple changes

There are many things you can do to squeeze a little more speed out of your web site.

Many LAMP (Linux Apache Mysql PHP) web sites are database driven and few people take the time to tune their server for the best speed. If your site is using PHP with mysql as the backend, there are some very simple changes you can make to increase the speed of your web site.

Here is how to get a 400% increase in response times.

    1. Install apache2. If you are using debian, the standard apache2 package will meet most sites needs without any config changes at all.

    2. Install php5 and Alternative PHP Cache. Typically, APC will improve load times by 300%.

    3. Install mysql5 and increase your query_cache_size in your my.cnf to 64M which will cache more of your database queries to RAM. Typically, the 64M setting with cut your mysql query times in half.

    4. Install 2Gb RAM in your server. Apache, PHP and mysql all benefit from more RAM, especially if you are using caching. ;-)

If you are using Wordpress, or another php/mysql CMS, the above changes will result in page load times dropping from 400ms to 100ms or less. Try it for yourself !

Next time, I will look at how to split your site into two servers for even more speed.

Share

2 Responses to “Get a fast web site with simple changes”

  1. Eliot says:

    Hi Richard,

    Some of your readers may be interested in YSlow - it is a firefox plugin that suggests some other simple changes you can make to improve site performance, it really is a very good tool:

    http://developer.yahoo.com/yslow/

    Good luck with the blog, you’ve gained a subscriber in me.

  2. Richard says:

    @Elliot, thank you for your comment !