Hi,
I've 2 problems where squid is taking excessive time to service a request.
My setup:
-Accelerator setup
-backends are on load balancer, squid is configured to connect to the
load balancer IP multiple times
-squid's configured to store the cache as long as possible.
-icp time is set to really high, otherwise some siblings doesn't respond
in time. Should this be lowered?
Version:
Squid Cache: Version 2.7.STABLE9
configure options: '--prefix=/apps/squid' '--enable-x-accelerator-vary'
'--enable-linux-netfilter' '--enable-cache-digests' '--enable-htcp'
'--enable-snmp' '--enable-referer-log' '--enable-useragent-log'
'--enable-delay-pools' '--enable-icmp' '--enable-async-io=500'
'--with-maxfd=10240' '--enable-removal-policies=lru,heap'
'--enable-follow-x-forwarded-for' '--enable-epoll' '--with-large-files'
Relevant config:
http_port 80 vhost defaultsite=cache.example.com
cache_mem 512 MB
cache_peer lb.example.com parent 80 0 round-robin no-query originserver
no-netdb-exchange no-digest name=lb_01
... <snip>
cache_peer lb.example.com parent 80 0 round-robin no-query originserver
no-netdb-exchange no-digest name=lb_10
cache_peer cache01.example.com sibling 80 3130 proxy-only no-delay
allow-miss weight=1 no-netdb-exchange no-digest name=cache01
..<snip>
cache_peer cache08.example.com sibling 80 3130 proxy-only no-delay
allow-miss weight=1 no-netdb-exchange no-digest name=cache08
client_persistent_connections off
server_persistent_connections off
digest_generation off
icp_access allow all
icp_hit_stale on
icp_query_timeout 7000
maximum_icp_query_timeout 10000
nonhierarchical_direct off
url_rewrite_host_header off
offline_mode on
--------------------------------------
TIMEOUT_ROUNDROBIN_PARENT
All the TIMEOUT requests took at least 7000 ms, which is the value of
icp_query_timeout. Some requests took at over 30 sec to complete. I
crossed referenced those long requests against the backends and notice a
big mismatch in the times. The backends are tomcat apps w/ Java 1.6. I
extracted the times from the tomcat access log.
Squid Time Backend time:
7922 924
8422 1421
7488 487
12835 5833
25098 18096
34793 611
21806 14804
------------------------------------
High SIBLING_HIT response time:
The same problem occurs with sibling hits. The logged process time on
the sibling and the one requesting from the sibling vastly differs:
Squid Time Time on Sibling's Log
4534 30
23994 12959
6661 40
---------------
Does anyone know of a reason why it would take so long for squid to
complete a request??
mike