Boost vs Cache Router

jaypabs - January 14, 2009 - 05:59

After days of research I found out that Boost and Cache Router is my best choice. But how do you compare this two module? Which is better?

I really need my website to run as less CPU as I can to avoid suspension from my web host.

I already installed block cache alter to no avail. My web host reported that my website is still consuming too much cpu.

Thank you

Can you give us a little

slantview - January 14, 2009 - 06:33

Can you give us a little more information about your host / setup and what your site does. I use Boost + Cache Router with memcache for a Drupal 6 site and it works great. Depends on what you need, how much traffic you have, etc. Do you have full page caching turned on? Is your site serving mostly anonymous, or authenticated traffic, etc.

Thanks for the reply.

jaypabs - January 14, 2009 - 08:57

Thanks for the reply.

I just enabled the normal page caching of drupal. I enabled the block cache, css files, page compression for one hour under performance settings.

My website is http://www.sourcecodester.com and it is hosted in lunarpages.com. I think I have more anonymous users compare to authenticated. But I have also authenticated users that login sometimes. I just don't know where to find a stats on what percentage my anonymous vs authenticated.

If it is okay to install boost + cache router with memcache then I will do the same. But is it not a redundant if I install both module since they have the same features to add caching in drupal?

Thank you

Download free source code

Also check the requirements

cog.rusty - January 14, 2009 - 07:03

Also check the requirements of these two modules and whether your server covers them. For example, required libraries for running a caching daemon, any restrictions of your hosting plan on the number of inodes (the files for static caching), etc.

Where can I find the

jaypabs - January 14, 2009 - 08:51

Where can I find the required library for caching so that I can review it or ask my web host.

Thank you

Download free source code

Boost

chrism2671 - March 29, 2009 - 13:47

We use boost on our site which receives many thousands of visitors a day and it reduced our CPU load by probably 90%.

It only works for anonymous users but I would recommend it fully.

Not tried cacherouter.

Boost n Cacherouter file caching

DocMartin - June 28, 2009 - 04:48

Just started w Cacherouter; I'm using the file caching method, which was recommended for shared hosting.

I see Boost enables file caching; evidently works very well, tho info says it's for folk who understand mod_rewrite, which I don't, although the install instructions don't look too daunting.

So I too would be interested in comparison.

____________________________
DocMartin and Hong Kong Outdoors

Boost and Cacherouter

DocMartin - June 30, 2009 - 04:36

Well, after figuring I could likely install Boost even tho don't know re mod_rewrite, I've done so for one site (of a multi-site install)

Doing so, can see some basic differences between Boost and Cacherouter:

