diff --git a/ci/eval/README.md b/ci/eval/README.md index ec7429b7bc78..263f95f87ea7 100644 --- a/ci/eval/README.md +++ b/ci/eval/README.md @@ -2,25 +2,28 @@ The code in this directory is used by the [eval.yml](../../.github/workflows/eval.yml) GitHub Actions workflow to evaluate the majority of Nixpkgs for all PRs, effectively making sure that when the development branches are processed by Hydra, no evaluation failures are encountered. -Furthermore it also allows local evaluation using +Furthermore it also allows local evaluation using: + ``` -nix-build ci -A eval.full \ - --max-jobs 4 \ - --cores 2 \ - --arg chunkSize 10000 \ - --arg evalSystems '["x86_64-linux" "aarch64-darwin"]' +nix-build ci -A eval.full ``` +The most important two arguments are: +- `--arg evalSystems`: The set of systems for which `nixpkgs` should be evaluated. + Defaults to the four official platforms (`x86_64-linux`, `aarch64-linux`, `x86_64-darwin` and `aarch64-darwin`). + Example: `--arg evalSystems '["x86_64-linux" "aarch64-darwin"]'` +- `--arg quickTest`: Enables testing a single chunk of the current system only for quick iteration. + Example: `--arg quickTest true` + +The following arguments can be used to fine-tune performance: - `--max-jobs`: The maximum number of derivations to run at the same time. Only each [supported system](../supportedSystems.json) gets a separate derivation, so it doesn't make sense to set this higher than that number. - `--cores`: The number of cores to use for each job. Recommended to set this to the amount of cores on your system divided by `--max-jobs`. -- `chunkSize`: The number of attributes that are evaluated simultaneously on a single core. +- `--arg chunkSize`: The number of attributes that are evaluated simultaneously on a single core. Lowering this decreases memory usage at the cost of increased evaluation time. If this is too high, there won't be enough chunks to process them in parallel, and will also increase evaluation time. -- `evalSystems`: The set of systems for which `nixpkgs` should be evaluated. - Defaults to the four official platforms (`x86_64-linux`, `aarch64-linux`, `x86_64-darwin` and `aarch64-darwin`). - -A good default is to set `chunkSize` to 10000, which leads to about 3.6GB max memory usage per core, so suitable for fully utilising machines with 4 cores and 16GB memory, 8 cores and 32GB memory or 16 cores and 64GB memory. + The default is 5000. + Example: `--arg chunkSize 10000` Note that 16GB memory is the recommended minimum, while with less than 8GB memory evaluation time suffers greatly. diff --git a/ci/eval/default.nix b/ci/eval/default.nix index 8d79034db59e..0b00f121b684 100644 --- a/ci/eval/default.nix +++ b/ci/eval/default.nix @@ -245,7 +245,7 @@ let # Whether to evaluate on a specific set of systems, by default all are evaluated evalSystems ? if quickTest then [ "x86_64-linux" ] else supportedSystems, # The number of attributes per chunk, see ./README.md for more info. - chunkSize, + chunkSize ? 5000, quickTest ? false, }: let