-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Spack's compiler wrapper compatible with dash #8703
Comments
@adamjstewart: The wrappers were originally in Python, and the difference using I'm not sure (atala):env$ time for x in `seq 1 100`; do python -c 'exit()'; done
real 0m3.461s
user 0m1.222s
sys 0m1.479s
(atala):env$ time for x in `seq 1 100`; do bash -c 'exit'; done
real 0m0.429s
user 0m0.196s
sys 0m0.204s
(atala):env$ time for x in `seq 1 100`; do dash -c 'exit'; done
real 0m0.355s
user 0m0.120s
sys 0m0.146s Python -> bash was at least a 10x startup time improvement (and it's generally more on clusters). bash -> dash is maybe a 20% improvement on top of that, but it's only an improvement to the startup time. I suspect we're already at the point where the compile/build time dominates, and this won't result in "vast improvements". It's also worth noting that if you use (atala):env$ time for x in `seq 1 100`; do /usr/bin/env dash -c exit; done
real 0m0.536s
user 0m0.189s
sys 0m0.227s You're paying for two process launches now ( |
@tgamblin Thanks for the tests! I'll probably still try to get |
@tgamblin I think this is worth revisiting. I see a much larger performance boost from switching to dash: $ time for x in `seq 1 100`; do python -c 'exit()'; done
real 0m11.198s
user 0m3.478s
sys 0m2.193s
$ time for x in `seq 1 100`; do bash -c 'exit'; done
real 0m1.740s
user 0m0.253s
sys 0m0.548s
$ time for x in `seq 1 100`; do dash -c 'exit'; done
real 0m1.055s
user 0m0.085s
sys 0m0.238s |
Currently, Spack's compiler wrapper is hardcoded to use
/bin/bash
. However, if we changed this to/bin/sh
and made things POSIX compliant, systems like Ubuntu that default todash
could seevastslight improvements to build times for large, complex packages. If we changed it to/usr/bin/env sh
, Spack users could installdash
on other systems and add it to theirPATH
, although I don't know how muchenv
will slow down runtimes.If no one else gets to this, I'll probably experiment with it eventually. I just wanted to make a dedicated issue before I forget.
Related to #4048. Probably depends on #7604. See https://unix.stackexchange.com/questions/148035 for performance comparisons between common shells.
The text was updated successfully, but these errors were encountered: