Re: [squid-users] Squid limits and hardware spec

From: Matus UHLAR - fantomas <uhlar@dont-contact.us>
Date: Thu, 2 Dec 2004 09:04:08 +0100

> >On Mon, 2004-11-29 at 11:32, Martin Marji Cermak wrote:
> >
> >>Hello guys,
> >>I have been playing with Squid under a heavy load and there are some
> >>stats.
> >>I am trying to maximise the "Byte Hit Ratio" value. I got 13% average,
> >>but I am not happy about this number - I want it higher (how to do it?).
> >>There are thousands of ADSL clients using the cache and I want to know
> >>what the Squid limits are.
> >>
> >>USED HARDWARE:
> >>Processor: P4 1.8GHz
> >>Memory: 1 GB
> >>Hardisk: 40 GB IDE 7200rpm
> >>Controler: Serverworks Chipset
> >>Ethernet card: Broadcom TG3
> >
> >>ACHIEVED PERFORMANCE:
> >>Byte Hit Ratio: 13% (TOO LOW !!!)

> Ow Mun Heng wrote: You want to save bandwidth or you want speed??

On 02.12 13:13, Martin Marji Cermak wrote: Yes, I want to Save bandwidth.

In such case you probably need: bigger cache (add new disk probably) lower
- maximum_object_size cache_replacement_policy heap LFUDA

explanations below

> >>USED CONFIGURATION: maximum_object_size 51200 KB (SHOULD I MAKE IT
> >>HIGHER ???)
> >
> >I made mine to cache up to 40MB only. If you really want to have more
> >byte hit ratio, then by all means, up the max_obj_size.
>
> OK, now I have: maximum_object_size 200 MB

I increased maximum_object_Size from 20MB (last time I verified what files
were repeatedly fetched they were under 20 MB) to 32 MB and the byte hit
ratio decreased.

Yes, I work by an ISP where customers use to fetch very different files,
that is expected. I don't know what situation you are in, but note that
one 50MB file takes space of 50 1MB files and there is big probability
that smaller files will be fetched more often.

> >>cache_dir aufs /cache 25000 16 256 (one ide disk, see the spec above)

> >This seems too low. I used 40GB of the 80GB drive

> OK, I changed it to cache_dir aufs /cache 92000 16 256

no no no, even if you have whole drive for the cache, you should note that
there is some overhead in filesystems etc. I'm glad that I may use 30000
kB (which is a bit less than 29GB) on 36GB hdd. You probably should use:

cache_dir aufs /cache 70000 64 256

> >>cache_mem 8 MB
> >200 MB. More being cached to memory. Faster retrieval.
> Thank you, nice. I just hope it does not start swaping :-)

when I had 30000 swap I used 300MB for memory cache, and had squid taking
850MB of RAM. I think you may use 100 or 128 M for memory cache and see
how much memory will squid take in few days or weeks.

> And another interesting thing:

> My median Byte Hit Ratio has reached 17% (200 MB max file, 95 GB cache).
> So I drecompiled squid with --enable-removal-policies and set:
> cache_replacement_policy heap LFUDA
> It looks I can gain a couple of percent (LFUDA should have a bit better
> Byte Hit Ratio than lfu).

This is a well known thing. See squid config, cache_replacement_policy
comments, you'll found out that LFUDA is the best for good byte ratio.

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
There's a long-standing bug relating to the x86 architecture that
allows you to install Windows.   -- Matthew D. Fuller
Received on Thu Dec 02 2004 - 01:04:12 MST

This archive was generated by hypermail pre-2.1.9 : Sat Jan 01 2005 - 12:00:01 MST