Hello folks,
Got a weird edge case with squid to do with slow FTP gets from the cache in the case of one client accessing the file. Speed goes up massively
when two clients or more want the same cached file.
Scenario:
Squid cache machine is dual Xeon 2GHz, 2GB RAM, 3 SCSI disks
(2 dedicated to squid cache), 100Mb link (will be 1Gb later).
1) Test condition: config squid to allow it to cache upto 1GB files.
2) Use wget to retrieve Mandrake ISO (651MB) via cache from offsite ftp server. Transfer speed is > 1MB/sec (it's a good ftp server!)
3) Reget the same file from one client in same way. Speed is now a
feeble (compared to no cache) 220KB/sec.
4) Here's the weird part. Simultaneously wget same file from same server via the cache on same OR other PC. Speed of BOTH clients rockets to
3.6MB/sec sustained average.
Try a 3rd client, speed drops slightly but only because the 100Mb link to the squid cache is saturated. This shows that there is something special about the 1 client case.
Doing the same test over HTTP yields exact the same results implying
the problem may be to do with the back end storage part of squid???
This is just bugging me a bit because I hate to put in a cache that reduces speed by a significant factor in certain cases.
I'm sure it's a config problem on my part - does anyone have any theories as to what I might be looking for?
(Disclaimer - I've been over the FAQ, google, mailing lists already).
I would be most appreciative of a pointer on this one. The relevant parts (non comments) are appended to the end of this mail should it help...
Best wishes,
Tim Southerwood
*****Squid.conf******
http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 1600 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 1000 MB
minimum_object_size 0 KB
maximum_object_size_in_memory 128 MB
ipcache_size 65536
ipcache_low 90
ipcache_high 95
fqdncache_size 4096
cache_replacement_policy lru
memory_replacement_policy lru
cache_dir aufs /var/squid/cache 128000 16 16
cache_dir aufs /var/squid/cache1 128000 16 16
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
log_ip_on_direct on
mime_table /etc/squid/mime.conf
log_mime_hdrs off
pid_filename /var/run/squid.pid
debug_options ALL,1
log_fqdn off
client_netmask 255.255.255.255
ftp_user squid@doc.ic.ac.uk
ftp_list_width 50
ftp_passive off
ftp_sanitycheck on
diskd_program /usr/sbin/diskd
unlinkd_program /usr/sbin/unlinkd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
request_header_max_size 10 KB
request_body_max_size 0 KB
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 10080
refresh_pattern . 0 20% 10080
refresh_pattern microsoft\.com\/ 0 20% 10080
refresh_pattern scripps\.com\/ 10880 0% 10080
quick_abort_min 10 MB
quick_abort_max 10 MB
quick_abort_pct 70
negative_ttl 10 minutes
positive_dns_ttl 24 hours
negative_dns_ttl 10 minutes
connect_timeout 1 minutes
read_timeout 5 minutes
request_timeout 2 minutes
persistent_request_timeout 10 minute
client_lifetime 1 day
half_closed_clients on
pconn_timeout 300 seconds
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 873
acl Safe_ports port 80 # http
acl Safe_ports port 81 873
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl docnet src 146.169.0.0/255.255.0.0
acl icnet src 155.198.17.114/255.255.255.255
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow docnet
http_access allow icnet
http_access deny all
http_reply_access allow localhost
http_reply_access allow docnet
http_reply_access allow icnet
http_reply_access deny all
icp_access allow localhost
icp_access allow docnet
icp_access allow icnet
icp_access deny all
miss_access allow localhost
miss_access allow docnet
miss_access allow icnet
miss_access deny all
reply_body_max_size 0 allow all
cache_mgr ts@doc.ic.ac.uk
cache_effective_user squid
cache_effective_group squid
visible_hostname wwwcachetest.doc.ic.ac.uk
logfile_rotate 100
append_domain .doc.ic.ac.uk
err_html_text http://www.doc.ic.ac.uk/csg/
memory_pools on
forwarded_for on
cachemgr_passwd disable shutdown
cachemgr_passwd csgcsg info stats/objects
cachemgr_passwd disable all
client_db on
buffered_logs on
reload_into_ims off
as_whois_server whois.ra.net
delay_pools 2 # 2 delay pools
delay_class 1 2 # pool 1 is a class 2 pool
delay_class 2 3 # pool 2 is a class 3 pool
offline_mode off
uri_whitespace strip
coredump_dir /var/squid/cache
high_response_time_warning 100
high_page_fault_warning 100
store_dir_select_algorithm round-robin
*********************
Received on Wed Apr 16 2003 - 06:21:07 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:15:00 MST