Welcome, Guest. Please login or register.
Did you miss your activation email?
Monday 23 December 2024, 01:45:26 pm

Login with username, password and session length

The Latest Endian Firewall is now available for download HERE
14262 Posts in 4377 Topics by 6517 Members
Latest Member: Sandro
Search:     Advanced search
+  EFW Support
|-+  Support
| |-+  General Support
| | |-+  How can I test to see if the cache is working ?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: How can I test to see if the cache is working ?  (Read 16928 times)
madswitcher
Jr. Member
*
Offline Offline

Posts: 6


« 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
Logged
mrkroket
Hero Member
*****
Offline Offline

Posts: 495


« Reply #1 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.

Logged
madswitcher
Jr. Member
*
Offline Offline

Posts: 6


« Reply #2 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
Logged
mrkroket
Hero Member
*****
Offline Offline

Posts: 495


« Reply #3 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.
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Page created in 0.078 seconds with 18 queries.
Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Design by 7dana.com