From owner-freebsd-net@FreeBSD.ORG Wed Feb 5 06:15:04 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78AFE8FD for ; Wed, 5 Feb 2014 06:15:04 +0000 (UTC) Received: from nm13-vm4.bullet.mail.ne1.yahoo.com (nm13-vm4.bullet.mail.ne1.yahoo.com [98.138.91.173]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1695412C3 for ; Wed, 5 Feb 2014 06:15:03 +0000 (UTC) Received: from [98.138.100.111] by nm13.bullet.mail.ne1.yahoo.com with NNFMP; 05 Feb 2014 06:08:23 -0000 Received: from [98.138.226.58] by tm100.bullet.mail.ne1.yahoo.com with NNFMP; 05 Feb 2014 06:08:23 -0000 Received: from [127.0.0.1] by smtp209.mail.ne1.yahoo.com with NNFMP; 05 Feb 2014 06:08:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1391580503; bh=BmA+wqqUnjZ93RyhNgcdRR2UXq3aZEd7qiFs7uv6k1g=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=20kSi0yynt4/954Ukt893kG1lA827C/2ig/oALk3DBoRl4uTTZ6bUi7AkgREn0P9iHgT3COZ9+3XRJyXolqE3peoO3cJadzkqapROMYrtZGGoO1s1f7KZ7n1S2afDxjSEYezpFYSeYezhZfxvGU8v+2ueh5GEJSzeOD3jS9iu9s= X-Yahoo-Newman-Id: 359255.40074.bm@smtp209.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: .BwYLiMVM1mxsY2.wDKOyVt885qdTI04G57FxmvdI5h9Ysz 9LEKxtxSOCufEPDMPBmn8rXz9VbrUY0.mvD3qhY6BLGf0KWjhpb5ub93Xk2l R.JZMnBJHuzIQPRGpWUBXKjNDStjGPzPPKvS03DE4.QUsuep4zlnFHgTQkx7 IOI0xlshL4UH811C.IsSBm0YlOLt54X0Ic2YHM4KM82JB3g15P5G0nd8OZv. ictbEqlMa9o8kYGD0tqxUO6a1mMtDkRVUvJYfpH5yQYWoAjAXMJuAmYP2CE_ osPIyNZPC9aJDzpL3BYSQ3Ocfcv7pBs9ryS5q3LEBoBEa8CqhLowNQYjK84f slINn7PNCBt5X023lhLlqHC.CMukKN0.McK1U7lS3YKAc70jpNHPYXlDC80B ucgq0I7lUMe8GhVS5bIjRuZw9Qgg7ONPrq3shFG9wxl9l7oaNEVXDDbgalQd u2L7LpObRPvHQZAA0XPhAj4cvEVOW1cv3VXZd8Fu_j0197pz.Kzan.EoP5Mp 3RRWxX2rpIP9GSqj5E1r5lmN6pS_ANTgMhBJoyItVrS8z7ulAu.kFnvCNdq7 0oLA- X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- X-Rocket-Received: from phobos.samsco.home (scott4long@168.103.85.57 with plain [98.139.211.125]) by smtp209.mail.ne1.yahoo.com with SMTP; 05 Feb 2014 06:08:23 +0000 UTC Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: ixgbe/NFS m_defrag() instrumentation From: Scott Long In-Reply-To: <21233.52147.912022.488615@hergotha.csail.mit.edu> Date: Tue, 4 Feb 2014 23:08:21 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <21233.52147.912022.488615@hergotha.csail.mit.edu> To: Garrett Wollman X-Mailer: Apple Mail (2.1827) Cc: FreeBSD Net , rmacklem@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 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, 05 Feb 2014 06:15:04 -0000 On Feb 4, 2014, at 10:27 PM, Garrett Wollman wrote: > I instrumented calls to m_defrag() in ixgbe. As expected, it gets > called *a lot* when NFS is running with the default read size of 64k. > A simple benchmark (single-threaded sequential read of a 128 GB file > which I didn't even run to completion) tells the tale: > > $ sysctl dev.ix.0.mbuf_defrag_attempted > dev.ix.0.mbuf_defrag_attempted: 1737994 > > (There's already a similar counter for m_defrag() failures, which made > it easy to add this counter. Unfortunately, there is no analogous > instrumentation in cxgbe so I couldn't do likewise for that NIC.) dtrace to the rescue? #!/usr/sbin/dtrace -s fbt::m_defrag:entry { @ = count(); }