Subject: Re: why /bin and /sbin static
To: Matthias Buelow <mkb@mukappabeta.de>
From: None <wojtek@wojtek.from.pl>
List: netbsd-users
Date: 03/19/2001 00:48:46
> >init, etc...at least 500kB saving in MEMORY
> 
> Text segments are cached in memory anyways, so there would be no
> noticable speed improvement over dynamically linked programs, except
> in extraordinarily tight memory situations (and very much depending

"extraordinary tight"=used static programs doesn't easily fit in memory.

so 16MB could be classified as extraordinary tight.

> on the situation then), in fact, static programs load faster and
> execute a bit faster than dynamically linked ones.  The only
> advantage would be that, for example, ls and cp would share the
> few dozen kilobytes of libc text they otherwise would have a private

it is about 150-200kB to share between 4-5 programs. about 1MB memory.

> copy each but that certainly doesn't make up for the gross
> disadvantages in a disaster situation when having dynamically linked
> libraries (I've had a personal experience there, when some dork
> "upgraded" the libncurses library on a linux machine in /usr/lib
> and /lib, which /bin/sh (which really is a dynamically linked bash on
> lignux) depends on.  Basically, we had to boot from CDROM to solve
> this, which was rather unnerving, considering the server machine
> wasn't equipped with a CDROM drive at the time of "failure".  Since
> the BSD libc is so much smaller than the bloated Gnu libc that
> haunts linux, there isn't much to be gained from putting dynamically
> linked programs into /bin and /sbin[1], imho.

don't compare with linux. the fact that linux is better in wasting memory
does not mean no work in netbsd should be done to minimize wasting