Subject: Re: 23 minutes to compile my kernel over here....
To: None <owner-current-users@sun-lamp.cs.berkeley.edu>
From: Andrew Reilly <A.REILLY@qut.edu.au>
List: current-users
Date: 12/14/1993 07:42:54
Hello Chris,

I'm not running -current yet, but watching with interest.

> There's also the possibility that, if your libs and binaries aren't
> made properly, you could be eating *more* vm than before.

This is almost certainly true, even if you don't get the
"rrs relocations".  Remember that statically linked programs
only load the functions they need from the library, and then
pack these into a compact, contiguous block.  Dynamically
linked programs effectively link in the _whole_ library, so
their locality of reference will be much worse.  There will
probably be many cases where a short subroutine will be the
only thing required from a page, but you still pay for the
whole page.

This is particularly noticible for X programs, and
particularly Motif ones.  On the system I'm using now (a
static linked 4.3 BSD system from Sony), the Motif libraries
take about 3.5M, but the bigest program linked with them is
around 1M, and most are around 600K.  That says a lot about
the fraction of the library that's actually being used.

Perhaps a (partial) solution would be to use profiling to
measure frequency of access to library routines, and then
re-order the library to ensure that the most often used ones
were clumped together.  (Probably at the beginning.)
Dunno how possible that is.

So the choice seems to be: buy more disk (and stick with
statically linked binaries) or buy more RAM (and use dynamic
linked ones.)

-- Andrew Reilly --   |  A.Reilly@qut.edu.au |
      Signal Processing Research Centre      |
   QUT, GPO 2434, Brisbane 4001, Australia.  |
phone: +61 7 864 2459 | fax: +61 7 864 1516  |

------------------------------------------------------------------------------