From owner-freebsd-net@FreeBSD.ORG Thu Oct 15 16:15:39 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 1FE141065695; Thu, 15 Oct 2009 16:15:39 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from mx34.mail.ru (mx34.mail.ru [94.100.176.48]) by mx1.freebsd.org (Postfix) with ESMTP id D090E8FC14; Thu, 15 Oct 2009 16:15:38 +0000 (UTC) Received: from [217.25.27.27] (port=8869 helo=[217.25.27.27]) by mx34.mail.ru with asmtp id 1MySzJ-000D3b-00; Thu, 15 Oct 2009 20:15:37 +0400 Message-ID: <4AD74AA8.1030203@mail.ru> Date: Thu, 15 Oct 2009 21:15:36 +0500 From: rihad User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Robert Watson References: <4AD6D99E.10805@mail.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: Not detected X-Mras: Ok Cc: freebsd-net@freebsd.org Subject: Re: dummynet dropping too many packets 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: Thu, 15 Oct 2009 16:15:39 -0000 Robert Watson wrote: > > On Thu, 15 Oct 2009, rihad wrote: > >> meaning that USABLE_TX_BD is expected to be smaller than MAX_TX_BD. >> What if MAX_TX_BD is itself way smaller than 1024, which I'll >> eventually set ifq_drv_maxlen to? Can a driver guru please comment on >> this? In a few days I'm going to try it anyway, and if the system >> locks up I'll just revert back to the original code, and order a darn >> expensive Intel 10 Gige card, but it won't hurt to ask beforehand. > > Depending on your tolerance for experimentalism, it might be useful to > use DTrace to confirm our interpretation of events. The way I'd do this > is to add an instrumentation point (using SDT) to the points where the > statistics of interest are getting bumped, and then profile using DTrace > for a bit with the following script: > > the:event:name:here > { > @data[stack()] = count(); > } > > Let it run for 30-60 seconds, and you should get back a report on the > frequency of each possible code path to generate the statistic. We > believe that the drops are a result of bursts of packets from dummynet, > in which case the dominant trace should be to dummynet timers. It would > be interesting to see if that's right. > Thanks, but as I haven't ever played with DTrace before, but for the sake of FreeBSD and for our own sake, could you or someone else provide me with a step-by-step tutorial on how to do exactly that? I hear GENERIC kernel lacks DTrace support, so I must rebuild it with KDTRACE_HOOKS enabled? Does such support hurt normal performance while dtrace is not being used? I'm a bit afraid of experimenting on a production box belonging to a business I do not own. Meanwhile today I've emailed David Christensen mentioned in the bce source code, asking him if it's ok to change that value. > If I get a chance, I'll spend a few minutes today looking at a more > general patch to make it easy to use DTrace with network stack error > points. > > Robert > >