From owner-freebsd-arch@FreeBSD.ORG Thu Nov 10 19:05:38 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11016106564A for ; Thu, 10 Nov 2011 19:05:38 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 9BF7B8FC13 for ; Thu, 10 Nov 2011 19:05:37 +0000 (UTC) Received: by wwg14 with SMTP id 14so2289540wwg.31 for ; Thu, 10 Nov 2011 11:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=hf+TOfXrCArpJKfokkwHUf54pG+5KKrUPKLYxnRZoo8=; b=oh6G46MfvcFjNh/TCsMKB+64O6425Quysfe1n61LnRfVX0lcvcXWyDeTx6KzFJWoTD wTX4Gk6H+DB3JZtEvkmN0a3w/fN8WhbQJWxzbWBkA7/LGkbvDpCZpADlBOD1H64/MzGG Y8zgZAFs+3oCmTKRsHm2vXgCvN8n6XERmM4ho= MIME-Version: 1.0 Received: by 10.182.31.15 with SMTP id w15mr2153042obh.7.1320951935929; Thu, 10 Nov 2011 11:05:35 -0800 (PST) Received: by 10.182.122.33 with HTTP; Thu, 10 Nov 2011 11:05:35 -0800 (PST) In-Reply-To: References: <20111110123919.GF2164@hoeg.nl> <20111110171605.GI2164@hoeg.nl> <20111110174722.GJ2164@hoeg.nl> Date: Thu, 10 Nov 2011 11:05:35 -0800 Message-ID: From: Garrett Cooper To: Peter Wemm Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Ed Schouten , arch@freebsd.org Subject: Re: The strangeness called `sbin' X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2011 19:05:38 -0000 On Thu, Nov 10, 2011 at 10:43 AM, Peter Wemm wrote: > On Thu, Nov 10, 2011 at 10:12 AM, Garrett Cooper wro= te: >> On Thu, Nov 10, 2011 at 9:47 AM, Ed Schouten wrote: >>> * Peter Wemm , 20111110 18:33: >>>> Having /sbin in $PATH where /sbin is a symlink to /bin would be worse >>>> than having no /sbin at all, from a perspective of rootvnode lock >>>> lifetime. =A0If you can figure out how to get people to remove /sbin a= nd >>>> /usr/sbin from their paths after the symlink changes then it becomes a >>>> moot point. =A0But heck, I still have /usr/X11R6 in mine... :( >>> >>> On the other hand, if people used to have /sbin in their path and *do* >>> remove it properly after the upgrade, they should in theory see a >>> performance improvement, right? >> >> =A0 =A0Doesn't the negative directory cache (namei, etc) mitigate this? >> Thanks! > > Yes, the negative cache entries in the name cache should help. > > You know, we have very good tools to characterize the effects on > this.. see ministat(1). > > I'd be interested to see if the effects are worth worrying about on thing= s like: > > repeated shell startup (think: system(3)), or sh -c "somecommand" > buildworld time > runtime of non-trivial shell scripts, eg: configure, perl Configure etc > runtime of other some perl scripts that have a bunch of system() or > `cmd` all over the damn place. > > .. all with and without optimal $PATHs and bad $PATHs. > > The one that I can't think of a good way to characterize would be > systemic effects on rootvnode locking from hitting a /sbin->/bin > symlink. =A0That's harder to measure because it affects other users of > the system than the item under test. > > Even things like sh -c "command" is hard to measure because it'll hit > the name cache with 100% success and won't test the cache miss cases. gnn / Professor McKusick's book -- the Design and Implementation of FreeBSD -- suggests that this is an optimal method, but the benchmarks were run some time ago and hardware has changed. I think that rerunning the benchmarks on i386 vs amd64 vs {arm,mips,etc} would definitely be a good idea. Thanks! -Garrett