Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2011 10:43:03 -0800
From:      Peter Wemm <peter@wemm.org>
To:        Garrett Cooper <yanegomi@gmail.com>
Cc:        Ed Schouten <ed@80386.nl>, arch@freebsd.org
Subject:   Re: The strangeness called `sbin'
Message-ID:  <CAGE5yCr1oJB1HTCe2kYM5E3uP1XdzRsRdT6k9CWyVRLF4_GvtA@mail.gmail.com>
In-Reply-To: <CAGH67wSw-aSbXdskApWdAD59TwDHW7QeYGmY4vTZaPWMubDb5w@mail.gmail.com>
References:  <20111110123919.GF2164@hoeg.nl> <CAGE5yCr3BzWzwOAqo7wifgUTRC%2BG=2o4bDmk9H-%2BCxr=zJqYmw@mail.gmail.com> <20111110171605.GI2164@hoeg.nl> <CAGE5yCqMcHwAhXKbyEH6vUR=N14tCjkgX=RMJTdq-po92GcOMQ@mail.gmail.com> <20111110174722.GJ2164@hoeg.nl> <CAGH67wSw-aSbXdskApWdAD59TwDHW7QeYGmY4vTZaPWMubDb5w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 10, 2011 at 10:12 AM, Garrett Cooper <yanegomi@gmail.com> wrote=
:
> On Thu, Nov 10, 2011 at 9:47 AM, Ed Schouten <ed@80386.nl> wrote:
>> * Peter Wemm <peter@wemm.org>, 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 an=
d
>>> /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 things =
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.  That'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.

--=20
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV
"All of this is for nothing if we don't go to the stars" - JMS/B5
"If Java had true garbage collection, most programs would delete
themselves upon execution." -- Robert Sewell



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGE5yCr1oJB1HTCe2kYM5E3uP1XdzRsRdT6k9CWyVRLF4_GvtA>