Search squid archive

Re: How can I clean out old objects - refresh patt

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

 



On 19-Sep-07 My Secret NSA Wiretap Overheard Adrian Chadd Saying  :
> On Tue, Sep 18, 2007, Nicole wrote:
> 
>>  Thanks for the clarification, but Eeek!
> 
> Whats eek about it!

 True. After I left work (and boss breathing down at me) I realized how silly
my post was. *sigh* 

 
>>  So then, I guess this raises the question: If you have plenty of disk,
>>  there
>> really is nothing from keeping ancient files hanging around, using up space
>> and enlarging your swap.state file? 
> 
> Squid will clean it for you! Relax.
> 
>>  I thought it was an either not enough space Or older than expire time would
>>  delete objects.
> 
> It'd mean more RAM used to track expired objects, and more CPU to walk the
> list and delete unneeded objects..

 Right, that balance of each object requires X memory (forget the number) so
you have to balance storage space to memory to resulting number of files. Which
is the pickle I was in.

 
>>  So it seems like, I either have to manually purge old files every so often,
>>  or
>> set my disk space artificially to prevent too many objects based on my
>> servers's memory or increase my memory?
> 
> Nope, you just need to:
> 
> * cron a squid -k rotate once a day to make sure swap.state (and your other
> log
>   files) don't grow to infinity! So many people forget this step.

 Ok, you got me here. I have never heard about using this. I honestly thought
that was just to rotate out log files. DOH!

 squid -k rotate:
 This will disrupt service, but at least you will have your swap log back.
Alternatively, you can tell squid to rotate its log files. This also causes a
clean swap log to be written.

 I tried this, but it did not do that much. Could you explain more about what
this does? Is it rebuilding swap.state, based on what files you have in your
cache, or is it removing listings from swap.state for files that you no longer
seem to have?


> * Relax, and let squid handle deleting files when it wants to. It'll delete
> old
>   files to make room for others as appropriate!
> 
> Now, the question you should be asking is "will legitimate but infrequently
> used
> files be deleted in preference to "stale" files, and will this make my disk
> use suboptimal?"
> 
> The answer, thankfully, is no - if you think about it, if a file is stale
> then:

 Heh.

 So squid -k rotate is walking the disk and looking for files that are stale
based on the refresh_pattern criteria?

 
> * it hasn't been accessed in a while (or its freshness would've been
> "updated"
>   and it suddenly isn't stale/expired anymore!, and
> * if it hasn't been accessed in a while, it'll be at the tail end of the LRU
> or
>   Heap anyway.


 Was the old setting for lru_reference_age (or something like that) to aid in
setting a "you must be younger than this or frequently accessed" to stay in my
cache?


 
 Thanks!!

  Nicole


 
> 
> 
> 
> Adrian
> 
> -- 
> - Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support
> -
> - $25/pm entry-level bandwidth-capped VPSes available in WA -


--
                     |\ __ /|   (`\            
                     | o_o  |__  ) )           
                    //      \\                 
  -  nmh@xxxxxxxxxxxxxx  -  Powered by FreeBSD  -
------------------------------------------------------
 "The term "daemons" is a Judeo-Christian pejorative.
 Such processes will now be known as "spiritual guides"
  - Politicaly Correct UNIX Page




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux