From owner-freebsd-net@FreeBSD.ORG Wed Feb 1 21:14:47 2012 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 2D0631065687 for ; Wed, 1 Feb 2012 21:14:47 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 846AE8FC15 for ; Wed, 1 Feb 2012 21:14:46 +0000 (UTC) Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1RshVx-000MXS-5J; Thu, 02 Feb 2012 01:14:49 +0400 Message-ID: <4F29E2C8.5000909@FreeBSD.org> Date: Thu, 02 Feb 2012 01:11:36 +0000 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120121 Thunderbird/9.0 MIME-Version: 1.0 To: Andrey Zonov References: <4F29A464.3080302@zonov.org> In-Reply-To: <4F29A464.3080302@zonov.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: netisr defered - active only one thread 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: Wed, 01 Feb 2012 21:14:47 -0000 On 01.02.2012 20:45, Andrey Zonov wrote: > Hi, > > I'm trying to tune machine with 8.2-STABLE for heavy network load and > now playing with netisr. Could anyone explain me why actually works only > one netisr thread if I set them to 8? Can you please supply `nestat -Q` output and clarify you usage pattern ? (I mean, this is router/web server/some kind of traffic receiver/etc..). For example, flow policy does not balance traffic from single flow between different CPUs. > > loader.conf: > net.isr.maxthreads=8 > net.isr.bindthreads=0 (also tried set to 1) > hw.em.rxd=4096 > > (net.isr.numthreads is 8 after reboot, `procstat -t 12' shows me 8 > netisr threads) > > sysctl.conf: > net.isr.direct=0 > net.isr.direct_force=0 (also tried hybrid mode when direct=1, but > force_direct=0) > > NIC: > em0@pci0:4:0:0: class=0x020000 card=0x109615d9 chip=0x10968086 rev=0x01 > hdr=0x00 > vendor = 'Intel Corporation' > device = 'Intel PRO/1000 EB (Intel PRO/1000 EB)' > class = network > subclass = ethernet > > No polling. > > top: > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND > 12 root -44 - 0K 512K CPU7 7 1:18 100.00% {swi1: netisr 7} > 11 root 171 ki31 0K 128K CPU3 3 2:15 94.38% {idle: cpu3} > 11 root 171 ki31 0K 128K CPU6 6 2:06 90.19% {idle: cpu6} > 11 root 171 ki31 0K 128K CPU2 2 2:42 88.67% {idle: cpu2} > 11 root 171 ki31 0K 128K CPU1 1 2:22 84.18% {idle: cpu1} > 11 root 171 ki31 0K 128K CPU5 5 2:29 75.29% {idle: cpu5} > 11 root 171 ki31 0K 128K RUN 4 2:28 69.97% {idle: cpu4} > 11 root 171 ki31 0K 128K RUN 0 2:29 69.68% {idle: cpu0} >