Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Nov 2003 12:29:23 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        freebsd-current@freebsd.org
Subject:   Re: 40% slowdown with dynamic /bin/sh
Message-ID:  <200311262029.hAQKTNth090550@apollo.backplane.com>
References:  <16322.46449.554372.358751@grasshopper.cs.duke.edu> <20031124.190904.127666948.imp@bsdimp.com> <16322.47726.903593.393976@grasshopper.cs.duke.edu> <20031124.191931.67791612.imp@bsdimp.com> <16322.50980.825349.898362@grasshopper.cs.duke.edu> <16323.31748.84583.971494@grasshopper.cs.duke.edu>

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

: > That seems to have the most impact.  We can also expend our efforts
: > to improve dynamic linking performance, since that will improve the
: > performance of the other 99.9% of the universe.
: > 
:
:What happened to mdodd's prebinding efforts?
:
:Drew

    Prebinding was put into DFly but the improvement is barely noticeable
    when you prebind /bin/sh.  Prebinding is only really useful for much
    larger programs like mozilla which have thousands or tens of thousands
    of bindings.  These numbers are on DragonFly and will be different on
    FBsd, but the relative numbers should be similar with a FBsd prebinding
    implementation.

               /bin/sh           
                --------------  
    static      freepg -16 zfod 12
    dynamic	freepg -46 zfod 34
    dyn/prebind freepg -46 zfod 26	<<< saves 8*4=32KB worth of
					    pre-zero'd pages but does
					    not save any anon memory.

    1000 runs of /bin/sh -c exit 0 (program to vfork/exec /bin/sh -c exit 0
    1000 times).  This effectively measures startup overhead only and is
    not inclusive of what a script might do in addition to starting up.

			/bin/sh
	static	 	11023 zfod's	00.54s
	dynamic		33023 zfod's	02.88s
	dyn/prebind	25023 zfod's	02.36s

    There isn't much of a time improvement but there is a significant
    improvement in the number of ZFOD's with prebinding.  


leaf:/usr/obj/usr/src/bin/sh# prebind /usr/obj/usr/src/bin/sh/sh
  object /usr/obj/usr/src/bin/sh/sh     uniqid 986137809
  object /usr/lib/libedit.so.3          uniqid -1757875926
  object /usr/lib/libncurses.so.5       uniqid 1023436343
  object /usr/lib/libc.so.4             uniqid 2011683737
Non-PLT Prebindings:
  object /usr/lib/libedit.so.3          count 5
  object /usr/lib/libncurses.so.5       count 63
  object /usr/lib/libc.so.4             count 203
PLT Prebindings:
  object /usr/obj/usr/src/bin/sh/sh     count 106
  object /usr/lib/libedit.so.3          count 63
  object /usr/lib/libncurses.so.5       count 270
  object /usr/lib/libc.so.4             count 638
Non-PLT COPY Prebindings:
  object /usr/obj/usr/src/bin/sh/sh     count 13

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



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