Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Slow squid

18 views
Skip to first unread message

Vijay Gharge

unread,
Jul 15, 2009, 4:19:28 AM7/15/09
to
Dear all,

I am using following squid version with tproxy & WCCP support.

Squid Cache: Version 2.6.STABLE18
configure options: '--enable-linux-tproxy' '--enable-async-io' '--
enable-kill-parent-hack' '--enable-time-hack' '--enable-linux-
netfilter' '--enable-useragent-log' '--enable-snmp' '--enable-delay-
pools' '--prefix=/usr/local/squid' '--with-maxfd=32768'

Traffic details -

>10,000 concurrent users (avg)
>300 hits/second (avg)

Dual core Intel Xeon cpu 2.33GHz
Physical memory 4 GB
Raid 5 with total 73.3 GB usable disk space

Following is the squid configuration -

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
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
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
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
acl bad_sites dstdom_regex -i "/usr/local/squid/etc/squid-block.acl"
http_access deny bad_sites
acl block_cache_access dstdom_regex -i "/usr/local/squid/etc/
block_cache.acl"
no_cache deny block_cache_access
acl bypass_domains_net dst "/usr/local/squid/etc/
bypass_domains_net.acl"
no_cache deny bypass_domains_net
acl direct_access_url dstdom_regex "/usr/local/squid/etc/
direct_access_url.acl"
always_direct allow direct_access_url
acl our_networks src W.X.Y.Z/A
http_access allow our_networks
http_access deny all
acl snmp_check snmp_community abcdef
snmp_access allow snmp_check localhost
icp_access allow all
http_port 80 transparent tproxy
tcp_outgoing_address w.x.y.z
hierarchy_stoplist cgi-bin ?
cache_dir ufs /cache 20000 16 256
access_log /usr/local/squid/var/logs/access.log squid
cache_store_log none
url_rewrite_children 10
url_rewrite_concurrency 50
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
read_ahead_gap 32 KB
store_avg_object_size 65 KB
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
visible_hostname abcded
wccp2_router q.x.y.z
wccp2_router a.b.c.d
wccp_version 2
wccp2_service dynamic 91
wccp2_service dynamic 90
wccp2_service_info 91 protocol=tcp flags=src_ip_hash priority=0
ports=80
wccp2_service_info 90 protocol=tcp flags=dst_ip_hash,ports_source
priority=0 ports=80
always_direct allow all
dns_nameservers w.x.y.z
coredump_dir /usr/local/squid/var/cache
pipeline_prefetch on

access list list use hardly 4-5 hosts per list.

I am using following tcp tuning configurations -

echo 1 > /proc/sys/net/ipv4/ip_forward
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo 4096 > /proc/sys/net/ipv4/tcp_max_syn_backlog
echo 65536 > /proc/sys/fs/file-max
echo 0 > /proc/sys/net/ipv4/tcp_tw_recycle
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
echo 65536 > /proc/sys/net/ipv4/tcp_max_tw_buckets
echo 15 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
echo 180000 > /proc/sys/net/core/netdev_max_backlog
echo 131072 > /proc/sys/net/ipv4/ip_conntrack_max

When I try to fetch content from internet directly (without user
traffic) , it gives me following o/p

[root@XXXX logs]# time wget http://www.us.kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.gz
--22:26:12-- http://www.us.kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.gz
=> `linux-2.6.9.tar.gz'
Resolving www.us.kernel.org... 155.98.64.81, 69.63.177.230,
64.38.239.201, ...
Connecting to www.us.kernel.org|155.98.64.81|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 45,500,766 (43M) [application/x-gzip]

100%
[==================================================================================================>]
45,500,766 5.25M/s ETA 00:00

22:26:32 (2.95 MB/s) - `linux-2.6.9.tar.gz' saved [45500766/45500766]
real 0m20.355s
user 0m0.028s
sys 0m0.324s
[root@XXXX logs]#


And with squid it is (without user traffic) :

[root@XXXX logs]# export http_proxy=http://a.b.c.d:80
[root@XXXX logs]# time wget http://www.us.kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.gz
--22:27:57-- http://www.us.kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.gz
=> `linux-2.6.9.tar.gz.1'
Connecting to 203.88.1.133:80... connected.
Proxy request sent, awaiting response... 200 OK
Length: 45,500,766 (43M) [application/x-gzip]

100%
[==================================================================================================>]
45,500,766 325.37K/s ETA 00:00

22:30:18 (315.12 KB/s) - `linux-2.6.9.tar.gz.1' saved
[45500766/45500766]


real 2m21.530s
user 0m0.104s
sys 0m0.480s
[root@XXXX logs]#

Can anyone please tell me why squid performance is so low!

Thanks in advance!

Regards,
Vijay

0 new messages