From owner-freebsd-stable@FreeBSD.ORG Sun Sep 17 18:33:08 2006 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 85C6F16A407 for ; Sun, 17 Sep 2006 18:33:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 011B043D53 for ; Sun, 17 Sep 2006 18:33:07 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id C96EA46C3C; Sun, 17 Sep 2006 14:33:06 -0400 (EDT) Date: Sun, 17 Sep 2006 19:33:06 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Eugene Kazarinov In-Reply-To: <519867a90609170920x51726e74k6f86f2661965fd03@mail.gmail.com> Message-ID: <20060917192528.P56201@fledge.watson.org> References: <450CE15B.3060806@thebeastie.org> <519867a90609170920x51726e74k6f86f2661965fd03@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-stable@freebsd.org Subject: Re: Polling and em0 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: Sun, 17 Sep 2006 18:33:08 -0000 On Sun, 17 Sep 2006, Eugene Kazarinov wrote: >> Since 6.1 I have stopped using polling as a regular kernel seems to give >> good performance as compared to polling mode. In fact I used to get >> anything between 55-75megs/sec on 6.1 with regular cables but since >> upgraded to cat6 quality Ethernet cable I get practically full gigabit >> speed with no polling. Close to 97megs/sec is the performance I get out of >> my Dells with the em driver, and apparently the new em driver in 6-stable >> 6.2 is even faster. >> >> em(4) Dell to em(4) Dell >> dell1# cat /dev/zero | dd bs=1m | nc dell2 3000 >> ^C0+18456 records in >> 0+18455 records out >> 1209466880 bytes transferred in 12.459299 secs (97,073,429 bytes/sec) > > Do you meen that from 6.2 I dont need polling for fastest performance? There are two benefits to polling: - Moderating interrupt rates - Scheduling control over the amount of CPU dedicated to network tasks Modern gigabit cards have interrupt moderation, so in practice you get a polling-like effect with regard to interrupt rates. With significant performance improvements in the if_em driver over the last year, it could well be that the benefits of the scheduling control no longer provide much help. Gigabit network cards also require a very high polling rate in order to be effective, since the on-card buffers quickly fill -- as a result, unless the poll rate (driven by HZ) is set extremely high, polling may actually significant reduce performance by dramatically increasing packet loss under load. Robert N M Watson Computer Laboratory University of Cambridge