From owner-svn-src-head@FreeBSD.ORG Thu Feb 19 22:45:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4B43106566B; Thu, 19 Feb 2009 22:45:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 571D68FC17; Thu, 19 Feb 2009 22:45:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id C5CBC46B55; Thu, 19 Feb 2009 17:45:15 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n1JMj70E054317; Thu, 19 Feb 2009 17:45:07 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: src-committers@freebsd.org Date: Thu, 19 Feb 2009 17:39:46 -0500 User-Agent: KMail/1.9.7 References: <200902192228.n1JMSn2Q009472@svn.freebsd.org> In-Reply-To: <200902192228.n1JMSn2Q009472@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902191739.46808.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 19 Feb 2009 17:45:07 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/9015/Thu Feb 19 13:30:06 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.3 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, HOT_NASTY autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r188833 - in head/sys: kern nfsclient sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2009 22:45:17 -0000 On Thursday 19 February 2009 5:28:49 pm John Baldwin wrote: > Author: jhb > Date: Thu Feb 19 22:28:48 2009 > New Revision: 188833 > URL: http://svn.freebsd.org/changeset/base/188833 > > Log: > Enable caching of negative pathname lookups in the NFS client. To avoid > stale entries, we save a copy of the directory's modification time when > the first negative cache entry was added in the directory's NFS node. > When a negative cache entry is hit during a pathname lookup, the parent > directory's modification time is checked. If it has changed, all of the > negative cache entries for that parent are purged and the lookup falls > back to using the RPC. This required adding a new cache_purge_negative() > method to the name cache to purge only negative cache entries for a given > directory. > > Submitted by: mohans, Rick Macklem, Ricardo Labiaga @ NetApp > Reviewed by: mohans Together with the previous two changes I measured a 30% drop in the number of RPCs for a kernel build (no modules): x nfs.old + nfs.new +------------------------------------------------------------------------------+ | + x | | + x | | + x | | + x | | + x | | + x | | + x | | + x | | + x | | + x | | + x | | + xx| | + xx| | + xx| |++ xx| |++ xx| |+++ xx| |+++ xx| |+++ xx| |+++ xxx| | A A|| +------------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 30 250515 252053 251393 251352.13 362.86492 + 30 173990 175930 175117 175011.87 474.44092 Difference at 95.0% confidence -76340.3 +/- 218.321 -30.3718% +/- 0.0868584% (Student's t, pooled s = 422.354) The majority of the drop was in the number of LOOKUP RPCs performed: x nfs.old + nfs.new +------------------------------------------------------------------------------+ | + x | | + x | | + x | | + x | | + x | | + x | | + x | | + x | | + x | | + x | | + x | | + xx| | + xx| | + xx| | + xx| |+++ xx| |+++ xx| |+++ xx| |+++ xx| |+++ xxx| | A| A|| +------------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 30 116997 118613 117898 117887.47 372.34733 + 30 40791 42782 41975 41846.5 481.79805 Difference at 95.0% confidence -76041 +/- 222.565 -64.503% +/- 0.188794% (Student's t, pooled s = 430.565) The old client performed 0 GETATTR RPC calls during the test. The new client performs a mix of GETATTR and ACCESS calls. One of the worries was that the client might now perform more RPC calls due to not priming the access cache, but this is not true in this test. This next histogram is for combined totals of ACCESS and GETATTR calls: x nfs.attr.old + nfs.attr.new +------------------------------------------------------------------------------+ | + + x x | | + + + + + x xxx xx | | +++++++++ + x x xxx xx | |+ ++++++++++ + + xxxx xxxxxxxxxx| ||_______M_A________| |__MA__| | +------------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 30 90823 90898 90858 90859.633 19.496212 + 30 90494 90792 90537 90543.467 50.121737 Difference at 95.0% confidence -316.167 +/- 19.6573 -0.347973% +/- 0.0216348% (Student's t, pooled s = 38.0282) With the new client, of the ~90k ACCESS + GETATTR calls are now split into approximately 94% GETATTR and 6% ACCESS versus 0% GETATTR and 100% ACCESS. All of these changes are more the product of other folks who deserve the credit moreso than myself. -- John Baldwin