*BSD News Article 28505


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!mel.dit.csiro.au!its.csiro.au!dmssyd.syd.dms.CSIRO.AU!metro!news.cs.su.oz.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!news.moneng.mei.com!news.introl.com!not-for-mail
From: tim@introl.com (Tim Chase)
Newsgroups: comp.os.386bsd.misc
Subject: Re: Shared Library Status ?
Date: 11 Mar 1994 13:37:51 -0600
Organization: Introl Corp.
Lines: 61
Message-ID: <2lqhaf$65l@introl.introl.com>
References: <JKH.94Mar5233255@whisker.hubbard.ie> <hastyCM9r6q.KFB@netcom.com> <2lgb5g$11gc@introl.introl.com> <2lik9d$f8h@pdq.coe.montana.edu>
NNTP-Posting-Host: introl.introl.com

In article <2lik9d$f8h@pdq.coe.montana.edu> nate@bsd.coe.montana.edu (Nate Williams) writes:
>
>You have some might fast hardware to be doing that.  I know what Terry

It shouldn't be much faster than most 66DX-2's.  I am, however feeding
the chip a 35 or 36 MHz clock (I can't remember which).  Also, one
thing I didn't mention was that my /var/tmp was mfs mounted (note for
current NetBSD users: this was before gcc was modified to use /tmp).
Anyways, as has been pointed out, the purpose of my posting was to show
the difference between compiling a kernel with a shared-library-using
compiler and a non-shared-library compiler.

>This is with FreeBSD 1.1-BETA with a very similar kernel to the one you
>posted, ignoring the config and make depend in a completely new kernel
>directory. (No static numbers.)

Ditto for me.  The numbers I posted were without a make depend.  It was
just a "time make" following a newly-created config'ed directory.

>How are you comparing shared and static?  Do you have a filesystem which
>contains all static binaries for the build tools?  How about the rest of

I manually re-built gcc, cc1, as and ld and installed them specifically
for this test.

>... How fast is your memory, what hard-drive and card
>combo., etc....?

These factors will not change the relative times of shared versus
non-shared, but since you asked, I've got 16 MB of 70nS RAM and 256K of
secondary cache.  I'm using an AMIbios with a UMC chipset and is
configured to be as fast as possible (2-1-1-1 cache access, 0 wait
state, etc.).  I was using a Micropolis 1205 drive and a BusLogic 545-S
fast SCSI-2 controller.

>Where are your times coming from?

The tcsh built-in time command.

> Is this including
>the make depend?  Did you do a make clean beforehand?  Details, details.

See above.

I think Chris (cgd) has pointed out the most possible culprit for the
apparent slowdown in shared executables under NetBSD that was seen in
tha past:  namely, the implementation was performing fix-ups in the
code segment which caused a lot of copy-on-writes.  Currently, if your
program would require any such fix-ups, the linker will print a RSS
relocation warning message.  Heck... given how much the implementation
was changing for awhile, I wouldn't be surprised if this slowdown
was only visible with a single day's sources (i.e. it could have
been remedied a day later).

In summary, there doesn't seem to be much reason to avoid using shared
libs under current version of NetBSD and, presumably, FreeBSD (they use
the same implementation, don't they?).

-- 
Tim Chase		           Introl Corp. Milwaukee, WI USA
Email: tim@introl.com		   Phone: +1 (414) 327-7171