Squid slows certain webpages



  • Hi all,
    i've been using PFSense along with squid and squidguard for a couple of years and i'm very happy with it.Last few days some content on web pages is downloaded very slow.I troubleshot PFSense and found out that the problem is in squid.

    Steps taken:

    1.Disabled Squidguard only.Nothing changed pages still downloaded slowly.
    2.Bypass Proxy.Everything worked fine.All pages were downloaded fast.

    So the problem lies somewhere in squid proxy.What are the possible steps to troubleshoot squid?

    Pfsense 2.1.5 64bit
    Squid 2.7.9
    Squidguard 1.4.4
    Lightsquid 1.8.2
    Suricata 2.0.4



  • You have Squid v4 on a 2.1.5? How did you manage to install that? Last I checked (just this morning) pfSense 2.1.5 amd64 had the options of squid v3.



  • He's running 2.7.9.

    Nothing in the System log?  Anything in /var/squid/logs/access.log or cache.log?  How big are your logs?  If you don't have rotation enabled, they can get pretty big and that will definitely slow you down.



  • I have log rotation enabled. Disk free space is almost 60%. Nothing curious in the system log. I should check the other two logs. The thing is that not all pages are slowed down. And in certain pages that this happens not all content is slowed down. I mean for example in a certain WordPress site pictures are downloaded very fast but text content is downloaded after half a minute. Very annoying.



  • Perhaps a DNS issue?  SSH in and run:

    squidclient -p 3128 mgr:info

    then check your output under Median Service Times.  Anything stand out as taking a long time, such as DNS lookups?  The example below shows a DNS issue during Squid caching:

    Median Service Times (seconds)  5 min    60 min:
    HTTP Requests (All):  0.09219  0.09219
    Cache Misses:          0.08729  0.08729
    Cache Hits:            6.62870  6.62870
    Near Hits:            0.00000  0.00000
    Not-Modified Replies:  0.00000  0.00000
    DNS Lookups:          10.14244 10.14244
    ICP Queries:          0.00000  0.00000

    If you get a timeout error, try running squidclient like this:

    squidclient -h your.squid.ip.address -p 3128 mgr:info



  • I did the check.Nothing awkward at all.




  • Did you experience the slow web problem within the past hour of running the report?  It only shows you an average for the past 5 mins and past hour.



  • If you do not install pfsense with softupdates for /var and /usr, you will soon or latter get an slow response from squid(if you are not using ssd of cource)

    An workaround could be setting System Tunables >vfs.read_max from 32(default) to 128 or disabling disk cache.



  • Softupdates for /var and /usr?
    Sorry for barking in here, but I can't remember having seen that phrase.
    Could you expand on this?
    A standard hd install is with or without softupdates?

    Cheers.



  • @Escorpiom:

    A standard hd install is with or without softupdates?

    Without…


Log in to reply