Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Squid gets slower after some time

    Scheduled Pinned Locked Moved Cache/Proxy
    16 Posts 4 Posters 4.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      richie1985
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • R
        richie1985
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • KOMK
          KOM
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • perikoP
            periko
            last edited by

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

            Necesitan Soporte de Pfsense en México?/Need Pfsense Support in Mexico?
            www.bajaopensolutions.com
            https://www.facebook.com/BajaOpenSolutions
            Quieres aprender PfSense, visita mi canal de youtube:
            https://www.youtube.com/c/PedroMorenoBOS

            1 Reply Last reply Reply Quote 0
            • C
              castrofrota
              last edited by

              Are you using NTLM auth?

              1 Reply Last reply Reply Quote 0
              • R
                richie1985
                last edited by

                yes i do, could that be a problem?

                1 Reply Last reply Reply Quote 0
                • C
                  castrofrota
                  last edited by

                  Maybe.

                  I have the same issue!

                  Look this:

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

                  1 Reply Last reply Reply Quote 0
                  • KOMK
                    KOM
                    last edited by

                    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?

                    1 Reply Last reply Reply Quote 0
                    • R
                      richie1985
                      last edited by

                      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?

                      1 Reply Last reply Reply Quote 0
                      • KOMK
                        KOM
                        last edited by

                        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.

                        1 Reply Last reply Reply Quote 0
                        • R
                          richie1985
                          last edited by

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

                          Memory Size is Default with 64MB…

                          1 Reply Last reply Reply Quote 0
                          • KOMK
                            KOM
                            last edited by

                            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.

                            1 Reply Last reply Reply Quote 0
                            • R
                              richie1985
                              last edited by

                              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

                              1 Reply Last reply Reply Quote 0
                              • KOMK
                                KOM
                                last edited by

                                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

                                1 Reply Last reply Reply Quote 0
                                • R
                                  richie1985
                                  last edited by

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

                                  1 Reply Last reply Reply Quote 0
                                  • KOMK
                                    KOM
                                    last edited by

                                    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
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.