-
Notifications
You must be signed in to change notification settings - Fork 41
Conversation
default.nix
Outdated
@@ -11,6 +11,13 @@ let | |||
}); | |||
socket-io-src = pkgs.fetchgit (removeAttrs (lib.importJSON ./pkgs/engine-io.json) ["date"]); | |||
cardano-sl-src = pkgs.fetchgit (removeAttrs (lib.importJSON ./pkgs/cardano-sl.json) ["date"]); | |||
cores = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best to have threads and cores should be part of the function inputs for default.nix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed!
default.nix
Outdated
buildTarget = subset; | ||
}); | ||
buildSpeedupFlagsMarlowScaling = drv : appendConfigureFlag drv | ||
"--ghc-option=-rtsopts --ghc-option=+RTS --ghc-option=-N${toString threads} --ghc-option=-A128m --ghc-option=-n2m --ghc-option=-qb0 --ghc-option=-qn${toString cores} --ghc-option=-RTS"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-N is already set from cabal in cardano-sl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The problem here is.. we need to set both
-N
and-qn
, in the2:1
ratio, as per Simon Marlow's suggestion (see https://ghc.haskell.org/trac/ghc/ticket/9221#comment:72). - Once we accept №1, a need comes to have an authoritative Nix-evaluation-time source of information on the amount of cores on the system.
- I couldn't find such a source, hence the hard-coding.
- Since we hard-code
-qn
, I guess it's kinda debatable if leaving-N
free is a good thing. It would certainly somewhat obscure the Marlow ratio between cores and threads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, @domenkozar, I can't find where cabal
sets -N
-- at least it doesn't in https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/generic-builder.nix
Cabal does set -j
, but that's ghc --make
-level parallelism.
For I'd like to see time differences here before/after this PR and with current VM and 16 core VM. |
@domenkozar, regarding the testing setup:
|
@domenkozar, regarding the second question from the PR TODO: How do we subset the 13 executables -- are we clear on what is needed for deployments? Should I judge this myself? Perhaps incremental correctness, with an optimistic baseline, can work here : -) |
So far we need |
|
@domenkozar, thanks, I'll try to do this today |
@deepfire-pusher I see now that you have updated the issue. Those statistics are good enough. Let's build only |
Note that nix already pases |
If it's already parallel.. well, I that's scary, it means that |
It's slower because there are multiple packages compiling together. Up to 4. |
Ah, I see -- that was the problem I was trying to attack initially, with my Hydra instrumentation -- the direct comparability of measurements. But I agree, just running the tests manually everywhere is faster, and the result is useful for judgement of effect of changes. |
194b5f6
to
2f2e970
Compare
@domenkozar, what is our next step here? |
This will be handled as part of DEVOPS-121. |
1cecf26
to
09a7bbb
Compare
09a7bbb
to
041f668
Compare
I'm going to close this, as expressions moved to cardano-sl repo and we can revisit the PR once DEVOPS-121 is picked up. |
Besides partially addressing https://issues.serokell.io/issue/DEVOPS-36#comment=96-3716, this also sets up
NIX_PATH
, so that a number of tools needn't have-I
specified -- and so this pulls towards unification ofnixpkgs
specification (don't remember the issue).cc @domenkozar, @jmitchell
TODO: