[squid-users] Slower from cache??

From: Peter Smith <peter.smith@dont-contact.us>
Date: Fri, 14 Jun 2002 11:28:13 -0500

I recently stumbled across this behavior on one of my proxys. This is a
test proxy and is not used often. I proxy an ftp file of considerable
size and everything goes as planned. However, getting the file from the
cache appears slower than the original internet-based download. Btw, I
am lucky in that I am on Internet2, so ~2.5MB/s is normal. I don't see
how I could possibly be misconfigured. During this whole test the proxy
is practically asleep it is so underutilised. Is there anything I
should look at? I also don't see how it could be my hardware and/or
software. It just looks like Squid is not functioning well.

[root@client tmp]# time ftp_proxy=proxy:3128 wget
ftp://ftp.ttu.edu/pub/mirrors/kernel.org/linux/kernel/v2.4/linux-2.4.18.tar.gz
--04:59:02--
ftp://ftp.ttu.edu/pub/mirrors/kernel.org/linux/kernel/v2.4/linux-2.4.18.tar.gz
           => `linux-2.4.18.tar.gz.6'
Connecting to proxy:3128... connected!
Proxy request sent, awaiting response... 200 OK
Length: 30,108,170 [application/x-tar]

    0K .......... .......... .......... .......... .......... 0% @
531.91 KB/s
   50K .......... .......... .......... .......... .......... 0% @
1.74 MB/s
  100K .......... .......... .......... .......... .......... 0% @
2.22 MB/s
  150K .......... .......... .......... .......... .......... 0% @
2.22 MB/s
  200K .......... .......... .......... .......... .......... 0% @
2.22 MB/s
...
29200K .......... .......... .......... .......... .......... 99% @
3.05 MB/s
29250K .......... .......... .......... .......... .......... 99% @
2.33 MB/s
29300K .......... .......... .......... .......... .......... 99% @
2.44 MB/s
29350K .......... .......... .......... .......... .......... 99% @
2.44 MB/s
29400K .. 100% @
76.05 KB/s

04:59:14 (2.41 MB/s) - `linux-2.4.18.tar.gz.6' saved [30108170/30108170]

real 0m12.349s
user 0m0.150s
sys 0m0.680s

-------------------------
1024070757.154 12341 proxy TCP_MISS/200 30108463 GET
ftp://ftp.ttu.edu/pub/mirrors/kernel.org/linux/kernel/v2.4/linux-2.4.18.tar.gz
- DIRECT/129.118.2.10 application/x-tar
-------------------------
[root@client tmp]# time ftp_proxy=proxy:3128 wget
ftp://ftp.ttu.edu/pub/mirrors/kernel.org/linux/kernel/v2.4/linux-2.4.18.tar.gz
--04:59:24--
ftp://ftp.ttu.edu/pub/mirrors/kernel.org/linux/kernel/v2.4/linux-2.4.18.tar.gz
           => `linux-2.4.18.tar.gz.7'
Connecting to proxy:3128... connected!
Proxy request sent, awaiting response... 200 OK
Length: 30,108,170 [application/x-tar]

    0K .......... .......... .......... .......... .......... 0% @
209.21 KB/s
   50K .......... .......... .......... .......... .......... 0% @
191.57 KB/s
  100K .......... .......... .......... .......... .......... 0% @
227.27 KB/s
  150K .......... .......... .......... .......... .......... 0% @
192.31 KB/s
  200K .......... .......... .......... .......... .......... 0% @
209.21 KB/s
...
29200K .......... .......... .......... .......... .......... 99% @
207.47 KB/s
29250K .......... .......... .......... .......... .......... 99% @
193.05 KB/s
29300K .......... .......... .......... .......... .......... 99% @
248.76 KB/s
29350K .......... .......... .......... .......... .......... 99% @
9.77 MB/s
29400K .. 100% @
2.45 MB/s

05:01:26 (241.42 KB/s) - `linux-2.4.18.tar.gz.7' saved [30108170/30108170]

real 2m1.816s
user 0m0.130s
sys 0m0.290s

-------------------------
1024070888.819 121808 proxy TCP_HIT/200 30108471 GET
ftp://ftp.ttu.edu/pub/mirrors/kernel.org/linux/kernel/v2.4/linux-2.4.18.tar.gz
- NONE/- application/x-tar
-------------------------
[root@proxy root]# squid -v
Squid Cache: Version 2.4.STABLE3
-------------------------
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

acl virus1 urlpath_regex /readme\.exe$
http_access deny virus1

acl virus2a dstdomain us.f1.yahoofs.com
acl virus2b urlpath_regex /timeupdate\.exe$
http_access deny virus2a virus2b

acl virus3 urlpath_regex /explorer\.exe$
http_access deny virus3

acl all src 0.0.0.0/0.0.0.0
acl CONNECT method CONNECT
http_access allow all

# SNMP:
acl snmppublic snmp_community XXXX
snmp_access allow snmppublic
snmp_access deny all

# Timeouts:
read_timeout 5 minutes
request_timeout 30 seconds
pconn_timeout 60 seconds
half_closed_clients on
shutdown_lifetime 0 seconds
negative_ttl 30 seconds
icp_query_timeout 1000 milliseconds
reference_age 1 week

cache_effective_user squid
cache_effective_group squid
cache_dir diskd /cache1 4096 64 64 Q1=72 Q2=64
cache_dir diskd /cache2 4096 64 64 Q1=72 Q2=64
cache_dir diskd /cache3 4096 64 64 Q1=72 Q2=64
cache_mem 400 MB

maximum_object_size 256 MB
minimum_object_size 0
request_body_max_size 0
request_header_max_size 64 KB

announce_host localhost
visible_hostname proxy
http_port 3128
cache_store_log none
fqdncache_size 0
Received on Fri Jun 14 2002 - 10:27:27 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:08:41 MST