James Carlson wrote:
> William Pursell writes:
> > On 8/29/07, Dave Miner <Dave.Miner at sun.com> wrote:
> > > William Pursell wrote:
[snip]
> > I want to add ksh93 and make /bin/sh a link to it. Should save some
> > disk space, memory and make miniroot faster
> 
> Then unpack the archive with /usr/sbin/root_archive and change it.
> 
> Don't forget that ksh93 has a different set of library requirements
> from /usr/bin/sh.  It needs all of the ones that /usr/bin/sh needs,
> plus the following:
[snip]
> And (of course) you'll need to include both /usr/bin/ksh93 and
> /usr/bin/i86/ksh93.

Erm, in the case of putting ksh93 into /sbin/sh's place you only need to
copy /usr/bin/i86/ksh93 to /sbin/sh (x86) or /usr/bin/sparc/ksh93 to
/sbin/sh (SPARC) - the "isaexec" wrapper (= /usr/bin/ksh93) is not
required in this case.

> And speed of the miniroot (at least in terms of upgrading or
> installing) is mostly governed by the speed of the random-access
> medium used to store the packages and the efficiency of the
> package-handling code itself, none of which has much to do with the
> shell.
> 
> It doesn't sound like a big win to me versus the 120020-byte /sbin/sh
> executable, but I guess your mileage will vary.

It depends... Solaris reads executable pages on demand (plus read-ahead)
and the shell is usually only read once (and some "extra" stuff like
libdll/libcmd is marked as "lazyload"). The interesting question is
which shell is faster (excluding the detail that most of the boot
process is limited by I/O performance, not CPU speed) - ksh93 has higher
startup costs then /sbin/sh but this extra "tax" is usually paid off if
the script uses only one single builtin command instead of the external
vesion and/or if the script uses subshells (ksh93 doesn't call |fork()|
for subshells).
Whether this matters from the boot performance point of view is a
different question...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to