Boost installs like a regular module; albeit need to add some lines to htaccess (didn't work - sites stopped! - when I pasted from module admin page - might be that some odd characters in there too, as from page w fckeditor; but started working when I replaced with the boosted1.txt as per instructions)
Becomes part of the Performance configuations; can give settings for pages that can be boosted, as well as some of the typical Drupal performance settings.

Cacherouter is oddity as a module: installs via lines in settings.php - and, to me, info rather sparse on just what lines you should use. For shared hosting (via another page by module author), it seems best to use file rather than db as caching engine.
- tho just what this engine does, how often caches cleared etc, not clear to me.
- but it also enables other options, such as database caching; and via memcache etc for folks who can install such things on servers.

I've tried both, on a couple of sites that are part of multi-site install, and use same template.

One thing w Boost: at first, a couple of forum pages showed up without main site template being used. Not sure why; minutes later, the pages looked ok; seemed ok subsequently.

Also w Boost: changing htaccess lines impacts htaccess for all sites; but happily seems there isn't a problem in determining that for sites with Boost not enabled there are no pages cached by boost, so the web server should go via Drupal to serve pages.

Update: just found I had problems logging in to site on which I was using Cacherouter; got access denied message when trying login link on forum. Also w forum, seemed I was logged out when moving to a list of forum threads.
Hence, for this site, changing to Boost; perhaps if you require file caching, Boost is better option.

____________________________
DocMartin and Hong Kong Outdoors

Boost & .htaccess

mikeytown2 - July 1, 2009 - 06:45

Would you mind posting the text from the admin page for htaccess? Bug reports are gold too me, means I can make the code better. What version of boost are you using?

Boost generated htaccess

DocMartin - July 1, 2009 - 07:48

This is htaccess from the admin page:

### BOOST START ### Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT" Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0" AddCharset utf-8 .html AddCharset utf-8 .xml AddEncoding x-gzip .gz ForceType text/html ForceType text/xml ForceType text/css ForceType text/javascript # Skip boost IF not get request OR uri has wrong dir OR cookie is set RewriteCond %{REQUEST_METHOD} !^GET$ [OR] RewriteCond %{REQUEST_URI} (^(admin|cache|misc|modules|sites|system|themes))|(/(comment/reply|user|user/(login|password|register))$) [OR] RewriteCond %{HTTP_COOKIE} DRUPAL_UID RewriteRule .* - [S=9] # GZIP RewriteCond %{HTTP:Accept-encoding} !gzip RewriteRule .* - [S=4] RewriteCond %{DOCUMENT_ROOT}/cache/gz/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s RewriteRule .* cache/gz/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html] RewriteCond %{DOCUMENT_ROOT}/cache/gz/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml\.gz -s RewriteRule .* cache/gz/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml\.gz [L,T=text/xml] RewriteCond %{DOCUMENT_ROOT}/cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.css\.gz -s RewriteRule .* cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.css\.gz [L,QSA,T=text/css] RewriteCond %{DOCUMENT_ROOT}/cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.js\.gz -s RewriteRule .* cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.js\.gz [L,QSA,T=text/javascript] # NORMAL RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html -s RewriteRule .* cache/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html] RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml -s RewriteRule .* cache/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml [L,T=text/xml] RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}%{REQUEST_URI}_\.css -s RewriteRule .* cache/%{SERVER_NAME}%{REQUEST_URI}_\.css [L,QSA,T=text/css] RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}%{REQUEST_URI}_\.js -s RewriteRule .* cache/%{SERVER_NAME}%{REQUEST_URI}_\.js [L,QSA,T=text/javascript] ### BOOST END ###

- it was like this (in Fckeditor; switching just now to plain text editor, it looks similar, tho some bigger spaces, and [checking quickly] &quot for quotation marks [if I'd posted &quot into htaccess without noticing, would have scuppered things I reckon]:

### BOOST START ### Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT" Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0" AddCharset utf-8 .html AddCharset utf-8 .xml AddEncoding x-gzip .gz ForceType text/html ForceType text/xml ForceType text/css ForceType text/javascript # Skip boost IF not get request OR uri has wrong dir OR cookie is set RewriteCond %{REQUEST_METHOD} !^GET$ [OR] RewriteCond %{REQUEST_URI} (^(admin|cache|misc|modules|sites|system|themes))|(/(comment/reply|user|user/(login|password|register))$) [OR] RewriteCond %{HTTP_COOKIE} DRUPAL_UID RewriteRule .* - [S=9] # GZIP RewriteCond %{HTTP:Accept-encoding} !gzip RewriteRule .* - [S=4] RewriteCond %{DOCUMENT_ROOT}/cache/gz/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s RewriteRule .* cache/gz/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html] RewriteCond %{DOCUMENT_ROOT}/cache/gz/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml\.gz -s RewriteRule .* cache/gz/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml\.gz [L,T=text/xml] RewriteCond %{DOCUMENT_ROOT}/cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.css\.gz -s RewriteRule .* cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.css\.gz [L,QSA,T=text/css] RewriteCond %{DOCUMENT_ROOT}/cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.js\.gz -s RewriteRule .* cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.js\.gz [L,QSA,T=text/javascript] # NORMAL RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html -s RewriteRule .* cache/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html] RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml -s RewriteRule .* cache/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml [L,T=text/xml] RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}%{REQUEST_URI}_\.css -s RewriteRule .* cache/%{SERVER_NAME}%{REQUEST_URI}_\.css [L,QSA,T=text/css] RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}%{REQUEST_URI}_\.js -s RewriteRule .* cache/%{SERVER_NAME}%{REQUEST_URI}_\.js [L,QSA,T=text/javascript] ### BOOST END ###

With text from fckeditor, I noticed there weren't any line/paragraph spaces.
So I pasted text into a text editor, and went thro adding returns, comparing with version 1 of the htacess lines in the .txt files included with Boost; then pasted into htacess.
Trying to view pages, then saw php lines; evidently drupal's index.php

It's 6.x.1.0-beta2 version.

Thanks for the module!

____________________________
DocMartin and Hong Kong Outdoors

caching and spiders/bots

DocMartin - July 1, 2009 - 07:50

Also, could you tell me if visits by spiders/bots trigger page caching?
- I had earlier assumed so, so figured as google bot (say) worked thro the site it would cause pages to be cached.
But numbers of cached pages reported are somewhat low; so maybe more targeted on proper visitors.

____________________________
DocMartin and Hong Kong Outdoors

Pages get cached

mikeytown2 - July 1, 2009 - 08:56

Spiders/bots do trigger page caching. In fact I made a spider so one can precache the entire site #363077: Add spider to crawler - Cache entire site with new install.. I can't tell you why people aren't visiting deeper into your site; crawlers like Google don't hit every page, and they take some time for them to index a lower traffic site.

Caching and spiders/bots

DocMartin - July 2, 2009 - 04:25

Ah, thanks for this.
I may have been just too impatient - spiders and visitors do get pretty deep into site (and I'm using Boost partly with aim of enhancing spidering). Been some time since I saw data re spiders, but they had been busy.
Auto regenerate cache looks nifty; tho just wonder re server load (on shared host), and thought the spiders would pretty much do this for me.
I did try similar, with a link checking program that works thro sites.

I'm kind of caught between wanting caching for long periods, yet also wanting new content to show up here and there [front page etc].

Thought it might be use of wysiwyg editor that messes with the htaccess; hope the issue proves readily resolved. One way is to not load fckeditor for page with performance: admin/settings/performance

Also - not the ideal place to add these remarks, but hopefully ok:

I don't think you need to understand how mod_rewrite works in order to use Boost (heck, I don't understand how this computer works!), but being ok with editing htaccess important.

I noticed re cache/www.site.com folders (folders on a multisite install; just one folder if one site): created these, gave permissions so readily writeable, before starting Boost working.
Using Boost, saw errors mentioning cache/gz/www.site.com - ie folders that didn't exist. I created these folders too, again making them writeable; noticed after this that error messages gone, and can see gz cache folders/files.
- maybe I overlooked, or maybe worth adding to install info; not sure if only important for some people, as maybe folders auto-created in at least some cases.

____________________________
DocMartin and Hong Kong Outdoors

Usability

mikeytown2 - July 2, 2009 - 09:28

Boost's usability has slowing been improving, it's still not there yet; you are right, some of the old warnings no longer apply with the latest code base. I found that it takes 1 hour to crawl 1,000 pages on shared hosting with the php code in the above issue. Doing the crawling locally is faster, and depending on your host crawling it locally might not count against your monthly bandwidth limits since it doesn't travel over the Internet. The boost database supports pages that have different expiration times, just need to write the GUI for it. What you can do right now is for pages that change a lot, have them cached via core (tell boost to not cache it), and set that expiration time to something shorter. Boost expires pages on cron runs; core does it per page access if I remember correctly. Thanks for the info about the GZ folder, still need to make boost more user friendly.

Boost block helpful

DocMartin - July 2, 2009 - 13:20

Thanks for another prompt response.
My sites include a couple with a few hundred pages, but with only occasional changes - like comments added here and there, and leading to info that should change on front page.
So, sites could be largely cached for a long time; just a few pages at times requiring updating. (I think that's the case, anyway!) Front page being perhaps the most important of these.
I could do as you suggest for pages, inc front (ie stop them being cached by Boost) - but front page is one of bigger, more slowly loading pages and the most important page to cache for fast loading.
Till now, I'd thought that to empty the front page cache meant emptying all cached pages.
But, after a bit of googling, found re Boost Block - hadn't appeared on my site, as not using right column; and I may have overlooked in documentation. Enabled this, and this looks like it should do the job for my purposes: I should be able to clear front page at times when there is new content to appear there; likewise pages w comments. [Maybe default should be for viewing by admins only?]
Setting different expiration times for certain pages could be very handy, too; for my sites, say, I can imagine this being good for main forum pages, so can see what latest posts are.

Interesting re different cache clearing behaviours between Boost and core: and that even you aren't too sure re core behaviour!
Glad if info proves helpful for making Boost more user friendly.

Thanks, too, for the extra advice re the crawler code. Far better if only in use every few days or weeks. I may wait w this, as seems the code is work in progress, and not so vital for me I think.
I noticed idea re caching only most popular pages; has merit, but even caching little visited ones good, esp if there are lots of them.

____________________________
DocMartin and Hong Kong Outdoors

The Boost block will not show

mikeytown2 - July 2, 2009 - 18:16

The Boost block will not show up for users with a UID of 0 (anonymous users). It's still highly recommended to set the check-box though, as you did. If your server isn't sinking from all the page hits (since your now using boost), having a couple of non boosted pages (pages cached by core) shouldn't slow it down that much... but with all advice, testing is required. Using the flush button is also an option, that for you would probably be the better one.

Need for Speed

DocMartin - July 3, 2009 - 04:06

[Chiefly for others viewing this thread:] I don't expect instant pickup in page views, but benefits over time, inc as spiders more readily visit nooks n crannies of my sites, and people find sites w faster pages better than they otherwise would.

I just became more interested in caching after brief trouble w my webhost (my sites had slowed MySQL server too much; maybe a problem w over vigorous gallery caching), and seeing webmasterworld thread re google promoting speed.
- I'd been wondering if so important, given broadband usage is increasing.
Here, tho, Google suggesting re moving between web pages as quickly as flick thro magazine pages:
http://moderator.appspot.com/#16/e=79951

Google results showing users prefer speed:
http://googleresearch.blogspot.com/2009/06/speed-matters.html

For Firefox, can get YSlow and Google Page Speed (Firebug plugin).

Maybe of some interest - short article I've done re speeding Drupal on shared server; you can see I'm not remotely a developer type(!), but might help a few people:
http://www.drmartinwilliams.com/websites/boost-drupal-website-speed.html

____________________________
DocMartin and Hong Kong Outdoors

Thanks!

Rosamunda - August 25, 2009 - 22:36

Thanks!

Rosamunda
Buenos Aires | Argentina

WYSIWYG is to blame

mikeytown2 - July 1, 2009 - 08:50

i dont have any ideas about

khawshik_1 - June 30, 2009 - 11:56

i dont have any ideas about cache router bcz i dont use it
but i have the boost module
and its a better solution to speed up my website
its create html files
and othere things thanks the

 
 

Drupal is a registered trademark of Dries Buytaert.