-
Notifications
You must be signed in to change notification settings - Fork 88
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
Clean experimental CI #1070
Clean experimental CI #1070
Conversation
We can't maintain two CI so let's ditch the experimentation. Conclusion in a nutshell: * most of the time both nix and non-nix CI perform similarly with an advantage to the nix one * once in a while the non-nix CI will take 1h30 to build (upgrading ghc for instance) because it's the time that is needed to build our project from scratch without relying on some nix cache pre-built binaries so this was expected * the non nix version was expected to build faster on an incremental commit in a branch as it would build only a small change when the nix version would rebuild the whole module but it's not clear and it happens that most of the build time for the non nix version is devoted to setting up the github runner * the non-nix version has the advantage of using standard cabal tools and documenting and assessing a non-nix installation procedure which is interesting for non-nix people but it might well be the case that no sane haskell developer would not use nix to build their project. Sevaral alternatives to improve CI performance: * have one single build step in github for build, test and benchmark everything as it would drastically reduce all the need for cache download and software install. It could also benefit to nix CI. * use docker to have one single image ready to build hydra (see this [project](https://github.com/pgrange/hydra_compilation). But then integration between github ci and docker being what it is, the result looks a bit contrived.
Transactions CostsSizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using
Script summary
Cost of Init Transaction
Cost of Commit TransactionThis is using ada-only outputs for better comparability.
Cost of CollectCom Transaction
Cost of Close Transaction
Cost of Contest Transaction
Cost of Abort TransactionSome variation because of random mixture of still initial and already committed outputs.
Cost of FanOut TransactionInvolves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.
|
We can't maintain two CI so let's ditch the experimentation.
Conclusion in a nutshell:
Several alternatives to improve CI performance:
Both CI have run in July and august. Comparing the numbers, we can see two abnormal compilation time for the non-nix CI. This is related to the situation where the CI cache is not ok and everything needs to be built again and it happens that the CI needs more or less 1h30 to build our project from scratch. It’s interesting to note that this happened only twice during the experiment.
Let’s remove these two pics so that we can better compare both CI performance. Then we can see that there is not an order of magnitude of difference between both CI but, still, nix almost always outperforms the non nix CI a bit. Although it might seem obvious it’s actually not as nix version needs to download binaries form nix cache and we observed quite some variability in the past with the nix cache performance.
When we look at some non-nix CI execution we can see that the runner setup can be often very time consuming compared to the compilation itself. See for instance this build job where we can see that 1’33 are spent setting up and tearing down the job and only 12 seconds in cabal build: