Здравствуйте, вот его конфиг. После бодрой загрузки части странички (~500 KB) скорость медленно падает до нуля и догружается ну очень медленно. Где я ошибся?
http_port 3128
#transparent
icp_port 0
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
cache_mem 32 MB
maximum_object_size 2000 KB
maximum_object_size_in_memory 1000 KB
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
refresh_pattern ^ftp: &n... 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
#debug_options ALL,9
#debug_options ALL,1 33,2 28,9
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl to_localhost dst 127.0.0.0/8
acl level2ip src "/etc/squid/level2ip"
acl level1ip src "/etc/squid/level1ip"
acl level0ip src "/etc/squid/level0ip"
acl icqip src "/etc/squid/icq"
acl rbc url_regex -i "/etc/squid/level1"
acl corp url_regex -i "/etc/squid/level0"
acl com_zone url_regex -i .*\.com$
acl deny_list url_regex -i "/etc/squid/deny"
acl deny_banner url_regex -i "/etc/squid/banner"
acl icq_port port 5190
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl CONNECT method CONNECT
http_access deny all deny_list
http_access deny all deny_banner
http_access allow level0ip rbc
http_access allow level2ip
http_access allow level1ip Safe_ports
http_access allow icqip icq_port
http_access allow CONNECT icq_port
http_access deny all !Safe_ports
http_access deny all
http_reply_access allow all
icp_access allow all
delay_pools 2
delay_class 1 2
delay_class 2 3
delay_access 1 allow level0ip
delay_access 1 allow level1ip
delay_access 1 deny all
delay_access 2 allow level2ip
delay_access 2 deny all
delay_parameters 1 -1/-1 100/500000
delay_parameters 2 -1/-1 -1/-1 600/1000000
coredump_dir /var/spool/squid
>После бодрой загрузки части странички (~500 KB) скорость медленно падает до нуля и догружается ну очень медленно.
> Где я ошибся?
>delay_parameters 1 -1/-1 100/500000
>delay_parameters 2 -1/-1 -1/-1 600/1000000Вот здесь--^^^ . В "районе" чител 100 и 600
попробуй закоментировать delay pools выпустить клиента мимо них...
delay_pools 2
delay_class 1 1
delay_class 2 3
delay_access 1 allow level0ip
delay_access 1 allow level1ip
delay_access 1 deny all
delay_access 2 allow level2ip
delay_access 2 deny all
delay_parameters 1 100000/1
delay_parameters 2 -1/-1 -1/-1 600/1000000При таком раскладе вообще ничего не грузит.
A pair of delay parameters is written restore/maximum, where restore is
the number of bytes (not bits - modem and network speeds are usually
quoted in bits) per second placed into the bucket, and maximum is the
maximum number of bytes which can be in the bucket at any time.Мой английский не очень хорош, но общий смысл я понял так - 8000/8000 и всё будет по 64kbps. Всем спасибо, но так и не понял смысл "bucket at any time".
различия для restore и maximum нужны для обеспечения burst, то бишь кратковременного превышения максимума. Например у вас стоит 8000/24000. Изначально емкость(bucket) пустая. Предположим что клиент начинает работать на максимально возможной скорости, в результате в первую секунду скорость будет 24000, дальше емкость заполнится и будет опорожнятся со скоростью 8000 в секунду, как следствие начиная со второй секунды скорость клиента снизится до 8000 и будет таковой, пока он не начнет качать медленее. Когда он начнет качать на меньшей скорости либо вообще перестанет, то постепенно емкость начнет освобождаться, как следствие станут вновь возможны burst.
Burst позволяет сделать обычный серфинг более комфортабельным, так как большую часть времени пользователь ничего не качает, а смотрит уже загруженную страничку, в результате у него появляется возможность burst, как только он запросит следующую страничку она на короткое время будет грузится быстрее его лимита, для большинства страничек этого короткого промежутка хватит. Однако если пользователь начнет качать что-либо большое, то скорость быстро упадет до его лимита.
>[оверквотинг удален]
>скорость клиента снизится до 8000 и будет таковой, пока он не
>начнет качать медленее. Когда он начнет качать на меньшей скорости либо
>вообще перестанет, то постепенно емкость начнет освобождаться, как следствие станут вновь
>возможны burst.
>Burst позволяет сделать обычный серфинг более комфортабельным, так как большую часть
>времени пользователь ничего не качает, а смотрит уже загруженную страничку, в
>результате у него появляется возможность burst, как только он запросит следующую
>страничку она на короткое время будет грузится быстрее его лимита, для
>большинства страничек этого короткого промежутка хватит. Однако если пользователь начнет качать
>что-либо большое, то скорость быстро упадет до его лимита.Спасибо.
привет, может и мне кото нибудь поможет, очень похожая проблема, с утра очень резво работает sqiud, но позже вообще умирает, и такое происходит 20 через 20 минут. Чувствую что то намудрил с правилами, но пока ни как не удается отловить где и что, новичек в этом деле, но хочется разобраться, надеюсь с вашей помощью.
Мой пользователь находится в группе it.Часть конфига:
#My rls!
#Allow and Deny groups to access inet
acl localnet src 192.168.1.0/255.255.255.0
acl it src 192.168.1.234 192.168.1.191 192.168.1.147 192.168.1.96 192.168.1.98
acl buh src 192.168.1.106 192.168.1.199 192.168.1.242 192.168.1.215 192.168.1.110 192.168.1.20 192.168.1.10 192.168.1.124 192.168.1.213http_access allow it
http_access allow buh
http_access deny all#Deny domains
acl fuck_sitewarez dstdomain .nnm.ru .kpnemo.ru
acl fuck_odnokl dstdomain .odnoklassniki.ru
http_access deny it fuck_sitewarez
http_access deny all fuck_odnokl#Deny sites by masks
acl SitesRegexSex dstdom_regex sex
acl SitesRegexAz dstdom_regex \.az$
http_access deny all SitesRegexSex
http_access deny all SitesRegexAz#Deny downloads with sex and avi in filenames
acl NoAviFromSex url_regex -i sex.*\.avi$
http_access deny all NoAviFromSex#And deny downloads with specific formats
acl media urlpath_regex -i \.mp3$ \.avi$ \.wma$
http_access deny all media#Deny some ports, e.g. Mirc
acl Mirc port 6667-6669 7770-7776
http_access allow it Mirc
http_access deny all Mirc#Deny some protocols, e.g FTP
acl ftpproto proto ftp
http_access allow it ftpproto
http_access deny all ftpproto#Delay_pools
delay_pools 5#speed limit for downloading media content
delay_class 1 1
delay_parameters 1 3000/3000
delay_access 1 allow media
delay_access 1 deny all#speed limit for some individual user
#delay_class 2 1
#delay_parameters 2 4000/4000
#delay_access 2 allow someUser
#delay_access 2 deny all#speed limit for group buh
delay_class 3 2
delay_parameters 3 20000/20000 10000/10000
delay_access 3 allow buh
delay_access 3 deny all#speed limit for group it
delay_class 4 2
delay_parameters 4 50000/50000 40000/40000
delay_access 4 allow it
delay_access 4 deny all#speed limit for all others
delay_class 5 2
delay_parameters 5 15000/15000 10000/10000
delay_access 5 deny media
#delay_access 5 deny someUser
delay_access 5 deny buh
delay_access 5 deny it
delay_access 5 allow localnet
delay_access 5 deny all
Посмотрите, вот что tcpdump -i eth2 показывает.07:48:11.129589 arp reply LS-Pressa is-at 00:18:39:c9:93:1e (oui Unknown)
07:48:12.004691 IP 10.10.10.7.1058 > LS-Pressa.domain: 54850+ A? www.gmail.com. (31)
07:48:13.516863 IP LS-Pressa.domain > 10.10.10.7.1058: 54850 6/7/5 CNAME[|domain]
07:48:18.513015 arp who-has 10.10.10.7 tell LS-Pressa
07:48:18.513069 arp reply 10.10.10.7 is-at 00:c0:26:2d:ad:08 (oui Unknown)
07:50:02.395043 IP 10.10.10.7.netbios-dgm > 10.10.10.255.netbios-dgm: NBT UDP PACKET(138)при этом squid трафика не пропускает c gmail. A LS-Pressa.domain это имя роутера с которого приходит инет на squid машину. 10.10.10.7 - адрес eth2 который подключен к LS-Pressa (т.е. к роутеру).
Что тут может быть неверно? Помогите.