Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.
Модераторы: SLEDopit , Модераторы разделов
SamStone
Сообщения: 33
ОС: Ubuntu 8.10 x86_64
Сообщение
SamStone » 04.02.2009 13:21
Значит так
1) периодически сыпет в cache.log authenticateDecodeAuth: Unsupported or unconfigured proxy-auth scheme, 'NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAFASgKAAAADw=='. На это можно вообще не обращать внимания или можно что-то докрутить, чтобы не сыпалость в лог? (не отключая cache.log
)
2)после правки конфига и squid -k reconfigure до 1 минуты нет инета. Сквид чего-то думает, грузит проц, потом его отпускает. В остальное время работает как швейцарские часы
Функционал составляет squid 2.6.18 с авторизацией по логину/паролю + sams + squidguard c мешком блеклистов, кэш 10Г, около 70 юзеров, базовая авторизация 5 процессов, гвард - 30 процессов.
Код: Выделить всё
2009/02/04 13:55:30| Reconfiguring Squid Cache (version 2.6.STABLE18)...
2009/02/04 13:55:30| FD 136 Closing HTTP connection <------ сквид стопает все коннекты или я неправильно понял?
2009/02/04 13:55:30| Closing unlinkd pipe on FD 138
2009/02/04 13:55:30| aclParseAclLine: WARNING: empty ACL: acl tgk_connect dst "/etc/squid/tgk"
2009/02/04 13:55:30| Cache dir '/media/cache/squid' size remains unchanged at 9437184 KB
2009/02/04 13:55:30| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/02/04 13:55:30| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/02/04 13:55:30| Store logging disabled
2009/02/04 13:55:30| User-Agent logging is disabled.
2009/02/04 13:55:30| Referer logging is disabled.
2009/02/04 13:55:30| DNS Socket created at 0.0.0.0, port 59996, FD 7
2009/02/04 13:55:30| Adding nameserver 172.23.94.11 from squid.conf
2009/02/04 13:55:30| helperOpenServers: Starting 30 'squidGuard' processes
2009/02/04 13:57:05| helperOpenServers: Starting 5 'ncsa_auth' processes
2009/02/04 13:57:22| Unlinkd pipe opened on FD 129
2009/02/04 13:57:22| Accepting proxy HTTP connections at 0.0.0.0, port 3128, FD 126.
2009/02/04 13:57:22| HTCP Disabled.
2009/02/04 13:57:22| WCCP Disabled.
2009/02/04 13:57:22| Loaded Icons.
2009/02/04 13:57:22| Ready to serve requests.
Возникло подозрение, что это он кэш проверяет-перечитывает
3) как-нибудь попроще можно посчитать на сколько будет прирастать лог и самсовская база? или только самому следить и замерять?
akakernel
Сообщения: 50
Сообщение
akakernel » 05.02.2009 10:52
1) Конфиг в студию
2) Зачем нужен такой огромный кэш, вы там фильмы кэшируете?
3) Базу то можно периодически чистить. Ну или часть сбрасывать в архив.
Mage-Warrior
Сообщения: 869
Статус: Семь раз понюхай, один раз откуси!
ОС: SlackWare 12.1
Сообщение
Mage-Warrior » 05.02.2009 13:00
Глядя на время в этих строках:
Код: Выделить всё
2009/02/04 13:55:30| helperOpenServers: Starting 30 'squidGuard' processes
2009/02/04 13:57:05| helperOpenServers: Starting 5 'ncsa_auth' processes
можно утверждать с большой долей вероятности, что полторы минуты запускается 30 процессов squidguard (выходит по 3 секунды на каждый процесс). Для проверки уменьшите их количество в squid.conf, установив параметр
redirect_children в нужное значение.
*- Большинство проблем, дружок, завсегда покажет лог! -*
SamStone
Сообщения: 33
ОС: Ubuntu 8.10 x86_64
Сообщение
SamStone » 06.02.2009 10:16
Код:
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/ncsa.sams
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 0.02 hours
auth_param basic casesensitive off
authenticate_ttl 0.1 hour
authenticate_ip_ttl 300 seconds
acl _sams_default proxy_auth "/etc/squid/default.sams"
acl _sams_default_time time MTWHFAS 07:00-23:00
acl _sams_4931172dc4116 proxy_auth "/etc/squid/4931172dc4116.sams" #таких acl несколько
acl _sams_4931172dc4116_time time MTWHFAS 07:00-22:59
acl _sams_chat url_regex "/etc/squid/chat.sams"
acl _sams_local_ip dst "/etc/squid/local_ip.sams"
acl _sams_local_url dstdomain "/etc/squid/local_url.sams"
acl password proxy_auth REQUIRED
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 # https
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 5190 # ICQ
acl Safe_ports port 10000
acl Safe_ports port 22022
acl bi_ports port 2009 2106 7777
acl bi_pc src 10.64.225.17 10.64.225.177
acl purge method PURGE
acl CONNECT method CONNECT
acl icq_range1 dst 64.12.0.0/255.255.0.0
acl icq_range2 dst 205.188.0.0/255.255.0.0
acl free_access dstdomain "/var/lib/squidguard/db/whitelist"
acl free_regex url_regex "/var/lib/squidguard/db/white_regex"
acl our_network src 10.64.224.0/255.255.254.0
acl multiconnect max_user_ip -s 1
acl tgk_connect dst "/etc/squid/tgk"
acl large_files src "/etc/squid/large_files"
acl to_proxy dst 10.64.224.2
acl limit_cons maxconn 5
acl net_225 src 10.64.225.0/255.255.255.0
prefer_direct on
log_access deny to_proxy
log_access deny icq_range1
log_access deny icq_range2
url_rewrite_access deny to_proxy
url_rewrite_access deny icq_range1
url_rewrite_access deny icq_range2
http_access allow icq_range1
http_access allow icq_range2
http_access allow bi_pc bi_ports
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow _sams_default !_sams_chat _sams_default_time
http_access allow _sams_4931172dc4116 _sams_4931172dc4116_time #таких acl несколько
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access allow localhost
http_access deny all
icp_access allow all
reply_body_max_size 0 allow large_files
reply_body_max_size 15000000 allow all
http_port 3128
hierarchy_stoplist cgi-bin ?
cache_mem 128 MB
maximum_object_size_in_memory 128 KB
cache_replacement_policy heap GDSF
cache_dir ufs /media/cache/squid 9216 36 256
minimum_object_size 0 KB
maximum_object_size 16384 KB
cache_swap_low 95
cache_swap_high 98
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log none
logfile_rotate 10
emulate_httpd_log off
pid_filename /var/run/squid.pid
client_netmask 255.255.255.255
ftp_user Squid@squid-cache.org
url_rewrite_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf.old
url_rewrite_children 30
url_rewrite_concurrency 0
redirector_bypass off
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
refresh_pattern -i \.gif$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.png$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.jpg$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.jpeg$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.pdf$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.zip$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.tar$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.gz$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.tgz$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.exe$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.prz$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.ppt$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.inf$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.swf$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.mid$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.wav$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.mp3$ 23200 100% 43200 override-lastmod override-expire
refresh_pattern -i \.ico$ 23200 100% 43200 override-lastmod override-expire
quick_abort_min 16 KB
quick_abort_max 16 KB
quick_abort_pct 90
read_ahead_gap 16 KB
negative_ttl 5 minutes
positive_dns_ttl 6 hours
negative_dns_ttl 1 minute
range_offset_limit 0 KB
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
header_access From deny all
header_access Referer deny all
header_access Server deny all
header_access Link deny all
header_access http-x-forwarded-for deny all
header_access x-forwarded-for deny all
connect_timeout 1 minute
peer_connect_timeout 30 seconds
client_lifetime 60 minutes
cache_effective_user squid
visible_hostname Squid Proxy Server
#
#вырезал delay-pools созданные sams
#
digest_generation off
snmp_port 0
icp_port 0
htcp_port 0
error_directory /usr/share/squid/errors/Russian-koi8-r
hosts_file /etc/hosts
reload_into_ims on
coredump_dir /var/spool/squid
2)чтоб меньше инет грузился ) у части пользователей из-за посещения ограниченного числа ресурсов очень высок процент попадания в кэш.
3)Это есть, просто скидывать все равно надо куда-то в другое место, т.к. на проксе место ограничено (кэш лежит на отдельном разделе).
30 redirect_children поставил из-за:
Код: Выделить всё
WARNING: All url_rewriter processes are busy.
WARNING: up to 20 pending requests queued
WARNING: All url_rewriter processes are busy.
WARNING: up to 21 pending requests queued
До этого было 20. А разницу во времени в логе я что-то проглядел...