diff options
author | Valentin Gagarin <valentin.gagarin@tweag.io> | 2023-05-14 11:59:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 11:59:40 +0200 |
commit | 454e27345125736a2c44282e4b31a8f325b754e7 (patch) | |
tree | f731f094cb17886558ccdb8711baabc6730a809f | |
parent | 29db89fe7ca2eae6111bb285a92e75edae4bb9d9 (diff) | |
parent | c66a7af0c67e11579acf2554145f693d3a861450 (diff) |
Merge pull request #8328 from urbas/max-substitution-jobs
-rw-r--r-- | doc/manual/src/release-notes/rl-next.md | 4 | ||||
-rw-r--r-- | src/libstore/build/substitution-goal.cc | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/doc/manual/src/release-notes/rl-next.md b/doc/manual/src/release-notes/rl-next.md index 78ae99f4b..bc0d41bdf 100644 --- a/doc/manual/src/release-notes/rl-next.md +++ b/doc/manual/src/release-notes/rl-next.md @@ -1,2 +1,6 @@ # Release X.Y (202?-??-??) +- Speed-up of downloads from binary caches. + The number of parallel downloads (also known as substitutions) has been separated from the [`--max-jobs` setting](../command-ref/conf-file.md#conf-max-jobs). + The new setting is called [`max-substitution-jobs`](../command-ref/conf-file.md#conf-max-substitution-jobs). + The number of parallel downloads is now set to 16 by default (previously, the default was 1 due to the coupling to build jobs). diff --git a/src/libstore/build/substitution-goal.cc b/src/libstore/build/substitution-goal.cc index 30c196894..93867007d 100644 --- a/src/libstore/build/substitution-goal.cc +++ b/src/libstore/build/substitution-goal.cc @@ -200,10 +200,9 @@ void PathSubstitutionGoal::tryToRun() { trace("trying to run"); - /* Make sure that we are allowed to start a build. Note that even - if maxBuildJobs == 0 (no local builds allowed), we still allow - a substituter to run. This is because substitutions cannot be - distributed to another machine via the build hook. */ + /* Make sure that we are allowed to start a substitution. Note that even + if maxSubstitutionJobs == 0, we still allow a substituter to run. This + prevents infinite waiting. */ if (worker.getNrSubstitutions() >= std::max(1U, (unsigned int) settings.maxSubstitutionJobs)) { worker.waitForBuildSlot(shared_from_this()); return; |