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

    Device Polling problem…

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    13 Posts 3 Posters 8.8k 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.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      Huh, I guess you learn something every day.
      So how does that tie in with test results such as this:
      http://www.cyberciti.biz/faq/freebsd-device-polling-network-polling-tutorial/
      Is it just the way cpu 'usage' is measured?

      Steve

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

        It depends on your hardware and traffic load. If you have a lot of traffic, more than your CPU can handle in terms of interrupts, then polling can give you better performance.

        It's not a magic one-size-fits-all performance booster. The vast majority of people will operate better on a day-to-day basis without it.

        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
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          I understand that using device polling over interrupts is really only of much use if you have a heavily loaded system where it may increase throughput. I'm just curious as to how the author of the above link, or any others, recorded a drop in cpu usage.
          This seems to be a fairly definitive, if a bit old, source of information on polling under FreeBSD.
          That also shows a drop in cpu load. However it doesn't say how that is being measured. I would expect cpu load to shift from interupt to system in top perhaps.  :-\

          Enabling it on my home box (em and fxp interfaces) has no effect. CPU use stays at pretty much 0-1%.
          I'm now not sure it's actually using polling.

          Steve

          Edit: OK so it seems that enabling polling in the gui is not enough to actually turn polling on. You can set it on each interface manually 'ifconfig em1 polling'. As predicted the cpu goes to 100% system load and the web interface becomes completely unusable.

          1 Reply Last reply Reply Quote 0
          • F
            Frozen_Fire
            last edited by

            Thanks Step and Jimp for the nice discussion. I tried your suggestion to enable it manually and its working pretty nice. The cpu is only 0-40%, and the traffic graph looks more stable. I'll have to test it further and report back the result.
            By the way, how do I know if the device polling is really active?^_^

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

              It should list polling if you query the interface:

              
              [2.0-RC2][root@pfsense.fire.box]/root(6): ifconfig em1
              em1: flags=8843 <up,broadcast,running,simplex,multicast>metric 0 mtu 1500
              	options=db <rxcsum,txcsum,vlan_mtu,vlan_hwtagging,polling,vlan_hwcsum>ether 00:90:7f:31:4b:ee
              	inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
              	inet6 fe80::290:7fff:fe31:4bee%em1 prefixlen 64 scopeid 0x2 
              	nd6 options=3 <performnud,accept_rtadv>media: Ethernet autoselect (100baseTX <full-duplex>)
              	status: active</full-duplex></performnud,accept_rtadv></rxcsum,txcsum,vlan_mtu,vlan_hwtagging,polling,vlan_hwcsum></up,broadcast,running,simplex,multicast> 
              

              It's interesting, I thought I had a grip on what was happening here but now I'm not sure.  :-
              If you enanble polling on an individual interface without checking the box in the GUI then I'm unsure what happens. CPU does not go to 100%.

              Steve

              1 Reply Last reply Reply Quote 0
              • F
                Frozen_Fire
                last edited by

                This is only my observation base on my case: (Load-15 clients + wifi)

                • Polling is manually enabled in all interface - downloading is very good especially torrent , youtube is very good, online games is disconnected everytime cpu reaches 100%.
                • Polling is only enabled on my two wan - downloading is good, youtube is good, online games always lag but not disconnected.
                • Polling is only enabled on lan side - downloading is very good but not in torrent, youtube is very good, online games is seldom disconnected.

                P.S. How to enable device polling permanently… thank you

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

                  If the 'enable device polling' box is checked then all interfaces should be brought up with polling enabled at boot.

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • F
                    Frozen_Fire
                    last edited by

                    thanks for the reply, but I want to do it manually if possible..

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

                      You could add the ifconfig commands using shellcmd.
                      See: http://doc.pfsense.org/index.php/Executing_commands_at_boot_time

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • F
                        Frozen_Fire
                        last edited by

                        Thank you very much…

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