RE: [squid-users] Replacement policy 2 and 3 days

From: Hermann Strassner <hermann.strassner@dont-contact.us>
Date: Thu, 13 Jun 2002 10:49:40 +0200

> I am confused about LRU policy. I not sure. How
> does LRU work.??
> I have run squid-box. The below is Information.
>
> Os : Redhat Linux kenel 2.2.14-5.0
> Squid : Version 2.3.STABLE3
> Internet link : 2 MB
> Concurrent Client : 800-1000 person
> squid.conf
> Disk space : /cache1 = 8 GB
> : /cache2 = 8 GB
>
> cache_mem 50 MB
> cache_dir ufs /cache1/squid_cache1 6500 16 256
> cache_dir ufs /cache2/squid_cache2 6500 16 256
> authenticate_children 32
> reference_age 3 days
> Another is default.
>
> I found that when i set reference_age = 3. The cache will
> quickly increase.
> On the first day,The size of disk cache is about 25-30 %(100%=.
> 16 GB). On
> second day, It's about 50-60 %. On the third day. It is about 60-70 %.
> After the third Day ,It 's decrease slowly. It 's 70-73 %. On
> the fifth day , It 's
> increase slightly. So the sixth day, It 's about 88-90 % . I must
> delete the cache
> before it' full.
> However ,I try to set reference_age =2. I know that I should set
> it not less than
> 3 day but I want to prove something. I found that on First day
> is about 25%. On
> Second day , it 's about 48-50%. And 3,5,6,7,8 is about 48-50 %.
> I thinks that it should increase slightly, but it 'not.

If you set reference_age = 2 days, all objects older than 2 days are
deleted. Your cache is always the result of 2 days internet usage, and after
2 days it doesn't grow anymore, it just changes size according to your users
browsing.

> I compare the both internet bandwith. I found that it's not difference.
>
> How does LRU work when I set reference_age = 2 and 3 day on this
> situation. Please explain.

What you describe is that the cache never gets full because of a low
reference_age. You set this low enough to never fill the cache. This has
nothing to do with LRU policy.

In Squid there is another function: If your cache gets full, objects get
deleted depending on how long they are not used (LRU). This begins by
default at 90% (low_water_mark). You do not have to delete files manually,
because squid will do this for you. The deletion begins at low_water_mark
and gets more aggressive at high_water_mark.

You should use this function and set the reference_age to something like a
few weeks.

Hermann
Received on Thu Jun 13 2002 - 02:49:44 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:08:40 MST