Re: Question on low execl() performance (2.0.x kernels)

Joe Fouche (jf@ugcs.caltech.edu)
Thu, 3 Apr 1997 16:15:56 -0800


--opJtzjQTFsWo+cga
Content-Type: text/plain; charset=us-ascii

Stephen Costaras said:
> CFLAGS=-DTIME -m486 -funroll-loops -finline -fstrength-reduce -ffast-math
> -fomit-frame-pointer -O3
>
> Now, I have seen results (posted on www.linuxnow.com and several other places
> for other systems even P5 systems) that are running approx 2000-3000 lps for
> Execl throughput and a little higher process creation tests. System in this
> case is not under load (0.0).
>
> I have upgraded all core libraries/code (ld.so 1.9.1, binutils.2.7.0.9,
> gcc-2.7.2.1, libg++-2.7.2.1, libc-5.4.23, kernel (2.0.29), et al. No
> difference before or after nor across any of my other systems.
>
> Does anyone have any idea WHY this is happening, or WHAT could cause this? I
> have 'patched' my original problem with apache by playing with the lifespan of
> the spawned tasks but this is still an issue why I'm only getting 1/10th the
> throughput here.

The benchmark test performs so many execl() calls to the same program in a short
time that it is significantly better to _statically link_ the test program. That
is, what you're seeing with the benchmark is not a sluggish execl() system call
but rather the overhead due to loading dynamically linked libraries.

For real-world programs which do something besides calling execl(), it's good
practice to link them dynamically, but for this part of the benchmark (and
probably others) I wouldn't recommend it. In any case, try it again with the
-static flag and see what happens.

-- 
    _ ____  Joe Fouche (jf@ugcs.caltech.edu)  
 ___| |---       Deranged College Student    

--opJtzjQTFsWo+cga Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE----- Version: 2.6.3i

iQB5AwUBM0RIPHJgYOdk+W8JAQHQPgMghYZ3sgSz1+dT7lAucKShvoHfx0lxF7RD qjKofsiuRng0XDJShNVdfNyCykcEyHHS8Z3y/POKPsNpSUbq/w28O6B7o2rUYbTG KtO3zS+KqWMZ/GNU1xJDFWiiCC8L0SeYLtuQ4g== =Y9Fb -----END PGP SIGNATURE-----

--opJtzjQTFsWo+cga--