[TYPO3-dev] Testing TYPO3 caching vs. [FE][pageCacheToExternalFiles]
Bernhard Kraft
kraftb at kraftb.at
Wed Apr 12 11:04:02 CEST 2006
Hi !
Dmitry Dulepov wrote:
> 1. Should not be the case on Linux, file will be in OS buffers already.
The same thing I tought. My machine has 3GB of RAM and during the whole test it didn't do a single
HD request (i checked that rather unprofessionally by watching the HD-LED :) - both with and without
the patch - so the mysql database is also properly cached.
The filesystem is properly cached .... the Filesystem is also an additional cache to the mysql database
files as they also just reside on the FS (except if mysql is doing a more "direct" disk access somehow)
> 2. If I request static file (test.txt, couple of kilobytes), I get over
> 1000 rq/s, if I request typo3 static page I get around 9. See the
> difference?
I think the problem here is rather php ... apache has to start up the complete interpreter and this of
course takes time ...
The problem is you can't just simply generate static *.html files out of the content because then any setting
of "Start" and "Stop" won't be respected any more ....
The no-query patch works of course only when no FE-User is logged in ...
Here the benchmarks:
http://think-open.org/kraftb/bench/with_patch_apache_bench.txt
http://think-open.org/kraftb/bench/without_patch_apache_bench.txt
The patch can be found here:
http://think-open.org/kraftb/noQuery_2006-04-12.diff
it is taken against rc3 so you probably use this one for trying.
I have a new method "t3lib_div:rmdir_rec" which removes a directory and its contents recursively.
I do not delete anything else than the generated-cache-files ...
+ function clearFileCache($id) {
+ if ($l = intval($GLOBALS['TYPO3_CONF_VARS']['FE']['ADVpageCacheToExternalFiles'])) {
+ $cacheDir = t3lib_div::getCacheFileName($id, false, 'pages', $l);
+ t3lib_div::rmdir_rec($cacheDir);
+ }
+ if ($l = intval($GLOBALS['TYPO3_CONF_VARS']['FE']['ADVcontentCacheToExternalFiles'])) {
+ $cacheDir = t3lib_div::getCacheFileName($id, false, 'pagesection', $l);
+ t3lib_div::rmdir_rec($cacheDir);
+ }
+ if ($l = intval($GLOBALS['TYPO3_CONF_VARS']['FE']['ADVrootlineCache'])) {
+ $cacheDir = t3lib_div::getCacheFileName($id, false, 'rootline', $l);
+ t3lib_div::rmdir_rec($cacheDir);
+ }
+ }
so you see ... no bad things happen. getCacheFilename always returns directories out of typo3temp/
greets,
Bernhard
More information about the TYPO3-dev
mailing list