Re: [squid-users] Squid 2/3 slower than direct access

From: Greg Wilson <gwilson@dont-contact.us>
Date: Sun, 3 Sep 2006 23:33:25 +1000

I've found the storedir stats are as follows:
 
Store Directory Statistics:
Store Entries : 8735
Maximum Swap Size : 102400 KB
Current Store Swap Size: 92132 KB
Current Capacity : 90% used, 10% free

Store Directory #0 (ufs): /var/spool/squid
FS Block Size 4096 Bytes
First level subdirectories: 16
Second level subdirectories: 256
Maximum Size: 102400 KB
Current Size: 92132 KB
Percent Used: 89.97%
Filemap bits in use: 8411 of 16384 (51%)
Filesystem Space in use: 1953544/67319480 KB (3%)
Filesystem Inodes in use: 136720/8552448 (2%)
Flags: SELECTED
Removal policy: lru
LRU reference age: 2.61 days
I have plenty of hard disk space on this server. Will it improve speed if I increase storedir size and change to aufs?
 
If so, does AUFS need to be built or will Squid set that up itself?
 
Thanks,
 
Greg.

________________________________

From: Greg Wilson [mailto:gwilson@summerland.com.au]
Sent: Sun 03/09/2006 10:46pm
To: Adrian Chadd
Cc: squid-users@squid-cache.org
Subject: RE: [squid-users] Squid 2/3 slower than direct access

Adrian,

I'm using the defaults for everything in Squid (except cache memory) at this stage so that's

cache_dir ufs /var/spool/squid 100 16 256

I've only just found out that Raid 5 probably isn't the best thing to run Squid on as access isn't particularly fast.

I've checked the DNS settings and all looks good. I've done some DNS testing from the Squid server and responses are very quick.

One of the Squid tests I've run on the box is an ISP speed test that downloads a single large file and reports download speed. This is one of the tests that runs 2/3 slower than direct. In this case there is only one DNS lookup and then only if the file isn't on the webserver that does the testing. This indicates that DNS is not the problem.

I was suspecting I had a duplex mismatch between the Squid box and the firewall. It's directly connected to a Netscreen and was auto-setting to full-duplex although mii-tool was reporting it's partner as half-duplex. It's a problem for me to physically get to the server as it's at our ISP's POP. I didn't want to lose contact with it so I've set both to half-duplex 100 Mb. I'd rather have full duplex but as the Internet link is only 1.5 Mb that shouldn't be a bottleneck.

As the problem is severe I'm expecting something major rather than fine-tuning but I can't see anything int he logs that indicates a problem. Server load seems low but Squid is still slow.

Thanks,

Greg.

________________________________

From: Adrian Chadd [mailto:adrian@creative.net.au]
Sent: Sun 03/09/2006 9:18pm
To: Greg Wilson
Cc: squid-users@squid-cache.org
Subject: Re: [squid-users] Squid 2/3 slower than direct access

On Sun, Sep 03, 2006, Greg Wilson wrote:
> Thanks for the tips.
>
> AFAIK the hardware Raid is fine - all disks running OK.
>
> I am running Webmin & Systats on the server. CPU load is minimal so the box doesn't seem to be overworked but response is slow. I will check the DNS setup as you suggest.

Which storedir are you using? UFS? aufs? diskd?

Aufs is a good choice for squid-2.6 on Linux. The throughput might be a bit
slow on larger objects if the cache isn't busy due to some side-effect of
how disk IO is (was?) scheduled. Other than that, it should be zippy.

Adrian
Received on Sun Sep 03 2006 - 07:30:34 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Oct 01 2006 - 12:00:03 MDT