Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jun 2003 14:25:43 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        arch@freebsd.org
Subject:   Re: Making a dynamically-linked root
Message-ID:  <200306022125.h52LPhhc002291@apollo.backplane.com>
References:  <20030602171942.GA87863@roark.gnf.org> <xzp4r3844eb.fsf@flood.ping.uio.no> <xzpznl02nry.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help

:
:Gordon Tetlow <gordont@gnf.org> writes:
:> On Mon, Jun 02, 2003 at 10:21:16PM +0200, Dag-Erling Smorgrav wrote:
:> > Was /bin/sh dynamically linked?  It shouldn't be.
:> Why shouldn't it be dynamically linked? I'd like to be able to use
:> ~username expansion via nss_ldap.
:
:Because forking a dynamically linked binary is slower, and /bin/sh
:forks a lot.
:
:DES
:-- 
:Dag-Erling Smorgrav - des@ofug.org

    I think you meant 'EXECing' a dynamically linked binary is slower.
    fork() should not be appreciably slower.  An exec will take a lot 
    of copy-on-write faults vs static, fork() might take one or two
    extra faults due to data being strewn all over the place vs static.

    In anycase, this is a convenience vs performance issue.  I think a number
    of solutions should be investigated before people give up and start 
    hacking dynamic vs static binaries.  For example, a lot of startup delay
    is due to disk waiting (since nothing is in the disk cache at system
    start!).  Running certain daemon startups in the background might yield
    a significant overall improvement in startup times.  

    e.g. instead of running 'sshd' you would run sshd in a subshell, aka
    (sshd &), so the RC script can continue on with the next thing without
    having to wait for sshd to fault-in from disk.  Same goes for sendmail
    and many other daemons.

						-Matt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306022125.h52LPhhc002291>