htcacheclean vs just "delete all files where mtime > xx days"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear List,

We were running this:

htcacheclean -n -t -i -d720 -p /var/httpd/proxy -l 20480M

But we found it:

 1. Takes ~100MB of virtual memory to run
 2. Doesn't have logic (documented) to what's being deleted
 3. Takes many hours to run even when not deleting anything (even without the -n switch)
 4. On our website which has hundreds of thousands of pages getting cached, the biggest our cache has grown is 9 GB, which isn't
very much. So for us (and I'd imagine most people), htcacheclean usually doesn't end up cleaning anything.

So instead we're considering switching to using the below command once a day which will delete all files and directories older than
15 days.  If no deletions (Which is usually the case), the command seems to traverse all the directories in under a minute.


find /var/httpd/proxy/* -mtime +15 -exec rm -rf {} \; 

We just don't want it growing astronomically big, like 100GB.  It would seem we could do this by simply removing the files which
haven't been modified for 30 days.  (Using atime would be better except we've disabled it on our file system because it's such a
performance suck.)

Is this solution a bad idea?

Thanks,

Geoff 
gmillikan @ http://www.t1shopper.com/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux