I installed a brand new drupal 5.7 and added the Cache Router module.
I did the same performance tests as there are in the module page. Performance with "db" engine is not bad for me:
Requests per second: 324.03 [#/sec] (mean)
Time per request: 15.431 [ms] (mean)
But when i do the same performance test with "file" engine, the performance is very bad:
Requests per second: 12.88 [#/sec] (mean)
Time per request: 388.210 [ms] (mean)
This is what id added to settings.php:
$conf['cache_inc'] = './sites/all/modules/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
'default' => array(
'engine' => 'file',
'server' => array(),
'shared' => TRUE,
'prefix' => '',
),
);
Am i missing something?
Regards,
Matias.
Comments
Comment #1
mburak commentedAlso, i found these errors in my log file.
==> /etc/httpd/logs/error_log <==
[Mon Apr 14 12:02:01 2008] [error] [client 127.0.0.1] PHP Notice: Undefined index: in /mnt/20GB/local/dpc-solution/drupal/sites/all/modules/cacherouter/engines/file.php on line 14
[Mon Apr 14 12:02:01 2008] [error] [client 127.0.0.1] PHP Notice: Undefined index: cache in /mnt/20GB/local/dpc-solution/drupal/sites/all/modules/cacherouter/Cache.php on line 12
Thanks,
Matias.
Comment #2
btmash commentedWhile performance on my local computer seems decent, I continually got these notices as well - I see that there is no checking done on whether or not the cacherouter bin prefix is set or not - so I added some checks for the prefixes to the effect of:
And the warnings are no longer there. While I have only used apc and file caching, the differences were in:
Comment #3
slantview commentedI'm sorry, I've been out of the loop for a week due to some personal issues. I will take a look at this asap.
Comment #4
slantview commentedHi, did you apply the cache serialization patches? Did you check write permissions for the "path" to the cache files?
-s
Comment #5
btmash commentedAck...I should have created a warnings thread for the 6.x branch - The warnings and notices that I received were from the 6.x branch - that is where I needed to place the isset() checks.
Comment #6
mburak commentedYes, i applied the patches but it's still not working. I have the right permissions to write in /tmp/filecache and i see that it's writing things there.
Comment #7
andypostI changed Cache.php
Comment #8
eli commentedBased on the problems I was having, it appears to be because the 'page_cache_fastpath' variable is not set. Although it doesn't seem to be documented anywhere, you need to have a variable namde page_cache_fastpath set to '1' or else the file caching (and possible other engines) don't work at all
Comment #9
eli commentedThat is to say, you want to add this to your settings.php:
Comment #10
slantview commentedComment #11
btmash commentedCan the documentation for the project be updated in this case?
Comment #12
socialnicheguru commentedis what is outlined in #9 still needed?
Chris