[squid-users] Re: how distribute squid loads to cpus and memories using SMP feature??

From: Ahmad <ahmed.zaeem_at_netstream.ps>
Date: Fri, 25 Oct 2013 08:52:39 -0700 (PDT)

hi firecold , thanks for reply ,

i have tested simple smp file but i want to ask about issue ,
i found in the logs that squid exited normally , but it still working !!!!
i mean that in the logs say suqid exited , but i can access squid and there
still hits in squid.log !!

my question is , does that normal behavior in SMP mode ??

i will post my config files :
====================================
[root_at_squid ~]# cat /etc/squid/squid.conf
#########################
#####################
# 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 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:
#
# 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

######################################################################################
######################################################################################
######################################################################################

# 3 workers, using worker #1 as the frontend is important
workers 3
if ${process_number} = 1
include /etc/squid/frontend.conf
else
include /etc/squid/backend.conf
endif

http_access deny all
##############################
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
####################################################
[root_at_squid ~]# cat /etc/squid/backend.conf
# each backend must listen on a unique port
# without this the CARP algorithm would be useless
http_port 127.0.0.1:400${process_number}

# a 10 GB cache of small (up to 32KB) objects accessible by any backend
worker
cache_dir rock /rock2 2000 max-size=32768

# NP: for now AUFS does not support SMP but the CARP algorithm helps reduce
object duplications
# a 10 GB cache of large ( over 32KB) objects per-worker
#cache_dir aufs /mnt/cache${process_number} 10240 128 128 min-size=32769

# the default maximum cached object size is a bit small
# you want the backend to be able to cache some fairly large objects
maximum_object_size 512 MB

# you want the backend to have a small cache_mem
cache_mem 4 MB

# the backends require a different name to frontends, but can share one
# this prevents forwarding loops between backends while allowing
# frontend to forward via the backend
visible_hostname backend.example.com

# change /var/log/squid to your own log directory
access_log /var/log/squid/backend.access.log
cache_log /var/log/squid/backend.cache.log

# add just enough access permissions to allow the frontend
http_access allow localhost
[root_at_DataBase ~]# cat /etc/squid/frontend.conf
http_port x.x.67.252:xx000
acl mysubnet src xxxxxxxxx
http_access allow mysubnet
# add user authentication and similar options here
http_access allow manager localhost
http_access deny manager

# add backends - one line for each additional worker you configured
# NOTE how the port number matches the kid number
#cache_peer localhost parent 4002 0 carp login=PASS name=backend-kid2
#cache_peer localhost parent 4003 0 carp login=PASS name=backend-kid3

#you want the frontend to have a significant cache_mem
cache_mem 512 MB

# change /tmp to your own log directory, e.g. /var/log/squid
access_log /var/log/squid/frontend.access.log
cache_log /var/log/squid/frontend.cache.log

# the frontend requires a different name to the backend(s)
visible_hostname frontend.example.com

=====================================================

and now , the logs are :

[root_at_squid ~]# tailf /var/log/squid/frontend.cache.log
2013/10/25 16:54:25 kid1| Squid Cache (Version 3.3.8): Exiting normally.
2013/10/25 17:38:18 kid1| varyEvaluateMatch: Oops. Not a Vary object on
second attempt, 'http://r1---sn-25auxa-b15e.c.youtube.com/crossdomain.xml'
'accept-encoding="gzip,%20deflate"'
2013/10/25 17:38:18 kid1| clientProcessHit: Vary object loop!
2013/10/25 17:46:01 kid1| Preparing for shutdown after 1029 requests
2013/10/25 17:46:01 kid1| Waiting 30 seconds for active connections to
finish
2013/10/25 17:46:01 kid1| Closing HTTP port x.x.67.252:xx000
2013/10/25 17:46:01 kid1| Shutdown: NTLM authentication.
2013/10/25 17:46:01 kid1| Shutdown: Negotiate authentication.
2013/10/25 17:46:01 kid1| Shutdown: Digest authentication.
2013/10/25 17:46:01 kid1| Shutdown: Basic authentication.
2013/10/25 17:46:32 kid1| Starting Squid Cache version 3.3.8 for
i486-pc-linux-gnu...
2013/10/25 17:46:32 kid1| Process ID 13050
2013/10/25 17:46:32 kid1| Process Roles: worker
2013/10/25 17:46:32 kid1| Process Roles: worker
2013/10/25 17:46:32 kid1| With 131072 file descriptors available
2013/10/25 17:46:32 kid1| Initializing IP Cache...
2013/10/25 17:46:32 kid1| Initializing IP Cache...
2013/10/25 17:46:32 kid1| DNS Socket created at [::], FD 8
2013/10/25 17:46:32 kid1| DNS Socket created at 0.0.0.0, FD 9
2013/10/25 17:46:32 kid1| Adding nameserver x.x.67.252 from squid.conf
2013/10/25 17:46:32 kid1| Adding nameserver x.x.67.252 from squid.conf
2013/10/25 17:46:32 kid1| Adding nameserver 8.8.8.8 from squid.conf
2013/10/25 17:46:32 kid1| Logfile: opening log
/var/log/squid/frontend.access.log
2013/10/25 17:46:32 kid1| WARNING: log parameters now start with a module
name. Use 'stdio:/var/log/squid/frontend.access.log'
2013/10/25 17:46:32 kid1| Local cache digest enabled; rebuild/rewrite every
3600/3600 sec
2013/10/25 17:46:32 kid1| Store logging disabled
2013/10/25 17:46:32 kid1| WARNING: disk-cache maximum object size is
unlimited but mem-cache maximum object size is 32.00 KB
2013/10/25 17:46:32 kid1| Swap maxSize 0 + 524288 KB, estimated 40329
objects
2013/10/25 17:46:32 kid1| Target number of buckets: 2016
2013/10/25 17:46:32 kid1| Using 8192 Store buckets
2013/10/25 17:46:32 kid1| Max Mem size: 524288 KB [shared]
2013/10/25 17:46:32 kid1| Using 8192 Store buckets
2013/10/25 17:46:32 kid1| Max Mem size: 524288 KB [shared]
2013/10/25 17:46:32 kid1| Max Swap size: 0 KB
2013/10/25 17:46:32 kid1| Using Least Load store dir selection
2013/10/25 17:46:32 kid1| Current Directory is /root
2013/10/25 17:46:32 kid1| Current Directory is /root
2013/10/25 17:46:32 kid1| Loaded Icons.
2013/10/25 17:46:32 kid1| HTCP Disabled.
2013/10/25 17:46:32 kid1| Squid plugin modules loaded: 0
2013/10/25 17:46:32 kid1| Adaptation support is off.
2013/10/25 17:46:32 kid1| Shutting down...
2013/10/25 17:46:32 kid1| storeDirWriteCleanLogs: Starting...
2013/10/25 17:46:32 kid1| Finished. Wrote 0 entries.
2013/10/25 17:46:32 kid1| Finished. Wrote 0 entries.
2013/10/25 17:46:32 kid1| Took 0.00 seconds ( 0.00 entries/sec).
CPU Usage: 1.441 seconds = 0.888 user + 0.553 sys
Maximum Resident Size: 137936 KB
Page faults with physical i/o: 1
Memory usage for squid via mallinfo():
        total space in arena: 6512 KB
        Ordinary blocks: 6458 KB 213 blks
        Small blocks: 0 KB 14 blks
        Holding blocks: 72988 KB 8 blks
        Free Small blocks: 0 KB
        Free Ordinary blocks: 53 KB
        Total in use: 79446 KB 1220%
        Total free: 54 KB 1%
2013/10/25 17:46:32 kid1| Logfile: closing log
stdio:/var/log/squid/frontend.access.log
2013/10/25 17:46:32 kid1| Open FD UNSTARTED 8 DNS Socket IPv6
2013/10/25 17:46:32 kid1| Open FD READ/WRITE 9 DNS Socket IPv4
2013/10/25 17:46:32 kid1| Open FD READING 13
2013/10/25 17:46:32 kid1| Open FD READING 13
2013/10/25 17:46:32 kid1| Squid Cache (Version 3.3.8): Exiting normally.

------------------------------------------------------------------------
[root_at_DataBase ~]# tailf /var/log/squid/backend.cache.log
2013/10/25 17:46:01 kid3| Closing HTTP port 127.0.0.1:4003
2013/10/25 17:46:01 kid2| Closing HTTP port 127.0.0.1:4002
2013/10/25 17:46:01 kid3| Shutdown: NTLM authentication.
2013/10/25 17:46:01 kid2| Shutdown: NTLM authentication.
2013/10/25 17:46:01 kid2| Shutdown: Negotiate authentication.
2013/10/25 17:46:01 kid3| Shutdown: Negotiate authentication.
2013/10/25 17:46:01 kid2| Shutdown: Digest authentication.
2013/10/25 17:46:01 kid2| Shutdown: Basic authentication.
2013/10/25 17:46:01 kid3| Shutdown: Digest authentication.
2013/10/25 17:46:01 kid3| Shutdown: Basic authentication.
2013/10/25 17:46:32 kid2| Starting Squid Cache version 3.3.8 for
i486-pc-linux-gnu...
2013/10/25 17:46:32 kid2| Process ID 13049
2013/10/25 17:46:32 kid2| Process Roles: worker
2013/10/25 17:46:32 kid2| With 131072 file descriptors available
2013/10/25 17:46:32 kid2| Initializing IP Cache...
2013/10/25 17:46:32 kid2| Process Roles: worker
2013/10/25 17:46:32 kid2| With 131072 file descriptors available
2013/10/25 17:46:32 kid2| Initializing IP Cache...
2013/10/25 17:46:32 kid3| Starting Squid Cache version 3.3.8 for
i486-pc-linux-gnu...
2013/10/25 17:46:32 kid3| Process ID 13048
2013/10/25 17:46:32 kid3| Process Roles: worker
2013/10/25 17:46:32 kid3| Process Roles: worker
2013/10/25 17:46:32 kid3| With 131072 file descriptors available
2013/10/25 17:46:32 kid3| Initializing IP Cache...
2013/10/25 17:46:32 kid3| Initializing IP Cache...
2013/10/25 17:46:32 kid4| Starting Squid Cache version 3.3.8 for
i486-pc-linux-gnu...
2013/10/25 17:46:32 kid4| Process ID 13047
2013/10/25 17:46:32 kid4| Process Roles: coordinator
2013/10/25 17:46:32 kid4| With 131072 file descriptors available
2013/10/25 17:46:32 kid4| With 131072 file descriptors available
2013/10/25 17:46:32 kid4| Initializing IP Cache...
2013/10/25 17:46:32 kid3| DNS Socket created at [::], FD 8
2013/10/25 17:46:32 kid2| DNS Socket created at [::], FD 8
2013/10/25 17:46:32 kid3| DNS Socket created at 0.0.0.0, FD 9
2013/10/25 17:46:32 kid2| DNS Socket created at 0.0.0.0, FD 9
2013/10/25 17:46:32 kid3| Adding nameserver x.x.67.252 from squid.conf
2013/10/25 17:46:32 kid2| Adding nameserver x.x.67.252 from squid.conf
2013/10/25 17:46:32 kid3| Adding nameserver x.x.67.252 from squid.conf
2013/10/25 17:46:32 kid2| Adding nameserver x.x.67.252 from squid.conf
2013/10/25 17:46:32 kid3| Adding nameserver 8.8.8.8 from squid.conf
2013/10/25 17:46:32 kid2| Adding nameserver 8.8.8.8 from squid.conf
2013/10/25 17:46:32 kid4| DNS Socket created at [::], FD 8
2013/10/25 17:46:32 kid4| DNS Socket created at 0.0.0.0, FD 9
2013/10/25 17:46:32 kid4| DNS Socket created at 0.0.0.0, FD 9
2013/10/25 17:46:32 kid4| Adding nameserver x.x.67.252 from squid.conf
2013/10/25 17:46:32 kid4| Adding nameserver x.x.67.252 from squid.conf
2013/10/25 17:46:32 kid4| Adding nameserver 8.8.8.8 from squid.conf
2013/10/25 17:46:32 kid3| Logfile: opening log
/var/log/squid/backend.access.log
2013/10/25 17:46:32 kid2| Logfile: opening log
/var/log/squid/backend.access.log
2013/10/25 17:46:32 kid3| WARNING: log parameters now start with a module
name. Use 'stdio:/var/log/squid/backend.access.log'
2013/10/25 17:46:32 kid2| WARNING: log parameters now start with a module
name. Use 'stdio:/var/log/squid/backend.access.log'
2013/10/25 17:46:32 kid3| WARNING: log parameters now start with a module
name. Use 'stdio:/var/log/squid/backend.access.log'
2013/10/25 17:46:32 kid2| WARNING: log parameters now start with a module
name. Use 'stdio:/var/log/squid/backend.access.log'
2013/10/25 17:46:32 kid4| Logfile: opening log
/var/log/squid/backend.access.log
2013/10/25 17:46:32 kid4| WARNING: log parameters now start with a module
name. Use 'stdio:/var/log/squid/backend.access.log'
2013/10/25 17:46:32 kid3| Local cache digest enabled; rebuild/rewrite every
3600/3600 sec
2013/10/25 17:46:32 kid3| Store logging disabled
2013/10/25 17:46:32 kid2| Local cache digest enabled; rebuild/rewrite every
3600/3600 sec
2013/10/25 17:46:32 kid2| Store logging disabled
2013/10/25 17:46:32 kid3| WARNING: disk-cache maximum object size is
unlimited but mem-cache maximum object size is 32.00 KB
2013/10/25 17:46:32 kid2| Store logging disabled
2013/10/25 17:46:32 kid3| WARNING: disk-cache maximum object size is
unlimited but mem-cache maximum object size is 32.00 KB
2013/10/25 17:46:32 kid2| WARNING: disk-cache maximum object size is
unlimited but mem-cache maximum object size is 32.00 KB
2013/10/25 17:46:32 kid2| WARNING: disk-cache maximum object size is
unlimited but mem-cache maximum object size is 32.00 KB
2013/10/25 17:46:32 kid3| Swap maxSize 0 + 4096 KB, estimated 315 objects
2013/10/25 17:46:32 kid3| Target number of buckets: 15
2013/10/25 17:46:32 kid2| Swap maxSize 0 + 4096 KB, estimated 315 objects
2013/10/25 17:46:32 kid3| Using 8192 Store buckets
2013/10/25 17:46:32 kid4| Local cache digest enabled; rebuild/rewrite every
3600/3600 sec
2013/10/25 17:46:32 kid3| Max Mem size: 4096 KB [shared]
2013/10/25 17:46:32 kid2| Target number of buckets: 15
2013/10/25 17:46:32 kid3| Max Swap size: 0 KB
2013/10/25 17:46:32 kid2| Swap maxSize 0 + 4096 KB, estimated 315 objects
2013/10/25 17:46:32 kid3| Using 8192 Store buckets
2013/10/25 17:46:32 kid4| Local cache digest enabled; rebuild/rewrite every
3600/3600 sec
2013/10/25 17:46:32 kid3| Max Mem size: 4096 KB [shared]
2013/10/25 17:46:32 kid2| Target number of buckets: 15
2013/10/25 17:46:32 kid3| Max Swap size: 0 KB
2013/10/25 17:46:32 kid2| Using 8192 Store buckets
2013/10/25 17:46:32 kid4| Store logging disabled
2013/10/25 17:46:32 kid2| Max Mem size: 4096 KB [shared]
2013/10/25 17:46:32 kid2| Max Swap size: 0 KB
2013/10/25 17:46:32 kid2| Max Mem size: 4096 KB [shared]
2013/10/25 17:46:32 kid2| Max Swap size: 0 KB
2013/10/25 17:46:32 kid3| Using Least Load store dir selection
2013/10/25 17:46:32 kid4| Swap maxSize 0 + 4096 KB, estimated 315 objects
2013/10/25 17:46:32 kid4| Swap maxSize 0 + 4096 KB, estimated 315 objects
2013/10/25 17:46:32 kid4| Target number of buckets: 15
2013/10/25 17:46:32 kid3| Current Directory is /root
2013/10/25 17:46:32 kid4| Using 8192 Store buckets
2013/10/25 17:46:32 kid3| Current Directory is /root
2013/10/25 17:46:32 kid4| Using 8192 Store buckets
2013/10/25 17:46:32 kid4| Max Mem size: 4096 KB [shared]
2013/10/25 17:46:32 kid2| Using Least Load store dir selection
2013/10/25 17:46:32 kid2| Using Least Load store dir selection
2013/10/25 17:46:32 kid4| Max Swap size: 0 KB
2013/10/25 17:46:32 kid2| Current Directory is /root
2013/10/25 17:46:32 kid4| Using Least Load store dir selection
2013/10/25 17:46:32 kid4| Current Directory is /root
2013/10/25 17:46:32 kid3| Loaded Icons.
2013/10/25 17:46:32 kid3| HTCP Disabled.
2013/10/25 17:46:32 kid4| Loaded Icons.
2013/10/25 17:46:32 kid3| Squid plugin modules loaded: 0
2013/10/25 17:46:32 kid3| Adaptation support is off.
2013/10/25 17:46:32 kid3| Adaptation support is off.
2013/10/25 17:46:32 kid2| Loaded Icons.
2013/10/25 17:46:32 kid2| HTCP Disabled.
2013/10/25 17:46:32 kid4| Squid plugin modules loaded: 0
2013/10/25 17:46:32 kid4| Adaptation support is off.
2013/10/25 17:46:32 kid2| Squid plugin modules loaded: 0
2013/10/25 17:46:32 kid2| Adaptation support is off.
2013/10/25 17:46:32 kid2| Adaptation support is off.
2013/10/25 17:46:32 kid3| Accepting HTTP Socket connections at
local=127.0.0.1:4003 remote=[::] FD 12 flags=1
2013/10/25 17:46:32 kid2| Shutting down...
2013/10/25 17:46:32 kid2| storeDirWriteCleanLogs: Starting...
2013/10/25 17:46:32 kid2| Finished. Wrote 0 entries.
2013/10/25 17:46:32 kid2| Finished. Wrote 0 entries.
2013/10/25 17:46:32 kid2| Took 0.00 seconds ( 0.00 entries/sec).
CPU Usage: 0.391 seconds = 0.223 user + 0.168 sys
Maximum Resident Size: 130752 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
        total space in arena: 4652 KB
        Ordinary blocks: 4608 KB 7 blks
        Small blocks: 0 KB 5 blks
        Holding blocks: 72988 KB 8 blks
        Free Small blocks: 0 KB
        Free Ordinary blocks: 43 KB
        Total in use: 77596 KB 1668%
        Total free: 44 KB 1%
2013/10/25 17:46:32 kid2| Logfile: closing log
stdio:/var/log/squid/backend.access.log
2013/10/25 17:46:32 kid2| Open FD UNSTARTED 8 DNS Socket IPv6
2013/10/25 17:46:32 kid2| Open FD UNSTARTED 9 DNS Socket IPv4
2013/10/25 17:46:32 kid2| Open FD READING 13
2013/10/25 17:46:32 kid3| Shutting down...
2013/10/25 17:46:32 kid3| storeDirWriteCleanLogs: Starting...
2013/10/25 17:46:32 kid3| Finished. Wrote 0 entries.
2013/10/25 17:46:32 kid3| Finished. Wrote 0 entries.
2013/10/25 17:46:32 kid3| Took 0.00 seconds ( 0.00 entries/sec).
CPU Usage: 0.379 seconds = 0.229 user + 0.150 sys
Maximum Resident Size: 130720 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
        total space in arena: 4652 KB
        Ordinary blocks: 4608 KB 7 blks
        Small blocks: 0 KB 5 blks
        Holding blocks: 72988 KB 8 blks
        Free Small blocks: 0 KB
        Free Ordinary blocks: 43 KB
        Total in use: 77596 KB 1668%
        Total free: 44 KB 1%
2013/10/25 17:46:32 kid3| Logfile: closing log
stdio:/var/log/squid/backend.access.log
2013/10/25 17:46:32 kid3| Open FD UNSTARTED 8 DNS Socket IPv6
2013/10/25 17:46:32 kid3| Open FD UNSTARTED 9 DNS Socket IPv4
2013/10/25 17:46:32 kid3| Open FD READING 13
2013/10/25 17:46:32 kid3| Open FD READING 13
2013/10/25 17:46:32 kid2| Squid Cache (Version 3.3.8): Exiting normally.
2013/10/25 17:46:32 kid3| Squid Cache (Version 3.3.8): Exiting normally.
2013/10/25 17:46:33 kid3| storeLateRelease: released 0 objects
2013/10/25 17:46:33 kid4| storeLateRelease: released 0 objects
2013/10/25 17:46:34 kid2| storeLateRelease: released 0 objects

============================================

after the logs above !!! , the front end logs is okay and squid is wokring
!!!

my question isn , is my squid is woking normally or not ???

regards

-----
Dr.x

--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/how-distribute-squid-loads-to-cpus-and-memories-using-SMP-feature-tp4662867p4662875.html
Sent from the Squid - Users mailing list archive at Nabble.com.
Received on Fri Oct 25 2013 - 15:53:27 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 25 2013 - 12:00:26 MDT