| Monte Ohrt 2004-10-11, 4:01 pm |
| You can try setting use_sub_dirs set to false, that should take the
number of total files down considerably.
Another trick we do is clearing the cache by moving the entire cache
directory to a "trash" directory and creating a new empty cache
directory. This makes the cache clearing instant, and you can do your
"trash" file removal during a time when the system is idle.
Max Bloch wrote:
> Hello all,
>
> I am about to tackle the one and only headache that I am having with
> Smarty, namely my ever growing cache. My Smarty cache is very
> voluminous and literally consists of tens of thousands of cache
> groups, all containing small cached files from one to seven KB in
> size. All works fine, except for when I try to erase expired cache
> with a custom script. My script uses GNU 'find' to locate and delete
> directories older than 30 days. Whenever I run the script, my system
> load skyrockets beyond any reasonable value, practically paralyzing my
> entire system. Adjusting the scheduling priority of my script with
> 'nice -n 19' doesn't do any good. The next step I am about to take to
> resolve this problem, is to upgrade my RAID 5 to a RAID 1+0, which
> should boost disk-writing-performance by over 300%. While I will be
> repartitioning my harddrives for this, I would like to create an extra
> partition solely for Smarty. Can anybody recommend a filesystem that
> will perform especially well with Smarty's cache? I am running Gentoo
> Linux and am currently using the ext3 filesystem.
>
> Thanks,
> Max
>
|