[squid-users] Re: Squid 3.3.2 and SMP

From: Ahmad <ahmed.zaeem_at_netstream.ps>
Date: Fri, 8 Mar 2013 19:30:59 -0800 (PST)

hi Guys ,
@alex , you said that just add the "workers" in squid.conf ??
how many workers do i need ?
 i think i have 24 cores with 2 main cpu , i think 12 of them are idle
beacuse 1 main cou is working !!!
i will print my cores in my server :
*[root_at_squid ahmd]# mpstat -P ALL
Linux 3.7.5 (squid) 03/08/2013 _x86_64_ (24 CPU)

10:24:04 PM CPU %usr %nice %sys %iowait %irq %soft %steal
%guest %idle
10:24:04 PM all 2.61 0.00 1.27 9.58 0.00 0.60 0.00
0.00 85.94
10:24:04 PM 0 1.19 0.00 0.84 18.50 0.00 0.27 0.00
0.00 79.19
10:24:04 PM 1 11.35 0.02 5.17 34.72 0.00 0.30 0.00
0.00 48.44
10:24:04 PM 2 0.35 0.00 0.41 14.69 0.00 0.01 0.00
0.00 84.54
10:24:04 PM 3 3.12 0.00 1.55 21.61 0.00 0.00 0.00
0.00 73.72
10:24:04 PM 4 0.39 0.00 0.41 14.31 0.00 0.01 0.00
0.00 84.89
10:24:04 PM 5 1.99 0.00 1.05 18.78 0.00 0.00 0.00
0.00 78.17
10:24:04 PM 6 0.42 0.00 0.44 14.63 0.00 0.01 0.00
0.00 84.49
10:24:04 PM 7 1.28 0.00 0.61 11.41 0.00 0.00 0.00
0.00 86.70
10:24:04 PM 8 0.29 0.00 0.39 14.83 0.00 0.01 0.00
0.00 84.48
10:24:04 PM 9 1.16 0.00 0.58 8.92 0.00 0.00 0.00
0.00 89.34
10:24:04 PM 10 0.28 0.00 0.38 14.75 0.00 0.01 0.00
0.00 84.58
10:24:04 PM 11 1.11 0.00 0.53 5.88 0.00 0.00 0.00
0.00 92.48
10:24:04 PM 12 0.10 0.00 0.11 5.35 0.00 0.00 0.00
0.00 94.44
10:24:04 PM 13 11.94 0.00 5.14 1.17 0.00 4.03 0.00
0.00 77.71
10:24:04 PM 14 1.29 0.00 0.65 4.38 0.00 0.56 0.00
0.00 93.13
10:24:04 PM 15 10.42 0.00 4.66 1.65 0.00 3.68 0.00
0.00 79.59
10:24:04 PM 16 1.18 0.00 0.61 4.34 0.00 0.50 0.00
0.00 93.38
10:24:04 PM 17 0.18 0.00 0.09 2.00 0.00 0.03 0.00
0.00 97.69
10:24:04 PM 18 0.03 0.00 0.07 4.43 0.00 0.00 0.00
0.00 95.47
10:24:04 PM 19 8.15 0.00 3.69 1.58 0.00 2.88 0.00
0.00 83.70
10:24:04 PM 20 0.05 0.00 0.08 4.43 0.00 0.00 0.00
0.00 95.45
10:24:04 PM 21 7.28 0.00 3.36 1.45 0.00 2.45 0.00
0.00 85.47
10:24:04 PM 22 0.02 0.00 0.08 4.65 0.00 0.00 0.00
0.00 95.25
10:24:04 PM 23 0.07 0.00 0.04 0.91 0.00 0.00 0.00
0.00 98.98
*
=============================
asume i have squid.conf file as below :
[root_at_squid ~]# cat /etc/squid/squid.conf
#
# Recommended minimum configuration:
#

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged)
machines
##############################
acl mynet src 1x.x.x.6.0/22 x.x.x.0/20
##############################
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

#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager

# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost
####################################################
visible_hostname squid
cache_effective_user squid
cache_effective_group squid
####################################################

#####################################################
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost
http_access allow mynet

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 65000
http_port 127.0.0.1:3128
http_port x.x.x.x:65000
http_port 3129 tproxy

# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /usr/local/squid/var/cache/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /usr/local/squid/var/cache/squid

# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern .
================================
what do i need to modify with it to get maximum cpu usage ??
========================
@alex
also , i noted that u enclosed two files in
http://pastebin.com/dbXNEj5F

what about the 2nd file ??

with my best regards

--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-3-3-2-and-SMP-tp4658901p4658911.html
Sent from the Squid - Users mailing list archive at Nabble.com.
Received on Sat Mar 09 2013 - 03:31:01 MST

This archive was generated by hypermail 2.2.0 : Sat Mar 09 2013 - 12:00:04 MST