From owner-freebsd-net@FreeBSD.ORG Tue Jun 30 18:27:11 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEA64106566C for ; Tue, 30 Jun 2009 18:27:11 +0000 (UTC) (envelope-from lab@gta.com) Received: from mailgate.gta.com (mailgate.gta.com [199.120.225.20]) by mx1.freebsd.org (Postfix) with SMTP id 64DC08FC08 for ; Tue, 30 Jun 2009 18:27:11 +0000 (UTC) (envelope-from lab@gta.com) Received: (qmail 32649 invoked by uid 1000); 30 Jun 2009 18:00:29 -0000 Date: Tue, 30 Jun 2009 14:00:29 -0400 From: Larry Baird To: freebsd-net@freebsd.org Message-ID: <20090630180029.GA8847@gta.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: Polling and kern.polling.idle_poll X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2009 18:27:12 -0000 A while back I upgraded some old gateways from FreeBSD 4.x to FreeBSD 6.x. I thought the upgrade had went smoothly, but a while later I started having users complaining about throughput. Luckly I still had a backup of the FreebSD 4.x install. Did some throughput tests with iperf. Low and behold 4.x appeared to have twice the throughput. After lots of experimenting I determined that turning off polling fixed the issue. So I started digging through the kernel code to see what had changed in the polling logic. Finally arived at the fact that "kern.polling.idle_poll" defaults to 1 in 4.x and 0 in 6.x and above. Turning polling back on with idle-poll enabled fixed the performance issue. The man page for polling states: 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. So why is it now disabled by default? Looking back through cvs the change was made by Luigi way back in August of 2002. -- ------------------------------------------------------------------------ Larry Baird | http://www.gta.com Global Technology Associates, Inc. | Orlando, FL Email: lab@gta.com | TEL 407-380-0220, FAX 407-380-6080