Dash as default shell

Zdenek Kabelac zkabelac at redhat.com
Thu Oct 2 09:04:19 UTC 2014


Dne 2.10.2014 v 10:40 Ralf Corsepius napsal(a):
> On 10/02/2014 09:47 AM, Zdenek Kabelac wrote:
>> Dne 2.10.2014 v 08:33 Lennart Poettering napsal(a):
>
>> On the other hand - usage of dash significantly speeds up  compilation of
>> autoconf projects - it's pretty interesting to see the compilation with
>> dash
>> is then maybe even 50% faster in non optimized builds (depends on how
>> many shells are forked during autoconf builds)
>
> I don't know what you tested, but I don't see a substantial speed up on
> running autoconf-generated configure scripts:
>
> # time SHELL=/bin/bash CONFIG_SHELL=/bin/bash /bin/bash ../configure ...
> ...
> real    0m5.775s
> user    0m0.528s
> sys    0m0.217s
>
> # time SHELL=/bin/dash CONFIG_SHELL=/bin/dash /bin/dash ../configure ...
> ...
> real    0m5.495s
> user    0m0.340s
> sys    0m0.194s
>
>
> Another, more extensive test case:
> * bash;
> real    1m43.115s
> user    0m34.708s
> sys    0m16.322s
>
> * dash:
> real    1m33.283s
> user    0m30.834s
> sys    0m13.932s
>
> In other words, I am observing a 5-10% speed up on running autoconf configure
> scripts.

Unsure how does your 'bash' environment setup looks like - but on pretty 
simple lvm configure case - but my rawhide (on C2D 2.1GHz, SSD)

dash:

real	0m2.819s
user	0m0.770s
sys	0m2.098s

bash:

real	0m3.600s
user	0m1.211s
sys	0m2.695s


xf86-video-intel (intel drm driver)

dash:

real	0m8.691s
user	0m4.639s
sys	0m4.153s


bash:

real	0m9.852s
user	0m5.241s
sys	0m4.982s


It used to give significant boost for automake & libtool based software - 
however at some point libtool started to use bashisms and so you cannot just 
replace  /bin/sh -> dash - as build will fail.
(zsh doesn't seem to boost the speed)

Also I said - upto 50% - which depends on complexity of configure files.

But even your personally measured 10% speed is in my eyes pretty significant 
if you do builds all day and surely outweighs some RAM (and IMHO even RAM will 
be actually still positive anyway on dash side if you do parallel builds)

Zdenek





More information about the devel mailing list