Re: 40% slowdown with dynamic /bin/sh

From: Matthew Dillon <dillon_at_apollo.backplane.com>
Date: Wed, 26 Nov 2003 12:29:23 -0800 (PST)
: > 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_at_backplane.com>
Received on Wed Nov 26 2003 - 11:29:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:31 UTC