From owner-freebsd-current@FreeBSD.ORG Fri Nov 19 03:02:10 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 388FF16A4D1; Fri, 19 Nov 2004 03:02:10 +0000 (GMT) Received: from juniper.fornext.org (53.35.138.210.xn.2iij.net [210.138.35.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CC2243D39; Fri, 19 Nov 2004 03:02:09 +0000 (GMT) (envelope-from shino@fornext.org) Received: from [127.0.0.1] (ariel.net.ss.titech.ac.jp [131.112.21.25]) by juniper.fornext.org (Postfix) with ESMTP id 855C02A; Fri, 19 Nov 2004 12:02:07 +0900 (JST) Date: Fri, 19 Nov 2004 12:02:07 +0900 From: Shunsuke SHINOMIYA To: Matthew Dillon In-Reply-To: <200411182131.iAILVJ1T032003@apollo.backplane.com> References: <20041118124902.GC75559@freebie.xs4all.nl> <200411182131.iAILVJ1T032003@apollo.backplane.com> Message-Id: <20041119114233.C43B.SHINO@fornext.org> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.11.02 [ja] cc: Emanuel Strobl cc: Wilko Bulte cc: Robert Watson cc: freebsd-current@freebsd.org cc: freebsd-stable@freebsd.org Subject: Re[2]: serious networking (em) performance (ggate and NFS) problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2004 03:02:10 -0000 Hi list, if you suppose your computer has sufficient performance, please try to disable or adjust parameters of Interrupt Moderation of em. In my router(Xeon 2.4GHz and on-board two em interfaces) case, it improves a router's packet forwarding performance. I think the interrupt delay by Interrupt Moderation caused NIF's input buffer overflow or output buffer underrun in this case. In order to disable Interrupt Moderation, modify src/sys/dev/em/if_em.c like the following patch and set hw.em.{rx,tx}_{,abs_}int_delay zero by sysctl. *** if_em.c-1.44.2.3.orig Fri Nov 19 11:22:48 2004 --- if_em.c Fri Nov 19 11:23:39 2004 *************** em_initialize_receive_unit(struct adapte *** 2611,2618 **** --- 2611,2622 ---- /* Set the interrupt throttling rate. Value is calculated * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) */ + #if 1 + #define DEFAULT_ITR 0 + #else #define MAX_INTS_PER_SEC 8000 #define DEFAULT_ITR 1000000000/(MAX_INTS_PER_SEC * 256) + #endif E1000_WRITE_REG(&adapter->hw, ITR, DEFAULT_ITR); } -- Shunsuke SHINOMIYA