Re: Making a dynamically-linked root

From: Matthew Dillon (
Date: 06/02/03

  • Next message: Gordon Tetlow: "Re: Making a dynamically-linked root"
    Date: Mon, 2 Jun 2003 14:25:43 -0700 (PDT)
    To: Dag-Erling Smorgrav <>

    :Gordon Tetlow <> 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.
    :Dag-Erling Smorgrav -

        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.


    _______________________________________________ mailing list
    To unsubscribe, send any mail to ""

  • Next message: Gordon Tetlow: "Re: Making a dynamically-linked root"