Форум русскоязычного сообщества Ubuntu


Считаете, что Ubuntu недостаточно дружелюбна к новичкам?
Помогите создать новое Руководство для новичков!

Автор Тема: Тормозит Squid  (Прочитано 1468 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн tunsa

  • Автор темы
  • Новичок
  • *
  • Сообщений: 43
    • Просмотр профиля
Тормозит Squid
« : 23 Июля 2015, 10:32:02 »
Всем Добрый день!
Прошу помощи начал тормозить squid точнее, если сидишь в инете через прокси скорости вообще нет, напрямую не через proxy все летает
в логах squid все чисто

2015/07/23 07:42:24| storeDirWriteCleanLogs: Starting...
2015/07/23 07:42:24|     65536 entries written so far.
2015/07/23 07:42:24|   Finished.  Wrote 115640 entries.
2015/07/23 07:42:24|   Took 0.1 seconds (1440332.8 entries/sec).
2015/07/23 07:42:24| logfileRotate: /var/log/squid/store.log
2015/07/23 07:42:24| logfileRotate (stdio): /var/log/squid/store.log
2015/07/23 07:42:24| logfileRotate: /var/log/squid/access.log
2015/07/23 07:42:24| logfileRotate (stdio): /var/log/squid/access.log
2015/07/23 07:42:24| helperOpenServers: Starting 80 'adzapper.wrapper' processes
2015/07/23 07:42:28| helperOpenServers: Starting 5 'ldap_auth' processes
2015/07/23 08:55:56| Preparing for shutdown after 18948 requests
2015/07/23 08:55:56| Waiting 30 seconds for active connections to finish
2015/07/23 08:55:56| FD 100 Closing HTTP connection
2015/07/23 08:56:02| Starting Squid Cache version 2.7.STABLE7 for i386-debian-linux-gnu...
2015/07/23 08:56:02| Process ID 11116
2015/07/23 08:56:02| With 1024 file descriptors available
2015/07/23 08:56:02| Using epoll for the IO loop
2015/07/23 08:56:02| DNS Socket created at 0.0.0.0, port 57055, FD 6
2015/07/23 08:56:02| Adding nameserver 192.168.5.100 from squid.conf
2015/07/23 08:56:02| Adding nameserver 178.161.185.161 from squid.conf
2015/07/23 08:56:02| Adding nameserver 191.98.10.134 from squid.conf
2015/07/23 08:56:02| Adding nameserver 127.0.0.1 from squid.conf
2015/07/23 08:56:02| helperOpenServers: Starting 80 'adzapper.wrapper' processes
2015/07/23 08:56:05| helperOpenServers: Starting 5 'ldap_auth' processes
2015/07/23 08:56:06| User-Agent logging is disabled.
2015/07/23 08:56:06| Referer logging is disabled.
2015/07/23 08:56:06| logfileOpen: opening log /var/log/squid/access.log
2015/07/23 08:56:06| Unlinkd pipe opened on FD 98
2015/07/23 08:56:06| Swap maxSize 6291456 + 131072 KB, estimated 494040 objects
2015/07/23 08:56:06| Target number of buckets: 24702
2015/07/23 08:56:06| Using 32768 Store buckets
2015/07/23 08:56:06| Max Mem  size: 131072 KB
2015/07/23 08:56:06| Max Swap size: 6291456 KB
2015/07/23 08:56:06| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2015/07/23 08:56:06| logfileOpen: opening log /var/log/squid/store.log
2015/07/23 08:56:06| Rebuilding storage in /var/spool/squid (DIRTY)
2015/07/23 08:56:06| Using Least Load store dir selection
2015/07/23 08:56:06| Set Current Directory to /var/spool/squid
2015/07/23 08:56:06| Loaded Icons.
2015/07/23 08:56:07| Accepting proxy HTTP connections at 0.0.0.0, port 3128, FD 100.
2015/07/23 08:56:07| Accepting ICP messages at 0.0.0.0, port 3130, FD 101.
2015/07/23 08:56:07| HTCP Disabled.
2015/07/23 08:56:07| WCCP Disabled.
2015/07/23 08:56:07| Ready to serve requests.
2015/07/23 08:56:09| Store rebuilding is  3.3% complete
2015/07/23 08:56:26| Store rebuilding is 23.3% complete
2015/07/23 08:56:41| Store rebuilding is 39.9% complete
2015/07/23 08:56:56| Store rebuilding is 56.5% complete
2015/07/23 08:57:11| Store rebuilding is 76.4% complete
2015/07/23 08:57:12| Done reading /var/spool/squid swaplog (123312 entries)
2015/07/23 08:57:12| Finished rebuilding storage from disk.
2015/07/23 08:57:12|    119130 Entries scanned

Мой squid.conf
# <EBOX> TAG_HTTPORT #
http_port 3128
# END_TAG #

visible_hostname localhost
dns_nameservers 192.168.5.100 178.189.160.161 195.87.14.134 127.0.0.1
append_domain .zentyal.exemple.com
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

# refresh patterns

# windows updates
refresh_pattern http://.*\.windowsupdate\.microsoft\.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://.*\.update\.microsoft\.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://download\.microsoft\.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://windowsupdate\.microsoft\.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://.*\.download\.windowsupdate\.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://office\.microsoft\.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://w?xpsp[0-9]\.microsoft\.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://w2ksp[0-9]\.microsoft\.com/ 0 80% 20160 reload-into-ims
# linux updates
refresh_pattern http://.*\.archive\.ubuntu\.com/ 0 80% 20160 reload-into-ims
refresh_pattern http://(ftp|http)[0-9]*\.[a-z]+\.debian\.org/ 0 80% 20160 reload-into-ims

refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern .               0       20%     4320
# end refresh patterns

coredump_dir /var/spool/squid
cache_effective_user proxy
cache_effective_group proxy
cache_mem 128 MB
maximum_object_size 300 MB
access_log /var/log/squid/access.log squid
pid_filename /var/run/squid.pid

cache_dir ufs /var/spool/squid 6144 16 256



# <EBOX> TAG_ACL #
auth_param basic realm Zentyal HTTP proxy
auth_param basic program /usr/lib/squid/ldap_auth -v 3 -b  ou=Users,dc=zentyal2012  -u uid  -h ldap://127.0.0.1:389
acl authorized  proxy_auth required


url_rewrite_program /usr/bin/adzapper.wrapper
     




acl obje4029 src 192.168.5.23/32 192.168.5.21/32 192.168.5.95/32 192.168.5.52/32 192.168.5.48/32 192.168.5.170/32


# no cache domains acl
acl noCached dstdomain esk.sbrf.ru
acl noCached dstdomain online.sberbank.ru
acl noCached dstdomain sbi.sberbank.ru

# END_TAG #
acl localhost src 127.0.0.0/8
acl localhostdst dst 127.0.0.0/8
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 SSL_ports port 443 563 # https, snews
acl SSL_ports port 8000
acl SSL_ports port 7443
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 9443        # sberbank
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 Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT

follow_x_forwarded_for allow localhost
log_uses_indirect_client on

http_access allow localhost

http_access deny manager
http_access deny purge
http_access deny !Safe_ports
http_access allow CONNECT !SSL_ports
http_reply_access allow all



# <EBOX> TAG_DELAYPOOLS #


acl eboxlocalnets dst 192.168.5.0/24




# END_TAG

# <EBOX> TAG_HTTP_ACCESS #


cache deny noCached




 


http_access deny obje4029



http_access allow authorized all

#   in case of allow + time acl we have to deny otherwise
#   outsde of the time period we will slip to defualt policy
http_access deny bezineta all
http_access allow   admin

http_access allow   inet





# default policy section


http_access allow authorized all
http_access allow all


# END_TAG #

# <EBOX> TAG SNMP #

# END_TAG #

always_direct allow localhostdst


redirect_children 20
url_rewrite_children 80

Место на диске достаточно
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdc1              65G   19G   43G  31% /
none                  4,0G  256K  4,0G   1% /dev
none                  4,0G     0  4,0G   0% /dev/shm
none                  4,0G  4,1M  4,0G   1% /var/run
none                  4,0G     0  4,0G   0% /var/lock
none                  4,0G     0  4,0G   0% /lib/init/rw
none                   65G   19G   43G  31% /var/lib/ureadahead/debugfs
/dev/sda1             678G  510G  135G  80% /media/data

Нагрузки на систему нет вообще в htop всё норм

Что можно сделать чтобы squid не тормозил? в чем может быть проблема?
Еще заметили такое, что когда народ на совещании или на обеде все норм работает, стоит у меня lightsquid трафика почти нет, еще повторюсь не через прокси интернет летает
« Последнее редактирование: 23 Июля 2015, 10:34:41 от tunsa »

Оффлайн streyz

  • Участник
  • *
  • Сообщений: 139
    • Просмотр профиля
Re: Тормозит Squid
« Ответ #1 : 23 Июля 2015, 13:27:08 »
redirect_children 20
url_rewrite_children 80

замени на

url_rewrite_children 20


redirect_children - это тот же url_rewrite_children. Если сквид все еще понимает redirect_children, то в сумме ты паралелишь на 100 потоков при дефолных 5.
« Последнее редактирование: 23 Июля 2015, 13:29:30 от streyz »

Оффлайн tunsa

  • Автор темы
  • Новичок
  • *
  • Сообщений: 43
    • Просмотр профиля
Re: Тормозит Squid
« Ответ #2 : 23 Июля 2015, 14:34:03 »
redirect_children 20
url_rewrite_children 80

замени на

url_rewrite_children 20


redirect_children - это тот же url_rewrite_children. Если сквид все еще понимает redirect_children, то в сумме ты паралелишь на 100 потоков при дефолных 5.

спасибо за ответ попробую

Пользователь решил продолжить мысль 24 Июля 2015, 07:37:02:
не помогло
« Последнее редактирование: 24 Июля 2015, 07:37:02 от tunsa »

Оффлайн KPbIC

  • Любитель
  • *
  • Сообщений: 55
    • Просмотр профиля
Re: Тормозит Squid
« Ответ #3 : 24 Июля 2015, 11:50:53 »
Цитировать
2015/07/23 08:56:02| Adding nameserver 192.168.5.100 from squid.conf
2015/07/23 08:56:02| Adding nameserver 178.161.185.161 from squid.conf
2015/07/23 08:56:02| Adding nameserver 191.98.10.134 from squid.conf
2015/07/23 08:56:02| Adding nameserver 127.0.0.1 from squid.conf

зачем столько ДНС-серверов? И почему они тянутся из настроек сквида? Первый раз такое вижу.

Оффлайн tunsa

  • Автор темы
  • Новичок
  • *
  • Сообщений: 43
    • Просмотр профиля
Re: Тормозит Squid
« Ответ #4 : 26 Июля 2015, 20:53:50 »
Цитировать
2015/07/23 08:56:02| Adding nameserver 192.168.5.100 from squid.conf
2015/07/23 08:56:02| Adding nameserver 178.161.185.161 from squid.conf
2015/07/23 08:56:02| Adding nameserver 191.98.10.134 from squid.conf
2015/07/23 08:56:02| Adding nameserver 127.0.0.1 from squid.conf

зачем столько ДНС-серверов? И почему они тянутся из настроек сквида? Первый раз такое вижу.

Пользуюсь Zentyal ДНС сервера прописаны были автоматически, точнее взяты из настроек, которые были сделаны в вебморде, 2 года работал прокси на ура, а сейчас начался такой косяк со скоростью

 

Страница сгенерирована за 0.021 секунд. Запросов: 22.