Device Polling problem…
-
Whenever I enable "device polling", my CPU usage is always showing 100%. I'm on the latest build, p3 1 ghz, 320 mb mem. wan1 is xl0, wan2 is rl0, lan is fxp0. No other plug in, only load balancing..
Many thanks to anyone who can explain it…
-
Like it says in the GUI:
Generally this is not recommended. Not all NICs support polling
One of your NICs probably doesn't support it correctly.
Why are you trying to enable it? Excessive interupt load?Are you seeing anything in the logs?
You could probably enable polling on each interface individually to which is not handling it correctly:
ifconfig xl0 polling
and disabling it
ifconfig xl0 -polling
Edit: Individual interface polling is only availble under pfSense 2.0 (FreeBSD 8.x)
Steve
-
Polling uses 100% cpu. It always has, even if it didn't report that.
When you tell it to use polling, you are telling the system to use all available CPU cycles to poll the hardware for waiting data, instead of waiting for interrupts from the hardware.
-
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
-
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.
-
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.
-
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?^_^ -
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
-
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
-
If the 'enable device polling' box is checked then all interfaces should be brought up with polling enabled at boot.
Steve
-
thanks for the reply, but I want to do it manually if possible..
-
You could add the ifconfig commands using shellcmd.
See: http://doc.pfsense.org/index.php/Executing_commands_at_boot_timeSteve
-
Thank you very much…