From owner-freebsd-performance@FreeBSD.ORG Sun Feb 19 04:17:51 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D1FA16A423 for ; Sun, 19 Feb 2006 04:17:51 +0000 (GMT) (envelope-from mark@gaiahost.coop) Received: from biodiesel.gaiahost.coop (biodiesel.gaiahost.coop [64.95.78.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05C9543D5F for ; Sun, 19 Feb 2006 04:17:46 +0000 (GMT) (envelope-from mark@gaiahost.coop) Received: from gaiahost.coop (host-64-65-195-19.spr.choiceone.net [::ffff:64.65.195.19]) (AUTH: LOGIN mark@hubcapconsulting.com) by biodiesel.gaiahost.coop with esmtp; Sat, 18 Feb 2006 23:17:46 -0500 id 0057807F.43F7F16A.000066B2 Received: by gaiahost.coop (sSMTP sendmail emulation); Sat, 18 Feb 2006 23:17:52 -0500 Date: Sat, 18 Feb 2006 23:17:52 -0500 From: Mark Bucciarelli To: freebsd-performance@freebsd.org Message-ID: <20060219041752.GU2756@rabbit> Mail-Followup-To: freebsd-performance@freebsd.org References: <20060219040656.GT2756@rabbit> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <20060219040656.GT2756@rabbit> User-Agent: Mutt/1.4.2.1i Subject: Re: stat speed X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2006 04:17:51 -0000 On Sat, Feb 18, 2006 at 11:06:57PM -0500, Mark Bucciarelli wrote: > I'm curious how fast stat is. > > I generated a list of 200,000 file names > > # find / | head -200000 > files.statspeed > > then ran a million iterations of randomly picking a file name and > stating it (see attached program). Hmmm, 200,000 files 1,000,000 iterations. On avg, each file hit five times. Uhh, that's not a good way to avoid caching. Doh. Wow, caching is pretty amazing. I just reran the program, this time using 500,000 file paths and only stat'ing 10,000 of them. The first run was 99,059/second, the second was 188,239. So I guess 100,000/second is about right on my system w/o cache. m