Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

scripts/h0: use -j2 at GHC_OPTS #1437

Closed
root mannequin opened this issue Jun 29, 2018 · 0 comments
Closed

scripts/h0: use -j2 at GHC_OPTS #1437

root mannequin opened this issue Jun 29, 2018 · 0 comments

Comments

@root
Copy link
Mannequin

root mannequin commented Jun 29, 2018

Created by: andriytk

According to the test resuts on 12 CPU Cores devvm
it is the most optimal building parameter.

Test script:

$ cat test-stack-build-perf.sh
set -xe

cd ~/halon
git clean -dfx
GHC_OPTS=-g /usr/bin/time scripts/h0 make
git clean -dfx
GHC_OPTS=-g /usr/bin/time scripts/h0 make -j4
git clean -dfx
GHC_OPTS=-g /usr/bin/time scripts/h0 make -j8
git clean -dfx
GHC_OPTS='-g -j2' /usr/bin/time scripts/h0 make
git clean -dfx
GHC_OPTS='-g -j4' /usr/bin/time scripts/h0 make
git clean -dfx
GHC_OPTS='-g -j8' /usr/bin/time scripts/h0 make
git clean -dfx
GHC_OPTS='-g -j' /usr/bin/time scripts/h0 make

Test results:

$ cat test-stack-build-perf.res.txt | egrep -A1 'GHC|CPU'

  • GHC_OPTS=-g
  • /usr/bin/time scripts/h0 make
    --
    997.55user 105.22system 14:47.39elapsed 124%CPU (0avgtext+0avgdata 2953972maxresident)k
    413016inputs+8194672outputs (69major+17575775minor)pagefaults 0swaps
    --
  • GHC_OPTS=-g
  • /usr/bin/time scripts/h0 make -j4
    --
    1013.68user 77.95system 14:36.90elapsed 124%CPU (0avgtext+0avgdata 2973704maxresident)k
    0inputs+8194736outputs (0major+17739726minor)pagefaults 0swaps
    --
  • GHC_OPTS=-g
  • /usr/bin/time scripts/h0 make -j8
    --
    1019.39user 69.69system 14:35.63elapsed 124%CPU (0avgtext+0avgdata 3041760maxresident)k
    0inputs+8194784outputs (0major+17491205minor)pagefaults 0swaps
    --
  • GHC_OPTS='-g -j2'
  • /usr/bin/time scripts/h0 make
    --
    1123.75user 199.35system 11:49.11elapsed 186%CPU (0avgtext+0avgdata 3283796maxresident)k
    0inputs+8197112outputs (0major+18539123minor)pagefaults 0swaps
    --
  • GHC_OPTS='-g -j4'
  • /usr/bin/time scripts/h0 make
    --
    1505.71user 534.26system 11:49.39elapsed 287%CPU (0avgtext+0avgdata 3443920maxresident)k
    0inputs+8197424outputs (0major+18539768minor)pagefaults 0swaps
    --
  • GHC_OPTS='-g -j8'
  • /usr/bin/time scripts/h0 make
    --
    4601.90user 1610.50system 16:55.32elapsed 611%CPU (0avgtext+0avgdata 3409816maxresident)k
    0inputs+8197592outputs (0major+18611415minor)pagefaults 0swaps
    --
  • GHC_OPTS='-g -j'
  • /usr/bin/time scripts/h0 make
    --
    14217.42user 5387.23system 33:58.51elapsed 961%CPU (0avgtext+0avgdata 3459492maxresident)k
    0inputs+8197760outputs (0major+18699674minor)pagefaults 0swaps

See also commercialhaskell/stack#644.

@root
Copy link
Mannequin Author

root mannequin commented Jun 29, 2018

Created by: vvv

Landed as ca911e7.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants