Re[2]: [squid-users] Frequent cache rebuilding

From: Andreev Nikita <nik_at_kemsu.ru>
Date: Tue, 27 Jan 2009 14:29:11 +0700

For some unknown reason squid stopped using CPU even when I returned
cache to NFS partition:
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r b swpd free buff cache si so bi bo in cs us sy id wa st
 2 0 96 2665972 119112 513756 0 0 3 41 91 213 4 7 89 0 0
 1 0 96 2665848 119120 513888 0 0 4 22 1712 584 0 1 98 1 0
 0 0 96 2665664 119144 513992 0 0 18 164 1853 704 1 1 96 3 0
 0 0 96 2665416 119164 513996 0 0 8 42 1935 739 0 2 97 1 0
 0 0 96 2664664 119188 514216 0 0 20 0 1728 682 1 3 94 2 0
 0 0 96 2663920 119228 514640 0 0 18 280 2020 861 1 2 94 3 0
 0 0 96 2663424 119252 514848 0 0 6 70 2063 837 1 2 97 1 0
 0 1 96 2662868 119268 515084 0 0 6 533 1837 773 1 2 96 1 0
 0 0 96 2662752 119276 515156 0 0 0 80 1758 609 0 1 98 1 0
 0 0 96 2661884 119292 515652 0 0 14 0 2035 849 1 2 96 2 0
 0 0 96 2661016 119320 515968 0 0 6 384 1839 659 0 1 96 2 0
 0 0 96 2660272 119324 516252 0 0 0 32 1835 684 1 2 98 0 0
 0 0 96 2659528 119324 516684 0 0 0 30 2021 891 0 2 97 0 0
 0 0 96 2658908 119340 516984 0 0 0 468 1893 662 1 1 97 1 0
 0 0 96 2657980 119368 517488 0 0 36 0 1960 748 0 2 96 1 0

It happened yesterday at 17:25 (GMT+7). I was performing some
reconfiguration (I changed storage array trunks protocol from PAgP to
LACP) at that time but I don't know the real implication of that.

I will post if squid CPU usage will rise again.

> There has to be some reason for the high load. At 4 mbit/sec a recent
> CPU should be mostly idle. Let's have a look at your configuration.
> Use something like...

> egrep -v "^#|^$" /etc/squid.conf

> ...to cut the fluff. If you defined ACLs that use exernal files, please
> give an indication of what those files contain.

# egrep -v "^#|^$" /etc/squid/squid.conf
http_port 8080
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
cache_mem 384 MB
 cache_swap_low 90
 cache_swap_high 95
maximum_object_size_in_memory 256 KB
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
cache_dir aufs /var/spool/squid 16384 64 1024
access_log /var/log/squid/access.log squid
cache_store_log none
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
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
acl mynet src 34.34.0.0/255.255.240.0 35.35.148.0/255.255.255.0
acl admins src 34.34.2.0/255.255.255.224 34.34.1.136 34.34.1.0/255.255.255.224
acl culture src 34.34.2.240/255.255.255.240 34.34.1.83 34.34.0.104/255.255.255.252
acl pubrooms src 34.34.1.89
acl pubrooms_ext url_regex \.mp3 \.avi \.mpeg \.mpg \.wav \.wma \.ogg \.aac \.mmf
acl pubrooms_mime rep_mime_type audio video
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny pubrooms pubrooms_ext
http_access allow localhost
http_access allow mynet
http_access deny all
http_reply_access allow manager
http_reply_access deny pubrooms pubrooms_mime
http_reply_access allow mynet
http_reply_access deny all
icp_access allow mynet
icp_access deny all
cache_mgr root_at_mydomain.com
mail_from squid_at_mydomain.com
logfile_rotate 4
append_domain .mydomain.com
memory_pools_limit 0 MB
delay_pools 3
delay_class 1 1
delay_class 2 1
delay_class 3 1
delay_access 1 deny culture
delay_access 1 allow mynet
delay_access 1 deny all
delay_access 2 allow culture
delay_access 2 deny all
delay_access 3 allow admins
delay_access 3 deny all
delay_parameters 2 -1/-1
delay_parameters 1 -1/-1
delay_parameters 3 -1/-1
coredump_dir /var/spool/squid

Regards,
Nikita.
Received on Tue Jan 27 2009 - 07:29:28 MST

This archive was generated by hypermail 2.2.0 : Sun Feb 01 2009 - 12:00:03 MST