[squid-users] Slow response with squid in a purely proxy mode with IWSS as parent

From: G.V.S.M Siva Kumar <gvsm66@dont-contact.us>
Date: Sun, 24 Jun 2007 10:27:38 -0700 (PDT)

Good people,
        We use RHEL 3.2 update 7 on single Intel Xeon,
2 GB ECC, U320 SCSI with squid version 2.5.STABLE3
that came bundled with RHEL in a purely proxy mode
with caching disabled and Trendmicro's IWSS. (All on
the same machine). We depend on our ISP to provide
name resolution. We use a 1 Mbps link to Internet.
                                                      
                                                      
               
        We have problem with response time. I followed
all the threads of a 09/2005 question reg., slower
connections. We are facing the same problem. I've
checked my configs against the replies to the above
question without any improvement in the response time.
Please excuse me for asking the same question. The FAQ
also seems to be of no help. I checked the mail
archives also. I have enabled system accounting 'sar'
and checked for obvious bottlenecks. every thing
seems to be ok. The system seems to be idling much of
the time, as we have only 70 users and concurrent
usage is limited to about 50%. I've purchased the
O'Reilly's squid book and wormed through it without
much success. I've checked my firewall port statistics
and dont see any traffic congestion. The link is only
used to 25% of its capacity. Also 'bing'ed the link
and verified that
I am getting 1 mbps speed.
                                                      
                                                      
               
        Our clients connect to squid listening on port
3128. squid authenticates the user and forwards the
requests to IWSS which is its cache_peer parent
listening on port 8080.
                                                      
                                                      
               
clients ==> squid on port 3128 ==> IWSS on port 8080
==> firewall ==> Internet
                                                      
                                                      
               
        I have disabled caching as our cache
utilization seems to be less than 5%. Our clients are
experiencing unbearable delays while browsing. I made
a
few tests and found out the following page loading
times.
        PC directly on Internet - 20 secs to load
www.bull.com page
        Same PC using squid (plus IWSS) through port
3128 - 60 secs (same page)
        Same PC going directly through IWSS on port
8080 - 40 secs (same page)
                                                      
                                                      
               
        I made a tcpdump capturing packets on all
interfaces under the condition that Iam the only one
connected to the proxy, with a direct cable. On
analysis of the tcpdump it is found that the proxy
server made a total of 160+ DNS queries while loading
the page of www.veritas.com. As this is quite a big
number, I checked our server's processes and started
nscd with hosts caching enabled. This, however, didnot
improve the situation.
                                                      
                                                      
               
        I am giving the squid.conf minus the acls.

http_port 3128
cache_peer xxproxy parent 8080 0 no-query default
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
acl all src 0.0.0.0/0
no_cache deny all
cache_dir ufs /var/spool/squid 500 16 256
dns_nameservers 218.248.240.y 218.248.240.x
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
ident_timeout 0 seconds
acl all src 0.0.0.0/0.0.0.0
never_direct allow all
coredump_dir /var/spool/squid
                                                      
                                                      
               
        I have enabled cachemgr and am surprised by
the following DNS stats.
---------------------------------------------
Internal DNS Statistics:
                                                      
                                                      
               
The Queue:
                       DELAY SINCE
  ID SIZE SENDS FIRST SEND LAST SEND
------ ---- ----- ---------- ---------
                                                      
                                                      
               
Nameservers:
IP ADDRESS # QUERIES # REPLIES
--------------- --------- ---------
218.248.240.x 0 0
218.248.240.y 0 0
                                                      
                                                      
               
Rcode Matrix:
RCODE ATTEMPT1 ATTEMPT2 ATTEMPT3
    0 0 0 0
    1 0 0 0
    2 0 0 0
    3 0 0 0
    4 0 0 0
    5 0 0 0
----------------------------------------------
                                                      
                                                      
               
General runtime info is given below (taken at night
10:30)
                                                      
                                                      
               
Connection information for squid:
        Number of clients accessing cache: 4
        Number of HTTP requests received: 59
        Number of ICP messages received: 0
        Number of ICP messages sent: 0
        Number of queued ICP replies: 0
        Request failure ratio: 0.00
        Average HTTP requests per minute since start:
 11.4
        Average ICP messages per minute since start:
 0.0
        Select loop called: 1330 times, 233.324 ms avg
Cache information for squid:
        Request Hit Ratios: 5min: 0.0%, 60min:
0.0%
        Byte Hit Ratios: 5min: 14.3%, 60min:
14.3%
        Request Memory Hit Ratios: 5min: 0.0%,
60min: 0.0%
        Request Disk Hit Ratios: 5min: 0.0%,
60min: 0.0%
        Storage Swap size: 363560 KB
        Storage Mem size: 88 KB
        Mean Object Size: 16.05 KB
        Requests given to unlinkd: 0
Median Service Times (seconds) 5 min 60 min:
        HTTP Requests (All): 0.72387 0.72387
        Cache Misses: 0.72387 0.72387
        Cache Hits: 0.00000 0.00000
        Near Hits: 0.00000 0.00000
        Not-Modified Replies: 0.00000 0.00000
        DNS Lookups: 0.00000 0.00000
        ICP Queries: 0.00000 0.00000
Resource usage for squid:
        UP Time: 310.321 seconds
        CPU Time: 0.450 seconds
        CPU Usage: 0.15%
        CPU Usage, 5 minute avg: 0.14%
        CPU Usage, 60 minute avg: 0.14%
        Process Data Segment Size via sbrk(): 4352 KB
        Maximum Resident Size: 0 KB
        Page faults with physical i/o: 530
Memory usage for squid via mallinfo():
        Total space in arena: 4352 KB
        Ordinary blocks: 4286 KB 10 blks
        Small blocks: 0 KB 0 blks
        Holding blocks: 200 KB 1 blks
        Free Small blocks: 0 KB
        Free Ordinary blocks: 65 KB
        Total in use: 4486 KB 99%
        Total free: 65 KB 1%
        Total size: 4552 KB
Memory accounted for:
        Total accounted: 2030 KB
        memPoolAlloc calls: 125598
        memPoolFree calls: 56894
File descriptor usage for squid:
        Maximum number of file descriptors: 1024
        Largest file desc currently in use: 26
        Number of file desc currently in use: 24
        Files queued for open: 0
        Available number of file descriptors: 1000
        Reserved number of file descriptors: 100
        Store Disk files open: 0
Internal Data Structures:
         22680 StoreEntries
            23 StoreEntries with MemObjects
            21 Hot Object Cache Items
         22657 on-disk objects
------------------------------------------------------
                                                      
                                                      
               
        Can someone please throw some light on what is
creating the delays? Page loading is uniformly slower
for all sites.
                                                      
                                                      
               
        Also, please clarify the following.
                                                      
                                                      
               
        I assume that when my browser is configured to
use a proxy, it will not do any name resolution.
Instead, it provides the entire URI to the squid.
Now, when squid has a 'cache_peer parent, never direct
allow all' specified, will it perform any name
resolution or will it pass on the URL to the parent
(in this case IWSS). Which layer exactly does the name
resolution? I have a hunch this delay is because of
name resolution.
                                                      
                                                      
               
        I will be grateful if some one can provide a
solution or show a pointer. Thanks in advance.
                                                      
                                                      
               
        SivaKumar

       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
Received on Sun Jun 24 2007 - 11:27:50 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Jul 01 2007 - 12:00:04 MDT