From owner-freebsd-stable@FreeBSD.ORG Tue Sep 27 21:12:12 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 280BE16A457 for ; Tue, 27 Sep 2005 21:12:10 +0000 (GMT) (envelope-from oberman@es.net) Received: from postal4.es.net (postal4.es.net [198.124.252.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8120343D8E for ; Tue, 27 Sep 2005 21:12:09 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal4.es.net (Postal Node 4) with ESMTP (SSL) id IBA74465; Tue, 27 Sep 2005 14:12:07 -0700 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 24C275D09; Tue, 27 Sep 2005 14:12:05 -0700 (PDT) To: peceka In-reply-to: Your message of "Tue, 27 Sep 2005 13:02:48 +0200." <06021512.20050927130248@gmail.com> Date: Tue, 27 Sep 2005 14:12:05 -0700 From: "Kevin Oberman" Message-Id: <20050927211205.24C275D09@ptavv.es.net> Cc: freebsd-stable@freebsd.org, Vlad GALU , Glenn Dawson Subject: Re: Re[2]: device polling and high load averages X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 21:12:12 -0000 > Date: Tue, 27 Sep 2005 13:02:48 +0200 > From: peceka > Sender: owner-freebsd-stable@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 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@es.net Phone: +1 510 486-8634