Squid gets slower after some time



  • hi,

    we use the squid proxy and it works realy well, but after some time it gets slower and slower (opening webpages takes extrem long time). than i restart squid service and all is running fast again. how can i check what is the reason for?

    Thx!

    Erik



  • no one a idea? i must restart my squid service every 3 days :(



  • SSH in and run:

    squidclient -h LAN_IP_ADDRESS -p 3128 mgr:info
    

    and look at the Median Service Times. See if anything looks out of order.  Also check your Squid logs at /var/squid/logs/cache.log.



  • I had seen that behavior went system eat all memory and start using swap.
    What top say went squid get slow?



  • Are you using NTLM auth?



  • yes i do, could that be a problem?



  • Maybe.

    I have the same issue!

    Look this:

    http://bugs.squid-cache.org/show_bug.cgi?id=3997



  • Squid can also appear slow if the system is running out of RAM.  On squid's config page, what do you have for Local Cache - Squid Memory Cache Settings - Memory cache size?



  • so new pfsense but old problem, after some days proxy gets slower and slower, after restart squid service its again fast. i dont think its memory (64MB)..

    i also think it could be something with ntlm …

    how can i check it?



  • how can i check it?

    I've already given you a couple of suggestions (none of which you acknowledged), but it doesn't appear that you have bothered to try them, or if you have you didn't mention it.



  • here is status page, at the moment where squid is slow

    Memory Size is Default with 64MB…



  • Your median service times are horrible.  No wonder it's slow.  Also look at your resource usage.  Why is your CPU at 37%???  Run top when the system is slow to see where all your CPU is going.  Your maximum resident size is the amount of RAM that squid is using, and for you it appears to be around 5 GB (!).  I'm suspecting that squid is using all your RAM so the system has to start paging to hard disk, and this will slow everything down.



  • hi KOM,

    here is my top:

    the Maximum Resident Size: 6052672 KB is again high, but i dont understand it, why squid takes so much ram? the default setting are 64MB, so it should not use more than 64MB or im wrong?

    Thx!

    Erik



  • here is my top:

    Yep, squid.

    so it should not use more than 64MB or im wrong?

    Not quite.  That settings is max memory or hot objects.  Otherwise, Squid uses RAM in conjunction with your disk cache size.  Bigger cahce with more objects equals more memory used.

    http://wiki.squid-cache.org/SquidFaq/SquidMemory



  • mhh i dont get it realy… my hard disk cache size is only 100MB???



  • Very strange.  Did you change the defaults in any meaningful way?

    Unless you have no other antivirus solution where you are, I would highly recommend getting rid of ClamAV.  It slows everything down.  I don't have an immediate answer to your problem.  ANything of interest in either /var/squid/logs/access.log or cache.log?  If nothing, you could try increasing the debug level by putting this into squid's Integrations section:

    debug_options rotate=1 ALL,2 11,5
    

Log in to reply