device polling and high load averages

Kevin Oberman oberman at es.net
Tue Sep 27 14:12:12 PDT 2005


> Date: Tue, 27 Sep 2005 13:02:48 +0200
> From: peceka <peceka at gmail.com>
> Sender: owner-freebsd-stable at freebsd.org
> 
> Witaj Glenn,
> 
> W Twoim li=9Ccie datowanym 27 wrze=9Cnia 2005 (12:14:25) mo=BFna przeczyta=
> =E6:
> 
> > At 02:41 AM 9/27/2005, Vlad GALU wrote:
> >>On 9/27/05, peceka <peceka at gmail.com> wrote:
> >> > Hi,
> >> >
> >> > I've got:
> >> > fw3# uname -r
> >> > 5.4-RELEASE-p7
> >> >
> >> > in my kernel config i've set:
> >> > options         HZ=3D1000
> >> > options         DEVICE_POLLING
> >> >
> >> > fw3# cat /etc/rc.conf | grep ifconfig
> >> > ifconfig_em0=3D"inet 192.168.1.251 netmask 255.255.255.0 polling"
> >> >
> >> > fw3# cat /etc/sysctl.conf | grep poll
> >> > kern.polling.enable=3D1
> >> > kern.polling.idle_poll=3D1
> >> >
> >> > And all the time i've got:
> >> > fw3# uptime
> >> > 11:22AM  up  1:59, 1 user, load averages: 1.00, 1.00, 0.96
> >> >
> >> > from top:
> >> > last pid: 88131;  load averages:  1.00,  1.00,  0.96
> >> > 24 processes:  1 running, 23 sleeping
> >> > CPU states:  0.0% user,  0.0% nice, 99.2% system,  0.8%=20
> >> interrupt,  0.0% idle
> >> >
> >> > But this machine do nothing, just pure FBSD system. So why there is
> >> > such high load aver.?
> >> >
> >>
> >>   Because of kern.polling.idle_poll.
> 
> > and a load average of 1 isn't exactly "high" either...
> 
> But for machine which does nothing?
> CPU: Intel(R) Pentium(R) 4 CPU 3.20GHz (3200.13-MHz 686-class CPU)
> real memory  =3D 1341063168 (1278 MB)
> 
> What to do with kern.polling.idle_poll? It is needed to be set to 1?
> What does this do?

If your system is polling, it's not doing nothing. It's polling.

If you enable polling, the network interface is no longer interrupt
driven. Instead, the system will continually poll the interface to
check on the arrival of new packets.

Polling is a big win on busy network interfaces and it is much faster
than processing an interrupt, but it does generate a continual load
average of 1 since the system is always polling when nothing else is
going on. It does not matter what the speed of the system is as the
polling loop runs continually when the CPU is idle.

If you network is not very busy, you probably don't want polling.
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman at es.net			Phone: +1 510 486-8634


More information about the freebsd-stable mailing list