Closed (fixed)
Project:
Cache Router
Version:
6.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Oct 2009 at 06:01 UTC
Updated:
20 May 2010 at 01:37 UTC
getting in APC v3.0.19
Warning: require_once(./sites/all/modules/contrib/cacherouter/cacherouter.inc) [function.require-once]: failed to open stream: No such file or directory in /home/mysite/public_html/includes/bootstrap.inc on line 1009
Fatal error: require_once() [function.require]: Failed opening required './sites/all/modules/contrib/cacherouter/cacherouter.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/includes/bootstrap.inc on line 1009$conf['cache_inc'] = './sites/all/modules/contrib/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
'default' => array(
'engine' => 'apc',
),
);
[Zend]
extension="apc.so"
apc.apc.stat = 0
apc.include_once_override = 1
apc.shm_size = 40
apc.num_files_hint = 5000
APC is running, I can see all the stats in apc.php
Comments
Comment #1
JirkaRybka commentedSet your $conf['cache_inc'] to the REAL path of the file, which most probably doesn't include the "contrib" part. That's just a bad example in documentation.
Comment #2
playfulwolf commentedthank you very much! just now saw that typo!!!!!!!!!!
btw, I haven't seen any performance comparison between "apc'/'eacc'/'xcache' vs 'file' , what can I expect from 'file'? Something comparable to boost module?
Comment #3
JirkaRybka commentedBoost module will be faster, but more problematic IMHO. It focuses on tricky ways of page caching, while cache router does caching in general, in more wide-scope manner (I believe).
File engine have the benefit, that it's the only alternative to default database caching on shared hosts, where no extra caching technology is usually installed. I've found some comparisons somewhere non-Drupal on the web, which looked promising, but all I can say from my experience is that file engine *does* give a gain. It's most probably a bit less than the other dedicated technologies, I don't really know this bit. As for me, the crucial part was the fact, that the caching overhead is removed from database - helps with overloaded database server. I had cache_get() queries regulary on slow queries log, and that's not good. File caching solved that.
You might want to see #578522: File engine: Performance, filenames, and other cleanup to make file engine really work, though.
Comment #4
playfulwolf commentedIn my case I have site on VPS, but the main modules in that site are more troublesome than average (Drigg & co). I am almost hitting my RAM limit, but mysql part is more than ok.
For now - I'll stick with 2 layers: APC & cacherouter with APC, then maybe memcached, because for me it is hard to believe, that file caching is faster than properly configured db.
Comment #5
JirkaRybka commentedIn my case it really is faster, because it's a shared host where I have no control over the environment. The database server seems to be under heavy load there, and perhaps not optimally configured too, so using filesystem is better (it's local to the Apache process, as oposed to MySQL connections, and most probably having some sort of a cache in underlying OS too). Really, it all depends on the available environment, and real-life distribution of the load between the components, which may be tweaked with cache router. Each site might well be in a completely different situation.
Comment #6
playfulwolf commentedagree.
Comment #7
dparkmit commentedHi All,
I just ran across this post and am adding some more info because it might be useful to others who read this issue in the future.
According to a benchmark test (http://www.mysqlperformanceblog.com/2006/08/09/cache-performance-compari...) file-based caching actually outperforms DB-based caching by a lot. Please note that the comparison in this benchmark is between a file-based cache vs. a DB query that was already cached in MySQL's query cache. So if the data in Drupal's DB-based cache isn't already loaded into MySQL's query cache, then performance will be way slower.
I was personally surprised to see that memcached performed worse than file-based cache!
Comment #8
davepoon commentedI am also surprised too, I spent a day tune & benchmark the server with different caching systems(APC, eaccelerator, xcache, memcached and file),
file-based cache performed much faster than memory-based cache system in my case (dedicated server),
No cache
1643 queries @ 1238.61 ms
memory-based cache (APC)
607 queries @ 617.71 ms
file-based cache
325 queries @ 287.11 ms
Comment #9
playfulwolf commentedare you talking about registered users or anonymous?
boost = static html, but cacherouter takes care of registered.
What exactly you measured?