From owner-cvs-all Wed Mar 20 12: 1:13 2002 Delivered-To: cvs-all@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 33A3637B404; Wed, 20 Mar 2002 12:01:06 -0800 (PST) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 20 Mar 2002 20:01:05 +0000 (GMT) To: Mike Silbersack Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/ufs/ufs ufs_dirhash.c In-reply-to: Your message of "Wed, 20 Mar 2002 12:28:38 CST." <20020320122802.U54496-100000@patrocles.silby.com> X-Request-Do: Date: Wed, 20 Mar 2002 20:01:04 +0000 From: David Malone Message-ID: <200203202001.aa48408@salmon.maths.tcd.ie> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > mean #probes for > > home dir mh inbox news/cancel tmp squid2 squid3 > > old successful 1.02 3.19 4.07 1.10 7.85 2.06 > > new successful 1.04 1.32 1.27 1.04 1.93 1.17 > > > > old unsuccessful 1.08 4.50 5.37 1.17 10.76 2.69 > > new unsuccessful 1.08 1.73 1.64 1.17 2.89 1.37 > What do the numbers look like w/o DIRHASH? I'm curious... The closest thing I could produce to a direct comparison would be the number of blocks fetched from the buffer cache. For a successful lookup this is (dirsize/2) and for an unsuccessful lookup (dirsize). For the table above: home dir mh inbox news/cancel tmp squid2 squid3 unsuccessful 47 58 3987 24 8 13 successful 23.5 29 1993.5 12 4 6.5 This comparison isn't exact 'cos dirhash won't always have to fetch a block for each probe and it also knows where to look within the block (without dirhash you always start at the beginning of the block). This also doesn't factor in the initial building of the hash or the nami cache. If you access the entries of the directory in the order readdir returns them, then the number of probes will be 1 in both the dirhash and non-dirhash case. This is what most sensible programs do. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message