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

    Very high CPU usage every 15 minutes

    Scheduled Pinned Locked Moved General pfSense Questions
    32 Posts 6 Posters 3.9k Views 4 Watching
    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.
    • stephenw10S Online
      stephenw10 Netgate Administrator
      last edited by

      Hmm, sure looks like it's reloading the rules. And not at 1h intervals.

      If you install the cron package when cron jobs are listed? (or just check the crontab)

      Steve

      1 Reply Last reply Reply Quote 0
      • V Offline
        ViniciusBr
        last edited by

        Here we go:

        pf-cron.JPG

        1 Reply Last reply Reply Quote 0
        • stephenw10S Online
          stephenw10 Netgate Administrator
          last edited by

          Ok so it's the filter_configure_sync cronjob. That is created if you have scheduled firewall rules.

          Do you need those rules?

          Of course it shouldn't be anything like the hit you're seeing to run it.

          Steve

          1 Reply Last reply Reply Quote 0
          • V Offline
            ViniciusBr
            last edited by

            @stephenw10 said in Very high CPU usage every 15 minutes:

            filter_configure_sync cronjob. That is created if you have scheduled firewall rules

            I just deleted the schedule and removed the schedule from the rule, I will monitor and will get back here.

            1 Reply Last reply Reply Quote 0
            • V Offline
              ViniciusBr
              last edited by

              So the 15 minutes spike is over, but the filter reload is still consuming loads of CPU, not as before, but still high (yellow are is after the schedule deletion):
              pf-cpu.JPG

              Checking the logs I can only see the filter reload:

              pf-logs2.JPG

              1 Reply Last reply Reply Quote 0
              • stephenw10S Online
                stephenw10 Netgate Administrator
                last edited by

                Yeah it still has to reload the ruleset whenever it changes, pfBlocker updated in that instance.

                Is it actually causing a problem though? You would expect it to use as much CPU as available to load the ruleset in the shortest possible time but won't necessarily effect other processes.

                Steve

                1 Reply Last reply Reply Quote 0
                • V Offline
                  ViniciusBr
                  last edited by

                  Well, the thing is: I have other pfsense boxes and they all have this 15 minute spike, but they don't go above 6% cpu usage, a few of them use less than 1%.. I know that several factors can cause this difference, but I still don't see why this huge CPU usage.

                  Thanks so far for the help!

                  1 Reply Last reply Reply Quote 0
                  • V Offline
                    ViniciusBr
                    last edited by

                    Another update: CPU is not consuming like before, maybe the first filter reload after the change was bad, but the following spikes are much much less cpu consuming:

                    pf-cpu2.JPG

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S Online
                      stephenw10 Netgate Administrator
                      last edited by

                      Mmm, that certainly looks better. But using CPU cycles is not a problem unless it takes priority over something more important. Extra CPU idle time isn't doing anything, literally! 😉

                      Steve

                      1 Reply Last reply Reply Quote 1
                      • chpalmerC Offline
                        chpalmer
                        last edited by chpalmer

                        @ViniciusBr said in Very high CPU usage every 15 minutes:

                        CPU Type Intel(R) Celeron(R) CPU G470 @ 2.00GHz

                        Keep in mind that CPU is a bit on the wimpy side compared to many others you see here.. So it will tend to look more "used" by the system at times. https://ark.intel.com/content/www/us/en/ark/products/74390/intel-celeron-processor-g470-1-5m-cache-2-00-ghz.html

                        Its single core. Can you/have you enabled multithreading in BIOS?

                        Triggering snowflakes one by one..
                        Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

                        1 Reply Last reply Reply Quote 1
                        • stephenw10S Online
                          stephenw10 Netgate Administrator
                          last edited by

                          Mmm, good point I hadn't clocked exactly what that was. It should support hyperthreading but that is a low-power Sandy Bridge Celeron.
                          What sort of CPUs are you comparing it to at your other sites?

                          Again though this is probably nothing to worry about if you're not seeing any actual connectivity issues.

                          Steve

                          1 Reply Last reply Reply Quote 0
                          • V Offline
                            ViniciusBr
                            last edited by

                            Well, take a look at the previous 48hs:
                            pf-cpu3.JPG

                            I will double check the Hyper-threading on the bios.

                            Thanks a lot for the help!

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.