From owner-freebsd-net@FreeBSD.ORG Wed Apr 18 07:08:57 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 33168106564A; Wed, 18 Apr 2012 07:08:57 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id E1E338FC12; Wed, 18 Apr 2012 07:08:56 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 916837300A; Wed, 18 Apr 2012 09:28:18 +0200 (CEST) Date: Wed, 18 Apr 2012 09:28:18 +0200 From: Luigi Rizzo To: sbruno@freebsd.org Message-ID: <20120418072818.GA58850@onelab2.iet.unipi.it> References: <1334705064.4486.23.camel@powernoodle-l7.corp.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1334705064.4486.23.camel@powernoodle-l7.corp.yahoo.com> User-Agent: Mutt/1.4.2.3i Cc: "freebsd-net@freebsd.org" Subject: Re: igb(4) Raising IGB_MAX_TXD ?? 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, 18 Apr 2012 07:08:57 -0000 On Tue, Apr 17, 2012 at 04:24:24PM -0700, Sean Bruno wrote: > We're running a service with a 82576 configured with 4 queues and a > maxed rxd/txd configuration: > > http://people.freebsd.org/~sbruno/igb_stats.txt these stats show that over half of your incoming traffic is made of small packets (65..127 bytes) but especially, that the "missed packets" count is very small (18k out of 40G packets) none of them is reported as "no_desc_avail", and only 76 are "recv_no_buffer". Are you dropping packets in the ip interrupt handler by chance ? what are your settings there ? BTW it seems that there is only one global setting for the dispatch policy, but for instance there are two netisr_dispatch() calls in the incoming path, one for layer2 and one for layer3. The former has relatively little work to do and so it might make sense to have direct dispatch, the other can be expensive so i wonder if it wouldn't be better to use deferred dispatch. If not, perhaps you might try to reduce the rx_processing_limit to bring down the load on the intr thread. > sysctl net | grep intr net.inet.ip.intr_queue_maxlen: 256 net.inet.ip.intr_queue_drops: 253 > sysctl net.isr net.isr.numthreads: 1 net.isr.maxprot: 16 net.isr.defaultqlimit: 256 net.isr.maxqlimit: 10240 net.isr.bindthreads: 0 net.isr.maxthreads: 1 net.isr.direct: 0 net.isr.direct_force: 0 net.isr.dispatch: direct > We still see, under higher load spikes, a tendency to drop packets (I > suspect an application issue at this point, but want to attempt to > alleviate some congestion). > > I note that IGB_MAX_RXD is set to 4k. Reviewing the Intel spec shell on > the 82576 I see that the maximum value for the Descriptor Ring Length > (8.10.8) is 32k descriptors. > > Does that mean I should be able to go higher that 4k? I suspect that > even if I can, that would merely make the traffic fill more buffer > space, but maybe its enough to make it work a bit better. With your numbers i doubt that raising the queue size helps. cheers luigi > Sean > > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"