RE: [squid-users] Squid Cache...

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 26 Aug 2009 16:48:08 +1200

On Wed, 26 Aug 2009 10:03:36 +0530, "Sagar Navalkar"
<sagar.navalkar_at_idbiintech.com> wrote:
> Hi Amos/Jeff,
>
> Thanks for the reply..... I would be obliged if you could please let me
> know a few pros/cons of clearing squid cache on a regular basis.
>

Pros:
* If squid reaches a full cache under load it has to delay things while it
makes space for the new objects.
* not having anything cached cause memory requirements to be smaller and
restart speed faster (no cache index to deal with)

Cons:
* no cache means all requests come from network. large time penalty to
fetch.
* reduced bandwidth savings

> Also would you please explain the statements below:
> 1) Or maybe just setting the garage high/low watermarks closer together
for
> a smaller chunk of work at disposal time.

Squid on a regular basis empties a certain amount of the configured cache.
See Pros above for why.

There are two settings for high_watermark and low_watermark which define
how big that area of cache being emptied is. The smaller the space being
emptied the less work Squid does emptying it.

For caches with over 10GB of data the default settings (5% of total cache
size) can cause noticeable seconds of lag time handling requests while
Squid is waiting for the disk to erase stuff.

> 2) But watch the user:group actually match what your Squid uses.

"chown -R nobody:nobody cachedir"

... will kill squid with hard to find problems if your squid actually runs
as user 'proxy' or user 'squid' instead of user 'nobody'.

Amos

> Am a bit lost here!
>
> Regards,
>
> Sagar Navalkar
> ===================================================
> A lot of people quit looking for work as soon as they find a job!!!
> .....Ziz Zigler
> ===================================================
>
>
> -----Original Message-----
> From: Amos Jeffries [mailto:squid3_at_treenet.co.nz]
> Sent: Tuesday, August 25, 2009 8:14 PM
> To: Jeff Pang
> Cc: squid-users_at_squid-cache.org
> Subject: Re: [squid-users] Squid Cache...
>
> Jeff Pang wrote:
>> 2009/8/25 Sagar Navalkar <sagar.navalkar_at_idbiintech.com>:
>>> Hi,
>>>
>>> I understand the fact that cache in fact helps improve speed!
>>>
>>> Please let me know if clearing the squid cache will help in eliminating
> the corrupted cache files & help to improve the proxy performance.
>>>
>>
>> Squid does it automatically.
>>
>>> How frequently can the squid cache be cleared? And is it advisable to
> clear the cache frequently or otherwise to improve performance.?
>>>
>>
>> If the cache_dir is very large, for example, the size of it reaches
>> 100G or more, then clearing cache is helpful to performance IMO.
>
> Or maybe just setting the garage high/low watermarks closer together for
> a smaller chunk of work at disposal time.
>
>>
>> I always do:
>>
>> /path/squid -k shutdown
>> mv cachedir cachedir.old
>> mkdir cachedir
>> chown -R nobody:nobody cachedir
>> /path/squid -z
>> /path/squid -D
>> rm -rf cachedir.old &
>
>
> But watch the user:group actually match what your Squid uses.
>
>
> Amos
Received on Wed Aug 26 2009 - 04:48:18 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 26 2009 - 12:00:04 MDT