haskell: tune generic-builder for more parallel build performance#86948
haskell: tune generic-builder for more parallel build performance#86948peti merged 1 commit intoNixOS:haskell-updatesfrom
Conversation
nh2
left a comment
There was a problem hiding this comment.
This looks sensible to me, but one question:
If it is done at the ghcWithPackages level, do/can/will we also have the ability to override it per Haskell package? I am suspecting that there might be certain large packages for which we may need to tune down -j or -A to not consume too much memory on builders that have less than the casual 3 TB RAM.
|
It just occurred to me that the change to the ghcWithPackages wrapper is unnecessary, because you can do the same thing in there has the same effect -- at least if you're building with cabal-install. I'm pretty sure an identical mechanism exists for |
9c4ac9c to
7255d30
Compare
Raise the maximum number of cores used for parallel building from 4 to 16. Increase the size of the allocation area for GHC's garbage collector from 1 MiB to 64 MiB. See https://www.twitch.tv/videos/611899011 for the motivation for this change.
7255d30 to
f6df169
Compare
|
I'll merge this change to |
Those flags were not actually passed to GHC before, but to Setup.hs. They were introduced in NixOS#86948. The related twitch live stream uses the build of git-annex as a measurement. I get the following numbers when building git-annex with doCheck = false: - for current master: 1:40 wall clock / 340s user - without any -A64M argument: 1:40 wall clock / 340s user - with this fix: 1:13 wall clock / 280s user The idea was good, but the settings were never active. More testing revealed that this seems to work on darwin just as well, so we're removing the isLinux condition, too.
Those flags were not actually passed to GHC before, but to Setup.hs. They were introduced in #86948. The related twitch live stream uses the build of git-annex as a measurement. I get the following numbers when building git-annex with doCheck = false: - for current master: 1:40 wall clock / 340s user - without any -A64M argument: 1:40 wall clock / 340s user - with this fix: 1:13 wall clock / 280s user The idea was good, but the settings were never active. More testing revealed that this seems to work on darwin just as well, so we're removing the isLinux condition, too.
Those flags were not actually passed to GHC before, but to Setup.hs. They were introduced in #86948. The related twitch live stream uses the build of git-annex as a measurement. I get the following numbers when building git-annex with doCheck = false: - for current master: 1:40 wall clock / 340s user - without any -A64M argument: 1:40 wall clock / 340s user - with this fix: 1:13 wall clock / 280s user The idea was good, but the settings were never active. More testing revealed that this seems to work on darwin just as well, so we're removing the isLinux condition, too. (cherry picked from commit 3286300)
Those flags were not actually passed to GHC before, but to Setup.hs. They were introduced in #86948. The related twitch live stream uses the build of git-annex as a measurement. I get the following numbers when building git-annex with doCheck = false: - for current master: 1:40 wall clock / 340s user - without any -A64M argument: 1:40 wall clock / 340s user - with this fix: 1:13 wall clock / 280s user The idea was good, but the settings were never active. More testing revealed that this seems to work on darwin just as well, so we're removing the isLinux condition, too. (cherry picked from commit 3286300)

Raise the maximum number of cores used for parallel building from 4 to 16. Increase the size of the allocation area for GHC's garbage collector from 1 MiB to 64 MiB.
See https://www.twitch.tv/videos/611899011 for the motivation for this change.