Re: [squid-users] Long running squid proxy slows way down

From: Gavin McCullagh <gavin.mccullagh_at_gcd.ie>
Date: Sat, 25 Apr 2009 11:12:54 +0100

Hi Amos,

On Sat, 25 Apr 2009, Amos Jeffries wrote:

>> ipcache_low 90
>> # ipcache_high 95
>> ipcache_high 95
>> cache_mem 1024 MB
>> # cache_swap_low 90
>> cache_swap_low 90
>> # cache_swap_high 95
>> cache_swap_high 95
>
> For cache >1GB the difference of 5% between high/low can mean long
> periods spent garbage-collecting the disk storage. This is a major drag.
> You can shrink the gap if you like less disk delay there.

Could you elaborate on this a little? If I understand correctly from the
comments in the template squid.conf:

  (swap_usage < cache_swap_low)
        -> no cache removal
  (cache_swap_low < swap_usage < cache_swap_high)
        -> cache removal attempts to maintain (swap_usage == cache_swap_log)
  (swap_usage ~> cache_swap_high)
        -> cache removal becomes aggressive until (swap_usage == cache_swap_log)

It seems like you're saying that aggressive removal is a big drag on the
disk so you should hit it early rather than late so the drag is not for
a long period. Would it be better to calculate an absolute figure (say
200MB) and work out what percentage of your cache that is? It seems like
the 95% high watermark is probably quite low for large caches too?

I have 2x400GB caches. A 5% gap would leave 20GB to delete aggressively
which might take quite some time alright. A 500MB gap would be 0.125.

        cache_swap_low 97.875
        cache_swap_high 98

Can we use floating point numbers here? Would it make more sense for squid
to offer absolute watermarks (in MB offset from the total size)?

Gavin
Received on Sat Apr 25 2009 - 10:13:04 MDT

This archive was generated by hypermail 2.2.0 : Sun Apr 26 2009 - 12:00:02 MDT