[squid-users] Unable to get TCP_MEM_HIT (just TCP_HIT) with rock storage

duanyao duanyao at ustc.edu
Tue Oct 17 04:30:37 UTC 2017


Hi,

When I test squid with rock storage, I have never got a TCP_MEM_HIT 
(just TCP_HIT) in access.log. I do get TCP_MEM_HIT with ufs storage.

Is this normal, or something is mis-configured?


I run squid locally, and run `curl -v -x localhost:3128 
http://localhost:8001/1000 > /dev/null` two times successively, and 
expect at least the second one being TCP_MEM_HIT, but it is always TCP_HIT.


Attachment "squid.conf" is my configuration file; and "cache.rock.log" 
is the part of cache.log during 2 successive accesses to a same URL; 
"anysize-server.js" is the HTTP server at port 8001 for the test, and 
you can run it by `node anysize-server.js`.


I tested squid 3.5.27 and 4.0.21, both compiled and run on Linux x86_64: 
`./configure --with-default-user=duanyao 
--prefix=/home/duanyao/project/proxy/squid-root/`.


Thanks.


Duan, Yao

-------------- next part --------------
#workers 2

shutdown_lifetime 3 second

acl localnet src 10.0.0.0/8	# RFC1918 possible internal network
acl localnet src 172.16.0.0/12	# RFC1918 possible internal network
acl localnet src 192.168.0.0/16	# RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80		# http
acl Safe_ports port 21		# ftp
acl Safe_ports port 443		# https
acl Safe_ports port 70		# gopher
acl Safe_ports port 210		# wais
acl Safe_ports port 1025-65535	# unregistered ports
acl Safe_ports port 280		# http-mgmt
acl Safe_ports port 488		# gss-http
acl Safe_ports port 591		# filemaker
acl Safe_ports port 777		# multiling http
acl CONNECT method CONNECT

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

http_access allow localhost manager
http_access deny manager

http_access allow localnet
http_access allow localhost

http_access deny all

http_port 3128

#cache_dir ufs /home/duanyao/project/proxy/squid-root/var/cache/squid/ufs 10 16 256
cache_dir rock /home/duanyao/project/proxy/squid-root/var/cache/squid/rock 10 slot-size=16384

cache_effective_user duanyao

# Leave coredumps in the first cache dir
coredump_dir /home/duanyao/project/proxy/squid-root/var/cache/squid

debug_options ALL,1 11,7 16,7 19,7 20,7 92,7 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cache.rock.log
Type: text/x-log
Size: 16063 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20171017/a93ea68f/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: anysize-server.js
Type: application/x-javascript
Size: 1905 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20171017/a93ea68f/attachment-0003.bin>


More information about the squid-users mailing list