LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Squid proxy is so slow and no idea why? (https://www.linuxquestions.org/questions/linux-software-2/squid-proxy-is-so-slow-and-no-idea-why-4175581748/)

jaselinux 06-08-2016 08:18 AM

Squid proxy is so slow and no idea why?
 
I have just setup a VM with squid proxy for the first time and it seems to be pretty slow for some reason and I'm not sure why. I have installed squidGuard and added a blacklist but it was slow before I had this setup so isnt to do with that.

Here is what I have tried based on other forums:
  • Changed DNS to Googles servers
  • Checked the internet is fast not using the proxy
  • Restarted service a number of times
  • Set cache_dir to aufs

In the logs there's a lot of TCP_MISS/200 if that is relevant? I've also attached my squid.conf file below.

Any help greatly appreciated :)

Code:

acl SSL_ports port 443
acl all src 192.168.5.0/24
acl bad_keywords url_regex "/etc/squid3/ban_keywords.txt"
acl ban_domains dstdomain "/etc/squid3/ban_domains.txt"
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 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 internal_network src 192.168.5.1-192.168.5.255/255.255.255.0
http_access allow internal_network
http_access deny bad_keywords all
http_access deny ban_domains all
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localhost
http_access deny all
http_port 3128
cache_mem 1024 MB
cache_dir aufs /var/spool/squid3 81920 16 256
maximum_object_size 5120 MB
coredump_dir /var/spool/squid3
refresh_pattern ^ftp:          1440    20%    10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0    0%      0
refresh_pattern (Release|Packages(.gz)*)$      0      20%    2880
refresh_pattern .              0      20%    4320
url_rewrite_program /usr/bin/squidGuard -c /etc/squid3/squidGuard.conf


dijetlo 06-10-2016 10:07 AM

Your squid proxy has a logger that's recording the HTTP (among other protocols) transactions. Have you reviewed it?
It should be able to tell you if your latency is local (mis-configuration on the instance) or is being driven by poor DNS caching or other network service issues.


All times are GMT -5. The time now is 04:19 AM.