Speed up Drupal with Boost module
By Ras on 13 Jan 2011
The Boost module works by caching static versions of pages, and serving them to anonymous users. Because Boost caches pages in flat HTML files and the server doesn't hit your database, pages are sent to the users much faster, sometimes in as little as 200-300 milliseconds, which will seem almost instantly. From the Boost module page: "If you are on shared hosting this is your best option in terms of improving performance."
Information on how to set up and tweak the module can be found at the Boost Handbook Page
Set up the Boost module
The module is not as hard to set up as it might seem: Download, install, update robots.txt and .htaccess according to the instructions, enable the crawler and start it by running cron. Theoretically that could be done in 10 minutes, and all would be fine, but I had to tweak it a bit.
Similar nodes block doesn't get updated
I had a block of 10 similar nodes by taxonomy on all node pages, and the affected nodes didn't get updated when a user posted a new node, or deleted an old one. At first I had set the "Boost - HTML - Default maximum cache lifetime" to 52 weeks, which would then get quite old, and some nodes on the "10 latest" list would even be deleted in the meantime. I have instead lowered "Boost - HTML - Default maximum cache lifetime" to 2 days, and set the crawler to automatically crawl expired pages. Some suggest using a module like Ajaxify Regions, but I like to keep it simple.
Control which pages get cached
To better control which pages are getting cached, I have selected "Statically cache specific pages" -> "Cache only the listed pages". For example:
articles and term3 are Views Pages, so that a page like http://example.com/articles?page=23 is also cached. All nodes are under a term, like http://example.com/term3/article-node-example -- term3/* takes care of them being included.
Nodes with non-ASCII characters in URL don't get cached
Because of the "Only allow ASCII characters in path" setting, some nodes weren't being cached. They contained non-ASCII characters (ü ä ö é æ å ø, etc.) in their paths, from a period where the transliteration wasn't working. I re-saved those nodes, which got rid of the non-ASCII characters and they are now getting cached. I have the Path Redirect module installed and "Create a new alias. Redirect from old alias." selected under admin/build/path/pathauto, so the old url's don't give a 404, but instead are saved and redirected to the new alias.
The Boost module comes with four blocks. I have enabled the Block "Boost: Pages cache status" under admin/build/block. This block shows you the status of the page being viewed, the path, whether it's cached or not, when it expires, how long it took to generate, and it gives you a "Flush Page" button.
The other blocks are:
Boost: AJAX core statistics
Boost: Expiration Relationship
Boost: Pages cache configuration
All in all the Boost module has worked out really well. Even though I am on a shared host, pages are now getting served instantly, before it could take several seconds. I can also see the effect of this under average page views per visit, which have gone up from 2 to 3.3, a 65% increase, because the users no longer have to sit and wait for the pages to appear.
It would be great if there was a log of which pages had been visited by the crawler, and if they were cached or not. Perhaps it already exists and I haven't found it yet. It would also be great if the crawler didn't crawl pages with the suffix appended in front of the path (for example '/fr'), for more see this issue: http://drupal.org/node/886450#comment-3656404 ...but that is a minor issue with an otherwise great module.