[squid-users] Odp: Re: Odp: Re: Odp: Re: Odp: Odp: Re: Only TCP_MISS
Robert
wrkilu at wp.pl
Fri Jan 16 16:17:47 UTC 2015
Dnia Piątek, 16 Stycznia 2015 04:10 Amos Jeffries <squid3 at treenet.co.nz> napisał(a)
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 16/01/2015 10:35 a.m., Robert wrote:
> > Dnia Czwartek, 15 Stycznia 2015 22:16 Yuri Voinov napisał(a)
> >> Oh,
> >>
> >> of course - you must to warm up cache first also.
> >>
> >> :)
> >>
> >
> > 1. warm up cache What the hell is that ? ;) , no Squid installation
> > guide says about it, please give me link to some (simple) guide to
> > warm up my swap to cache as much as possible
> >
>
> Squid of course *does not* come bundled with an installed copy of the
> entire Internet.
>
> A freshly installed or restarted[1] proxy has a cache in state called
> "cold". Each repeat fetch for a URL "warms" it.URL which are often
> requested are called "hot".
>
> You have to make one request where a MISS is guaranteed. That request
> tells Squid whether to cache the reply for *future* use. All that
> first request will tell you is whether the URL is possible to fetch.
> Nothing about caching in access.log.
>
> To know if a reply has been cached requires at least a second request.
> That ones access.log details say whether *it* was a hit or miss or
> refresh.
>
>
> [1] disk cache persist across restart. So simply restarting Squid
> resets to either cold or warm states depending on disk usage. Usually
> the hottest objects will be exclusively in RAM and the latest copy
> need fetching from the network on restart - this ensures that hot
> objects are always up to date and accurate.
>
>
> > 2. "First reason - HTTP headers. I.e, no cache. etc. You can
> > override them with refresh_patterns violations. :)" Again, please
> > tell me what refresh_patterns should I set to increase as most
> > caching , also with headers caching if this is possible
> >
>
> Please don't go that way. At least not now. So far it has been your
> testing methodology which is broken, not the sites operation. (Except
> that one doing Vary:User-Agent and nothing can be done in squid.conf
> about that.)
>
> Many of the refresh_pattern override/ignore options *break* HTTP and
> are only to be used if you understand the impact of what that use
> means, with a specific broken website that requires it. You need to
> know exactly *what* is broken about the website to be able to
> configure the overrides correctly for it.
>
>
> If you want better caching, ensure that you have the latest Squid
> available. We are constantly searching out ways to safely improve the
> amount Squid can store and remove the need for those overrides to
> exist at all.
>
>
>
> > 3. I did next text with site pkp.pl: 1421356447.223 193
> > 10.59.1.9 TCP_MISS/200 4657 GET
> > http://rozklad-pkp.pl/img/content/icons/disab.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356447.270 200
> > 10.59.1.9 TCP_MISS/200 4505 GET
> > http://rozklad-pkp.pl/img/content/icons/direct.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356447.274 961
> > 10.59.1.9 TCP_MISS/200 80175 GET
> > http://rozklad-pkp.pl/css/lato-bold-webfont.woff -
> > HIER_DIRECT/213.199.225.44 text/plain 1421356447.297 190
> > 10.59.1.9 TCP_MISS/200 1683 GET
> > http://rozklad-pkp.pl/img/content/icons/arrow-down-3.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356447.442 198
> > 10.59.1.9 TCP_MISS/200 1732 GET
> > http://rozklad-pkp.pl/img/content/icons/main/plus.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356447.455 193
> > 10.59.1.9 TCP_MISS/200 1834 GET
> > http://rozklad-pkp.pl/img/header/search.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356447.476 209
> > 10.59.1.9 TCP_MISS/200 1665 GET
> > http://rozklad-pkp.pl/img/content/icons/main/from.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356447.502 228
> > 10.59.1.9 TCP_MISS/200 1641 GET
> > http://rozklad-pkp.pl/img/content/icons/main/cal.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356447.525 2
> > 10.59.1.9 TCP_MEM_HIT/200 46701 GET
> > http://rozklad-pkp.pl/img/content/icons/map/mapa3.png - HIER_NONE/-
> > image/png 1421356447.530 246 10.59.1.9 TCP_MISS/200 1666 GET
> > http://rozklad-pkp.pl/img/content/icons/main/to.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356447.569 266
> > 10.59.1.9 TCP_MISS/200 1735 GET
> > http://rozklad-pkp.pl/img/content/icons/arrow-up-2.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356447.901 445
> > 10.59.1.9 TCP_MISS/200 8944 GET
> > http://rozklad-pkp.pl/img/content/bg/bn-na.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356447.932 471
> > 10.59.1.9 TCP_MISS/200 7638 GET
> > http://rozklad-pkp.pl/img/content/bg/bn-na_780.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356447.959 478
> > 10.59.1.9 TCP_MISS/200 6506 GET
> > http://rozklad-pkp.pl/img/content/bg/bn-na_480.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356448.457 916
> > 10.59.1.9 TCP_MISS/200 1573 GET
> > http://rozklad-pkp.pl/img/content/icons/main/minus.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356448.477 932
> > 10.59.1.9 TCP_MISS/200 1786 GET
> > http://rozklad-pkp.pl/hafas-res/img/sel_prod_ice.gif -
> > HIER_DIRECT/213.199.225.44 image/gif 1421356448.552 979
> > 10.59.1.9 TCP_MISS/200 1771 GET
> > http://rozklad-pkp.pl/hafas-res/img/sel_prod_ic.gif -
> > HIER_DIRECT/213.199.225.44 image/gif 1421356448.586 1281
> > 10.59.1.9 TCP_MISS/200 672 GET
> > http://bbcdn-bbnaut.ibillboard.com/server-static-files/bbnaut-b.swf
> > - HIER_DIRECT/194.213.222.30 application/x-shockwave-flash
> > 1421356448.668 741 10.59.1.9 TCP_MISS/200 1823 GET
> > http://rozklad-pkp.pl/hafas-res/img/sel_prod_ir-d.gif -
> > HIER_DIRECT/213.199.225.44 image/gif 1421356448.694 757
> > 10.59.1.9 TCP_MISS/200 1868 GET
> > http://rozklad-pkp.pl/hafas-res/img/sel_prod_re-rb.gif -
> > HIER_DIRECT/213.199.225.44 image/gif 1421356448.956 467
> > 10.59.1.9 TCP_MISS/200 9284 GET
> > http://rozklad-pkp.pl/img/content/banners/banner3.jpg -
> > HIER_DIRECT/213.199.225.44 image/jpeg 1421356448.973 477
> > 10.59.1.9 TCP_MISS/200 4047 GET
> > http://rozklad-pkp.pl/img/content/icons/arrow-up-4.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356448.976 417
> > 10.59.1.9 TCP_MISS/200 636 GET
> > http://rozklad-pkp.pl/css/images/ui-bg_flat_75_ffffff_40x100.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356449.045 324
> > 10.59.1.9 TCP_MISS/200 5414 GET
> > http://rozklad-pkp.pl/img/content/icons/bullet-active.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356449.064 338
> > 10.59.1.9 TCP_MISS/200 4736 GET
> > http://rozklad-pkp.pl/img/content/icons/bullet.png -
> > HIER_DIRECT/213.199.225.44 image/png 1421356449.110 917
> > 10.59.1.9 TCP_MISS/200 16451 GET
> > http://rozklad-pkp.pl/img/content/banners/banner2.jpg -
> > HIER_DIRECT/213.199.225.44 image/jpeg 1421356449.321 179
> > 10.59.1.9 TCP_MISS/200 1594 GET http://rozklad-pkp.pl/favicon.ico -
> > HIER_DIRECT/213.199.225.44 image/vnd.microsoft.icon 1421356449.658
> > 348 10.59.1.9 TCP_MISS/304 167 GET
> > http://bbnaut.ibillboard.com/g/ca2 - HIER_DIRECT/62.209.227.210 -
> >
> >
> > .. and once again I see many picture files not cached , why ?
>
> The servers clock is out of sync. And there is again only one fetch
> for each object in your log so no way to know if they are cold
> requests or whats going on. bit of a mstery even why mapa3.png *does* HIT.
>
>
> Amos
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.22 (MingW32)
>
> iQEcBAEBAgAGBQJUuIEWAAoJELJo5wb/XPRjAxkH/2C9fzceKXb/OQ+I912SRZjm
> QbQ+4WgN/1MAw4PLatu9NIhQGC2rnh3cipnQX5dbYA8iqlocWjkt6mvkhW3kJMfE
> 4FDjJChaewQ0VkduLQF6bKFrND9rG7mCXnxNcWneLrtEFOzIEn9uB8phiVRWS9mZ
> zXerPWjW2aqOJ+aVPMxUROAFIhpJot6s0c8unFXSQ3jqDidqgiPeFWp56o45bDdt
> LSm79pU1dadcFsGxN84xKsKIDDvSmJSHLDJ78v4ixlUna5saRuPgSj2v+Zd4a/Sg
> ki4+tDnT3NCz7jMnZqmBhHXfXWlqPVacBFC6jYoWQ1od5kCZfeiqaMMQDeMhvjY=
> =K81h
> -----END PGP SIGNATURE-----
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
>
Ok, yours answer and Yuri's are comprehensive for me. Now I know that not every element from site can be cached and also testing of caching have to be done in proper way. After reading this whole thread everybody will know about them.
Even I tested (in one browser) with clearing cache in it some site and I got well caching in Squid (TCP_HITs and TCP_MEM_HITs)
So.. Squid v.3.3.8 on Ubuntu14 is good and works well and so on.. :)
Thank you very much to all for answers, I think this thread will be helpful for others.
Cheers!
More information about the squid-users
mailing list