Firstly let me say that I appreciate that optimisation is both specialised and individual depending on your hardware and web traffic but I really need some help. At the moment my home page is taking over 30 seconds to load and while I'll admit some of this is down to the amount of content being delivered, I'm not convinced that there's nothing I can do to improve the speed of the Apache set up to begin with (I'm also investigating options to improve the performance of mySQL too). You should also know that the server is runing Typo3 content management system and I've applied pretty much every optimisation going for it. Here's the site: www.holiday-chateau.com It's running on a dual core 3GHz Xeon with 8GB RAM running Gentoo Linux. The web site gets about 300 visitors a day (but we're currently doing a lot of PR that should hopefully see that at least double) and they spend about 15 minutes per visit, looking at about 15 different pages. Here's the current relevant bits from the Apache config file: Timeout 150 KeepAlive On MaxKeepAliveRequests 20 KeepAliveTimeout 1 <IfModule prefork.c> StartServers 40 MinSpareServers 20 MaxSpareServers 40 MaxClients 256 MaxRequestsPerChild 100 </IfModule> <IfModule worker.c> StartServers 40 MaxClients 256 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 100 </IfModule> <IfModule perchild.c> NumServers 5 StartThreads 5 MinSpareThreads 5 MaxSpareThreads 10 MaxThreadsPerChild 20 MaxRequestsPerChild 100 </IfModule> <IfModule peruser.c> ServerLimit 256 MaxClients 256 MinSpareProcessors 2 MaxProcessors 10 MaxRequestsPerChild 100 ExpireTimeout 1800 Multiplexer nobody nobody Processor apache apache </IfModule> Code (markup): Please note that I've kind of "inherited" this server and it's setup from people who no longer work with me so I've no idea how well/poorly it's been set up to begin with. Thanks in advance!
With only 300 visitors per day none of these figures will matter at all. These numbers won't start mattering until you get to around 10 requests per second. (Note that this includes search engine bots, spam bots and all the images, css files and js files that your website gets) That said, I would normally put the MaxRequestsPerChild value up around 1000. There's no need to kill off a child after only 100 requests. You have plenty of grunt and plenty of RAM so you could put MaxClients up to around 500. If you ever see 500 Apache children (or if you notice error messages about this setting in the error log) then you will need to start looking at getting another server but don't worry, that's a long way off. You may see a small improvement in secondary page display times by putting KeepAliveTimeout up to somewhere between 100 and 300 but this can cause excess resource usage when your site gets busy and could cause you to see 500 children much sooner than you would otherwise. It's such a small improvement that I wouldn't bother. Now, on to the good news. I requested your website with this command on the command line: time curl -s www.holiday-chateau.com > /dev/null Code (markup): which usually showed a time between 3 and 5 seconds. This isn't great but it's mostly caused by BitTorrent on my machine and I suspect the true time is more like 1 - 2 seconds which is fine. This means that Apache, MySQL and PHP are all fine and are not causing your page to be displayed slowly. The bad news is that when I requested your site in a browser I saw the greater than thirty second page load times you mentioned. The HTML of your home page is arriving in the browser in under 4 seconds but isn'ty being displayed until after 30 seconds. You can install the YSlow plugin for Firefox to help determine exactly which parts of your site are causing it to go slow but I had a hunch when looking at the source code that it was JavaScript. I turned off JavaScript and the page displayed in 4 seconds with the images still downloading and being displayed one by one. When I turned JavaScript back on the page display time went back up to around 30 seconds. When JavaScript was off, some parts of the site didn't work such as scrolling through the promoted properties at the top of the page, scrolling through the featured properties at the bottom, the tooltips on the search by region map and the tooltips on the promoted properties at the top. To make your page display more quickly you may have to decide how much you really like those features. There might be a way to modify the JavaScript to load the images differently or not hold up the display of the page but it will involve modifying the typo3 CMS and not changing anything in your Apache configuration. Put as much of the JavaScript as you can into a single file, reduce the sizes of your images and put all your css into a single file. Install the YSlow plugin and see what it says. It usually has some good suggestions.
Thanks for taking the time to look at the site in so much depth. I know the JS is heavy and I'm looking at ways of minimising it. For a start, prototype is far too heavy and while I've managed to get it down to about half it's usual size, I could still strip out a lot of the unused effects. I've also got another version of the image slideshow that uses ajax but this has implications with SEO so I need to create another version that renders a <noscript> version at the same time. We're also having typo3 upgraded which has some speed improvements and a few extra tools to allow more of the JS and CSS to be compressed into a single file. In the meantime, I'll have a look at the apache stuff and see what happens