On 10/11/2015 9:49 p.m., 徐永健 wrote: > Hi, All: > I tried to use squid as a web cache server today, but when I test it with http_load, I found squid may have a latency of 2 seconds in some cases. > Someone help me? Thanks! > The test is > ------- > http_load -parallel 1 -seconds 20 url.txt > # the content in url.txt is `http://10.210.136.51:3128/xyj/1` > ------ > config for squid is > ----- > http_port 3128 accel vhost vport > cache_peer 10.210.136.51 parent 8888 0 > # use mem only > cache_mem 1000 MB > ----- > The access log > ----- > 1447142491.264 39 10.210.136.54 TCP_MEM_HIT_ABORTED/200 4165 GET http://10.210.136.51:3128/xyj/1 - HIER_NONE/- application/octet-stream > 1447142491.283 37 10.210.136.54 TCP_MEM_HIT_ABORTED/200 4165 GET http://10.210.136.51:3128/xyj/1 - HIER_NONE/- application/octet-stream > 1447142493.288 2023 10.210.136.54 TCP_MEM_HIT_ABORTED/200 4165 GET http://10.210.136.51:3128/xyj/1 - HIER_NONE/- application/octet-stream # 2023 ms! why? > 1447142493.307 2023 10.210.136.54 TCP_MEM_HIT_ABORTED/200 4165 GET http://10.210.136.51:3128/xyj/1 - HIER_NONE/- application/octet-stream # 2023 ms! why? > 1447142493.326 38 10.210.136.54 TCP_MEM_HIT_ABORTED/200 4165 GET http://10.210.136.51:3128/xyj/1 - HIER_NONE/- application/octet-stream > 1447142493.348 40 10.210.136.54 TCP_MEM_HIT_ABORTED/200 4165 GET http://10.210.136.51:3128/xyj/1 - HIER_NONE/- application/octet-stream None of these log lines look good. The 2sec response times is the least of your worries. The client is ABORT'ing transactions without completing them. If the tester is pushing your Squid to its load limit. Then transaction slowdown is the expected behaviour. When resources a transaction needs to complete are unavailable, Squid pauses its processing until they become avilable. Those resources may be CPU, sockets, buffer memory, or simply I/O access to the cache object. Amos _______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users