On 20/08/2014 9:21 a.m., Délsio Cabá wrote: > Hi guys, > Need some help on cache. Basically I do not see many caches. > > root@c /]# cat /var/log/squid/access.log | awk '{print $4}' | sort | > uniq -c | sort -rn > 17403 TCP_MISS/200 > 3107 TCP_MISS/304 - objects in the client browser cache were used. > 1903 TCP_MISS/000 - server was contacted but no response came back. This is bad. Seeing it in such numbers is very bad. It is a strong sign that TCP window scaling, ECN or ICMP blocking (Path-MTUd) issues are occuring on your traffic. > 1452 TCP_MISS/204 - "204 no content" means there was no object to be cached. > 1421 TCP_MISS/206 - Range request responses. Squid cannot cache these yet, but they should be cached in the client browser and contribute to those 304 responses above. > 1186 TCP_MISS/302 - along with the MISS/301, MISS/303 these are not cacheable without special instructions. > 659 TCP_MISS/503 > 641 NONE/400 > 548 TCP_MISS/301 > 231 TCP_OFFLINE_HIT/200 - cached object used. > 189 TCP_MISS/404 > 126 TCP_IMS_HIT/304 - cache object found, but objects in the client browser cache were used. > 112 TCP_MISS/504 > 68 TCP_MISS/401 > 56 TCP_MEM_HIT/200 - cached object used. > 50 TCP_SWAPFAIL_MISS/304 - cached object found, but disk error occurred loading it. And the client request was conditional. So object in client browser cache used instead. > 49 TCP_REFRESH_UNMODIFIED/200 - cached objects found, mandatory update check required and resulted in Squid cached object being delivered to client. > 46 TCP_SWAPFAIL_MISS/200 > 39 TCP_MISS/500 > 36 TCP_MISS/502 > 34 TCP_REFRESH_UNMODIFIED/304 - cached objects found, mandatory update check required and resulted in client browser cache object being used. > 31 TCP_MISS/403 > 25 TCP_MISS/400 > 19 TCP_CLIENT_REFRESH_MISS/200 - cached object found, but client request forced a new fetch. > 17 TCP_REFRESH_MODIFIED/200 - cached object found, mandatory update check resulted in a new object being used. > 11 NONE/417 > 9 TCP_MISS/303 > 6 TCP_HIT/000 - cached object used, but client disconnected before it could be delivered. > 5 TCP_MISS/501 > 5 TCP_HIT/200 - cached object used. > 4 TCP_MISS/202 - this is usually only seen on POST or PUT. Which are not cacheable by Squid. > 3 TCP_MISS/412 > 2 TCP_SWAPFAIL_MISS/000 - cache object found, but disk error while loading it and the client disconnected before a server response was found. > 2 TCP_MISS/408 > 1 TCP_MISS/522 > 1 TCP_MISS/410 > 1 TCP_MISS/405 > 1 TCP_CLIENT_REFRESH_MISS/000 - cached object found, but client request mandated an update check. Then client disconnected before that was completed. All the 4xx and 5xx status responses are only cacheable short term and only if the server explicitly provides caching information. It looks like the servers in your traffic are not providing that info (or not correctly). Also, this grep counting does not account for what method the transaction used. Things like the 204 response and 30x responses cacheability depend on what method is involved. So I see 19k MISS and 4k HIT. About 18% hit rate. What version of Squid are you using? Amos