Results 1 to 9 of 9
Hi guys,
I've set up Squid on our local network about 8 months ago. Our users do a LOT of web browsing in their line of work. Having went through ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-29-2007 #1Just Joined!
- Join Date
- Aug 2006
- Location
- Cape Town, South Africa
- Posts
- 10
Squid proxy - poor efficiency
Hi guys,
I've set up Squid on our local network about 8 months ago. Our users do a LOT of web browsing in their line of work. Having went through various squid efficiency and performance guides, I set it up for what I at the time assumed was the best efficiency.
However, I checked the logs recently with an efficiency analyzer, and discovered that only 7% of all LAN browsing traffic were hits and come from the cache, the other 93% were all misses and came directly from the Internet itself.
Would it help if I post my version of the squid config file here? Maybe you guys can make a few suggestions based on that?
- 05-29-2007 #2Just Joined!
- Join Date
- Aug 2006
- Location
- Cape Town, South Africa
- Posts
- 10
By the way, as a sidenote: According to the efficiency analyzer, 55% of all browsing REQUESTS were cache hits, but only 7% of all TRAFFIC were cache hits.
- 05-30-2007 #3
Can you give the details of your cache and some stats of your network usage.
- 05-30-2007 #4Just Joined!
- Join Date
- Aug 2006
- Location
- Cape Town, South Africa
- Posts
- 10
What do you mean by details of the cache? As for network usage, in this particular LAN there are about 5 computers browsing constantly, mostly doing graphic design work (thereby visiting the same picture gallery sites over and over again).
Total bandwidth used per day by the office is between 350 and 500mb.
- 05-30-2007 #5
The squid cache is quite similar to a processor's cache. There are levels in that cache and you can specify the structure of a cache there. Depending upon the usage stats you should choose an appropriate lay-out for the cache.
Since the daily usage averages to about 300-350 MB then its a good idea. Look at squid.conf for more details on the cache structure. The CS department in my univ uses a bandwidth of 100MB per user each week and typically people are using google search and downloading research papers etc..... So we use a cache like this.....
etc.....Code:cache_mem 1GB cache_swap_low 90 cache_swap_high 95 maximum_object_size 4 MB maximum_object_size_in_memory 512 KB cache_dir ufs /extra/squid_cache/squid1 4000 16 256 cache_dir ufs /extra/squid_cache/squid2 4000 16 256 cache_dir ufs /extra/squid_cache/squid3 4000 16 256 cache_dir ufs /extra/squid_cache/squid4 4000 16 256 cache_dir ufs /extra/squid_cache/squid5 4000 16 256
Since the same picture gallary is being used by everybody its a good idea to change the cache replacement policy to LRU. Hope this helps you.
Note that you need to play with the cache design a lot before you pin down an optimal value.
- 05-30-2007 #6Just Joined!
- Join Date
- Aug 2006
- Location
- Cape Town, South Africa
- Posts
- 10
We are already using LRU - but I did make a few other adjustments - thanks for the help!
I have a question though: I noticed that you're using 5 cachedirs. Is there any specific reason for using 5 dirs of 4GB each instead of 1 dir of 20GB?
- 06-01-2007 #7
I think there is no specific reason behind this. But I am trying to find that out by contacting older sys-admins (they are passed out and its difficult to get in touch with them) but when I joined the team and saw five cache dirs all I did was to increase their sizes.....(legacy matters I suppose)
- 06-05-2007 #8Just Joined!
- Join Date
- Aug 2006
- Location
- Cape Town, South Africa
- Posts
- 10
apoorv,
What's your refresh_pattern directive look like? Because if I'm not mistaken, that's what controls how strict the caching is.
Can anyone make some solid recommendations as to what refresh_pattern should be?
- 06-05-2007 #9
Last edited by apoorv_khurasia; 06-05-2007 at 04:21 PM. Reason: value--->values (grammer)


Reply With Quote

