On 25/10/2012 7:24 p.m., Ben wrote:
Hi,
I upgraded my squid boxes from 3.1 series to 3.2 series. I noticed
that 3.2 is not better then 3.1 while concerning with caching
capabilities.
I checked for simple web site , which has jpg images and all. as web
site is standard and normal site. So squid must cache it contents. I
tried many times, but each time i saw TCP_MISS in access.log
I checked for a site which is elitecore.com ( as example )
redbot url: http://redbot.org/?descend=True&uri=http://elitecore.com -
it suggests that this site is cacheable.
squid version : 3.2.3
currently, there is no change in squid.conf. I am using default one
for testing purposes.
what could be problem with squid-3.2.3? Is there any changes required
for 3.2.3 configuration or any changes in caching mechanism for 3.2
series?
Firstly, TCP_MISS does *not* mean anything about whether the response to
a previous request or to the curent request was cached. All it means is
the current request was not serviced by anything already existing in cache.
Both the client request headers AND the cached response headers are
taken into account when deciding whether a response can be served from
cache. It is perfectly reasonable to get a log trace like this from a
client requesting brand new object and rejecting anything that might be
stale (max-age=0).
Since the site uses User-Agent in its Vary: header it is perfectly
possible that each client request has a different agent string and
MISS'es the previously cached entry. Even one byte of change in the
agent string will cause those objects to MISS.
But since you said 3.1 was working okay it is probably not this issue
which affects all caches.
For more info on what 3.2.3 is caching you can log at debug level 11,3
and get log about each response and whether it was determined cacheable.
Look for "cacheableReply" and a YES/NO with explained reason.
Amos
I tested same site with 3.1. series and it is working fine.
access.log :
1351098321.835 80 192.168.1.23 TCP_MISS/200 3414 GET
http://elitecore.com/ - HIER_DIRECT/180.179.100.102 text/html
1351098321.876 19 192.168.1.23 TCP_MISS/200 1280 GET
http://elitecore.com/css/stylesheet.css - HIER_DIRECT/180.179.100.102
text/css
1351098321.898 37 192.168.1.23 TCP_MISS/200 1352 GET
http://elitecore.com/js/menu.js - HIER_DIRECT/180.179.100.102
application/javascript
1351098321.899 21 192.168.1.23 TCP_MISS/200 421 GET
http://elitecore.com/images/aarow_bullet.gif -
HIER_DIRECT/180.179.100.102 image/gif
1351098321.913 52 192.168.1.23 TCP_MISS/200 3682 GET
http://elitecore.com/js/menuscript.js - HIER_DIRECT/180.179.100.102
application/javascript
1351098321.919 57 192.168.1.23 TCP_MISS/200 5755 GET
http://elitecore.com/images/header_curve.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098321.919 57 192.168.1.23 TCP_MISS/200 9629 GET
http://elitecore.com/images/elitecore_logo.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098321.922 22 192.168.1.23 TCP_MISS/200 1156 GET
http://elitecore.com/images/home-mod-bot.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098321.941 1 192.168.1.23 TCP_MEM_HIT/200 33122 GET
http://meltwaternews.com/magenta/xml/html/51/05/v2_374671.html -
HIER_NONE/- text/html
1351098321.973 1 192.168.1.23 TCP_MEM_HIT/200 57559 GET
http://meltwaternews.com/js/jquery_1.3.js - HIER_NONE/-
application/javascript
1351098322.019 0 192.168.1.23 TCP_MEM_HIT/200 906 GET
http://meltwaternews.com/ext/a3logics/APAC/Images/FBN-32333bg1.png -
HIER_NONE/- image/png
1351098322.145 247 192.168.1.23 TCP_MISS/200 5305 GET
http://elitecore.com/images/Telecommunication-icon.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098322.365 446 192.168.1.23 TCP_MISS/200 7354 GET
http://elitecore.com/images/AccessGateway-icon.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098322.575 662 192.168.1.23 TCP_MISS/200 6562 GET
http://elitecore.com/images/NetworkSecurity-icon.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098322.584 437 192.168.1.23 TCP_MISS/200 5460 GET
http://elitecore.com/images/menu_bkgd.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098322.865 498 192.168.1.23 TCP_MISS/200 5487 GET
http://elitecore.com/images/flyout_bkgd.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098323.379 514 192.168.1.23 TCP_MISS/200 5482 GET
http://elitecore.com/images/footer_bkgd.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098323.635 1710 192.168.1.23 TCP_MISS/200 5919 GET
http://elitecore.com/images/body_bkgd.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098324.097 2235 192.168.1.23 TCP_MISS/200 38616 GET
http://elitecore.com/images/home_banner_new.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098325.362 2786 192.168.1.23 TCP_MISS/200 441 GET
http://elitecore.com/images/home-mod-top-rep.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098325.765 3826 192.168.1.23 TCP_MISS/200 15368 GET
http://www.google-analytics.com/ga.js - HIER_DIRECT/173.194.36.36
text/javascript
1351098325.861 3276 192.168.1.23 TCP_MISS/200 518 GET
http://elitecore.com/images/homepage-mod-top2.jpg -
HIER_DIRECT/180.179.100.102 image/jpeg
1351098326.073 4153 192.168.1.23 TCP_MISS/200 46409 GET
http://elitecore.com/images/customers-new.gif -
HIER_DIRECT/180.179.100.102 image/gif
1351098326.676 865 192.168.1.23 TCP_MISS/200 432 GET
http://www.google-analytics.com/__utm.gif? - HIER_DIRECT/173.194.36.36
image/gif
1351098328.980 2291 192.168.1.23 TCP_MISS/200 21700 GET
http://elitecore.com/favicon.ico - HIER_DIRECT/180.179.100.102
image/x-icon
BR
Ben