Search squid archive

Re: TCP_MISS in images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/07/2015 4:02 a.m., Ulises Nicolini wrote:
> Hello,
> 
> I have a basic squid 3.5 configuration with
> 
> maximum_object_size_in_memory 64 KB
> maximum_object_size 100000 KB
> minimum_object_size 512 bytes
> 
> refresh_pattern -i \.(gif|png|jpg|jpeg|ico)$ 1440 90% 10080
> override-expire ignore-no-cache ignore-private
> refresh_pattern -i (/cgi-bin/)                  0       0%      0
> refresh_pattern .                                       0 20%     4320
> 

ignore-no-cache has no meaning for Squid-3.5.

ignore-private does nothing on your images. It makes current Squid act
like must-revalidate was set on the response instead of "private".

override-expire also does nothing on your images. As used above it makes
Squid act like "s-maxage=604800" was given instead of any Expires:
header or max-age=N / s-maxage=N Cache-Control values.


> 
> cache_dir rock  /cache1/rock1 256  min-size=500 max-size=32767
> max-swap-rate=250 swap-timeout=350
> cache_dir diskd /cache2/diskd1 1000 16 256 min-size=32768 max-size=1048576
> cache_dir diskd /cache2/diskd2 100000 16 256 min-size=1048576
> 
> 
> But when I test it against my webserver, using only one client PC, the
> only thing I get are TCP_MISSes of my images.
> 
> 1437664284.339     11 192.168.2.103 TCP_MISS/200 132417 GET
> http://test-server.com/images/imagen3.jpg - HIER_DIRECT/192.168.2.10
> image/jpeg
> 1437664549.753      5 192.168.2.103 TCP_MISS/200 53933 GET
> http://test-server.com/images/imagen1.gif - HIER_DIRECT/192.168.2.10
> image/gif
> 1437665917.469     18 192.168.2.103 TCP_MISS/200 8319 GET
> http://test-server.com/images/icono.png - HIER_DIRECT/192.168.2.10
> image/png
> 
> The response headers don't have Vary tags or any other that may impede
> caching
> 
> Accept-Ranges    bytes
> Connection    close
> Content-Length    53644
> Content-Type    image/gif
> Date    Thu, 23 Jul 2015 15:56:07 GMT
> Etag    "e548d4-d18c-51b504b95dec0"
> Last-Modified    Mon, 20 Jul 2015 15:36:03 GMT
> Server    Apache/2.2.22 (EL)
> 

Your refresh pattern says to only cache these objects for +90% of their
current age, so long as that period is longer than 1 day (1440 mins) and
no more that 7 days (10080 mins).

Which means;
 they are 3 days 20 mins 4 secs old right now (260404 secs).
 90% of that is 2 days 17 hrs 6 mins 3 secs (234363 secs).

So the object "e548d4-d18c-51b504b95dec0" will stay in cache for the
next 2 days 17hrs etc.

I notice though that the Content-Length size does not match any of the
logged transfer sizes. Which makes me wonder if the object is actually
varying despite the lack of Vary headers.


> 
> Is it necessary a certain amount of requests of a single object to be
> cached (mem o disk) or am I facing some other problem here?

Yes. Two requests. The first (a MISS) will add it to cache the second
and later should be HITs on the now cached object.

BUT, only if you are not force-reloading the browser for your tests.
Force-reload instructs Squid it ignore its cached content and replace it
with another MISS.


Amos
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux