From owner-freebsd-hackers Wed Aug 27 23:22:46 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA11256 for hackers-outgoing; Wed, 27 Aug 1997 23:22:46 -0700 (PDT) Received: from server.local.sunyit.edu (A-T34.rh.sunyit.edu [150.156.210.241]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA11249 for ; Wed, 27 Aug 1997 23:22:43 -0700 (PDT) Received: from localhost (perlsta@localhost) by server.local.sunyit.edu (8.8.5/8.8.5) with SMTP id CAA28133; Thu, 28 Aug 1997 02:27:49 GMT X-Authentication-Warning: server.local.sunyit.edu: perlsta owned process doing -bs Date: Thu, 28 Aug 1997 02:27:48 +0000 (GMT) From: Alfred Perlstein X-Sender: perlsta@server.local.sunyit.edu To: "John S. Dyson" cc: hackers@FreeBSD.ORG Subject: Re: shared libraries? In-Reply-To: <199708280507.AAA07664@dyson.iquest.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > If most of the libraries were converted to a shared lib format wouldn't > > that reduce memory and disk space requirements tremendously? > > not only that, but complile times and exec times would soar, woudn't they? > > > Believe it or not, shared libs often hurt more than help. Even with an > ideal scheme that is prelinked, a program can take MORE memory, not less. > We share the .text of programs even without using shared libs. In the > case of shells, shared libs are usually a loose. A rule of thumb that I use > is (These are only my opinions): I'm not arguing, just asking, why would using shared libraries hurt? In a large system under a lot of user load executing programs(although nowadays it's mostly personal workstations) or bringing up servers, why should each instance of seperate programs which use the same exact facilities takeing up signifigantly less memory be a problem, take for instance: a slew of programs are run each using the same suite of standard library functions, only one copy of the routines need be present in memory. i know that for forking only data is copied, and then only when it is nessesary, but for each program we are talking about duplicated TEXT? how can shared libs not be the answer? also below, is there a reason several of the things listed don't use shared libs? i think i understand /bin and /sbin not using them, but i would never have guessed that the text editors wouldn't as well as servers...? if you can take the time to answer this i would be much appreciative :) Alfred > > App type Shared libc? > > X applications* YES > Shells NO > Favorite editors no > WWW servers no > FTP servers no > Sendmail no > Build toolchain yes/no > Random test pgm YES > Other commonly invoked pgms yes > Anything in /bin NO > Anything in /sbin NO > Anything in /usr/bin yes > Anything in /usr/sbin no > Anything in /usr/libexec no > > * X applications above can be extended to any package with an extensive > library suite. > > > -- > John > dyson@freebsd.org > jdyson@nc.com >