Search squid archive

Re: Unable to get TCP_MEM_HIT (just TCP_HIT) with rock storage

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

 



在 2017/10/18 上午12:23, Alex Rousskov 写道:
On 10/16/2017 10:30 PM, duanyao wrote:

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

Is this normal, or something is mis-configured?
Neither :-). You are testing with a Vary-controlled response. The shared
memory cache does not support caching of Vary-controlled responses yet.
I failed to find a dedicated feature request for implementing this, but
the problem has been known for several years [1,2,3].

[1]
http://bazaar.launchpad.net/~measurement-factory/squid/bag5s/revision/12743
[2] https://bugs.squid-cache.org/show_bug.cgi?id=3806#c9
[3]
https://github.com/squid-cache/squid/commit/b8a899c01051c27f2d46f5b9fcbcd27622f388ff


I guess this issue will unlikely be fixed any time soon. So is there any workaround? Something in my mind: 1) Configure squid to ignore "Vary: Accept-Encoding" and assume all clients can handle any Content-Encoding from original servers (this make sense in my use case).
2) Use non-shared memory cache with Rock storage.

I do get TCP_MEM_HIT with ufs storage.
To be more precise, you are getting TCP_MEM_HIT with a non-shared memory
cache. This is not a Rock problem; it is a shared memory cache problem.
Switching to UFS appears to help because it disables SMP and shared
memory caching in your specific Squid configuration.


Please note that your cache.log does not contain the lines relevant to
storing the response in the memory cache so there may be other,
additional reasons why your test response does not get memory-cached. If
you continue testing and need to report more details, please start from
a clean cache and post the log containing the very first (cache miss)
transaction as well as the subsequent (hit) transactions. Compress the
logs as needed.


Thank you,

Alex.



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



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



_______________________________________________
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