From bd1ce810149a5449d3c88c52f607e8e58fa11d11 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Fri, 21 Feb 2020 23:41:33 +0100 Subject: nix: Count build and download jobs separately. This allows to run downloads (that take bandwith) and builds (that take CPU time) independently from one another. * nix/nix-daemon/guix-daemon.cc: Add a max-download-jobs option. * nix/libstore/globals.hh: Add a maxDownloadJobs setting. * nix/libstore/globals.cc: Add a default value to it. * nix/libstore/build.cc: Manage build and download jobs separately. --- nix/libstore/globals.hh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nix/libstore/globals.hh') diff --git a/nix/libstore/globals.hh b/nix/libstore/globals.hh index 27616a2283..c033f8ed56 100644 --- a/nix/libstore/globals.hh +++ b/nix/libstore/globals.hh @@ -90,6 +90,9 @@ struct Settings { /* Maximum number of parallel build jobs. 0 means unlimited. */ unsigned int maxBuildJobs; + /* Maximum number of parallel download jobs. 0 means 1. */ + unsigned int maxDownloadJobs; + /* Number of CPU cores to utilize in parallel within a build, i.e. by passing this number to Make via '-j'. 0 means that the number of actual CPU cores on the local host ought to be -- cgit v1.2.3