EFW Support

Support => General Support => Topic started by: madswitcher on Tuesday 06 July 2010, 11:09:15 pm



Title: How can I test to see if the cache is working ?
Post by: madswitcher on Tuesday 06 July 2010, 11:09:15 pm
Hi all,

I would like to check to see if the HTTP cache is working correctly.  Looking at the HTTP proxy stats, I see no hits and no misses, which is a bit confusing.

Any help would be welcome.

Thanks

Mike


Title: Re: How can I test to see if the cache is working ?
Post by: mrkroket on Wednesday 07 July 2010, 07:15:31 am
Easy method. Download a file from Computer A, time it. Download the same file from Computer B, time it. B download should be instantly.

Correct method. Check logs, it says if its recovered from cache (TCP_HIT) or recovered from original source (not cached, it appears as TCP_MISS).
try the command:
tail /var/log/squid/access.log -n 1000 | grep TCP_HIT
Will show the last cache hits.

If for example you want to check if the system is caching windows updates, try something like
cat /var/log/squid/access.log | grep TCP_HIT | grep update
You'll get something like
Jul  6 16:05:48 efw-1111007750 squid[19054]: 1278440368.572      0 192.168.X.X TCP_HIT/200 10149 GET http://download.windowsupdate.com[....].cab - NONE/- application/octet-stream


I suggest you increase the max object size in the proxy webpage to something like 100000 (100MB), or even more if you want to cache big downloads.



Title: Re: How can I test to see if the cache is working ?
Post by: madswitcher on Monday 19 July 2010, 07:07:11 am
Yep tried that - thanks for the pointer.  It appears that I getting all TCP-MISS and no HITS

I am running 2.3.0 with non transparent proxy on. Clients are set to point to the proxy using port 8080, and bypass proxy for local addresses.
Min and max object size are set to 0 and 1000

So i am probably doing something stupid.

Any pointers?

thanks

Mike


Title: Re: How can I test to see if the cache is working ?
Post by: mrkroket on Tuesday 20 July 2010, 12:41:21 am
Max object size = 1000 KB. You are only caching files below 1MB.
Web Interface is wrong (at least in 2.3), max object size is measured internally as KB, not as MB.