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

    Polling causes 100% CPU

    Scheduled Pinned Locked Moved 1.2.3-PRERELEASE-TESTING snapshots - RETIRED
    12 Posts 9 Posters 16.6k 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.
    • C
      cmb
      last edited by

      There is some kind of problem with polling, it pegs the CPU at 100%. It's not a nanobsd issue, full installs do the same. Looks like a regression in FreeBSD 7.2.

      You rarely want to use polling anyway, I would just leave it disabled. Seeing if we can find an easy solution.

      1 Reply Last reply Reply Quote 0
      • X
        xbipin
        last edited by

        i have the device polling disabled but as soon as i make any other modifications, it starts using 100% CPU

        1 Reply Last reply Reply Quote 0
        • W
          wonslung
          last edited by

          i can second this.  I was noticing 50% cpu usage with little traffic and 100% with heavy traffic, i thought this was due to ntop becuase this is what was showing the highest in TOP, but cpu drops to a normal level (4-12%) with polling disabled.

          Any reason why this would be so?

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            @wonslung:

            i can second this.  I was noticing 50% cpu usage with little traffic and 100% with heavy traffic, i thought this was due to ntop becuase this is what was showing the highest in TOP, but cpu drops to a normal level (4-12%) with polling disabled.

            Any reason why this would be so?

            Try running:
            top -SH

            That way it will show system and other normally hidden threads.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • T
              Ter Roshak
              last edited by

              device polling enabled starts up the system process "idle_poll" which
              uses up all your free cpu time for some kind of "wait for the next time i can poll some data"
              there is an option you can tweak the polling interval in HZ which default value is 1000,
              so idle_poll will 1000 times a second poll for data…

              i don't know exactly what it does in the meantime with my cpu load so i just
              switched it off... working perfectly with a slightly higher latency...

              sysctl kern.polling.idle_poll=0

              solves this problem...

              there are other ways tuning up polling for you.. but for now it should help..

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                Ter Roshak,

                Tweaking that sysctl may not do what you want. From the polling(4) man page:

                kern.polling.idle_poll
                            Controls if polling is enabled in the idle loop.  There are no
                            reasons (other than power saving or bugs in the scheduler's han-
                            dling of idle priority kernel threads) to disable this.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • W
                  wonslung
                  last edited by

                  @jimp:

                  @wonslung:

                  i can second this.  I was noticing 50% cpu usage with little traffic and 100% with heavy traffic, i thought this was due to ntop becuase this is what was showing the highest in TOP, but cpu drops to a normal level (4-12%) with polling disabled.

                  Any reason why this would be so?

                  Try running:
                  top -SH

                  That way it will show system and other normally hidden threads.

                  yes, i saw this shortly after i posted.  I indead have a 100% idle_poll process

                  1 Reply Last reply Reply Quote 0
                  • ?
                    Guest
                    last edited by

                    i have in one box squid over 60% all the time (idle is 9%, and all is near 100%). before everything was most of time below 60%. only change is that i enlarged disk cache from 500MB to 40GB

                    1 Reply Last reply Reply Quote 0
                    • W
                      Wilson Chuah
                      last edited by

                      Just want to add that I have this problem with the pfsense box I have at home running 1.2.3 RC3, I didn't have this problem in RC1.

                      I'm running on an old Acer PC with two similar DLINK NICs (don't remember the specific model). Whenever I turn off device polling I start to have collisions and network traffic problems so I need it enabled.

                      1 Reply Last reply Reply Quote 0
                      • S
                        stephenyeong
                        last edited by

                        I have this issue too, using latest snapshot version of 1.2.3rc3

                        I just comment out one line on folling file to make the box not apply idle_poll again.
                        /etc/inc/pfsense-utils.inc
                        line 1103
                        mwexec("/sbin/sysctl kern.polling.idle_poll=1");

                        1 Reply Last reply Reply Quote 0
                        • jimpJ
                          jimp Rebel Alliance Developer Netgate
                          last edited by

                          @stephenyeong:

                          I have this issue too, using latest snapshot version of 1.2.3rc3

                          I just comment out one line on folling file to make the box not apply idle_poll again.
                          /etc/inc/pfsense-utils.inc
                          line 1103
                          mwexec("/sbin/sysctl kern.polling.idle_poll=1");

                          By doing that, you never enabled polling. That sysctl is what actually enables polling.

                          Polling works by using idle CPU cycles to poll instead of using interrupts.

                          It is not "stealing" or "hogging" your CPU time. That is just how it works. There is no problem here, it's just a cosmetic difference in how CPU time is reported.

                          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                          Need help fast? Netgate Global Support!

                          Do not Chat/PM for help!

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