Subject: Re: HEADS UP: migration to fully dynamic linked "base" system
To: None <current-users@netbsd.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: current-users
Date: 08/26/2002 11:37:42
On Mon, Aug 26, 2002 at 04:13:25PM +0100, David Laight wrote:
> On Mon, Aug 26, 2002 at 04:20:39PM +1000, Luke Mewburn wrote:
> > 
> > I will be switching NetBSD-current to have dynamically linked programs
> > in /bin and /sbin in the next day or so.
> 
> The only problem I see is that a lot of scripts will start running
> significantly slower if the small 'workhorse' programs (ln, rm, chmod,
> test, mkdir, expr etc) become dynamic.
> 
> Some tests I've just done indicate that the time to exec a dynamically
> linked program is about 7 times that of a static one (on i386).
> 
> (the 3.75% improvement I've made is insignificant...)

This *is* a big deal.  It was one of the major reasons SGI faced a mass
exodus of customers in the early Irix 6 era: their systems took far longer
to start up than they ever had before, and sundry trivial shell-script
tasks (their nice GUI does tend to call a certain number of scripts) 
similarly got much slower, leading to a general perception that their OS
was becoming horribly bloated and slow when in fact many kernel operations
were faster.

The cause?  You guessed it: dynamically linking everything.  Eventually
they kind-of addressed this with a very good prebinding implementation,
but I don't see that on the short-term horizon for NetBSD.

A certain number of 'workhorse' commands, as David suggests, should remain
static so that we don't destroy shell script performance.

-- 
 Thor Lancelot Simon	                                      tls@rek.tjls.com
   But as he knew no bad language, he had called him all the names of common
 objects that he could think of, and had screamed: "You lamp!  You towel!  You
 plate!" and so on.              --Sigmund Freud