nix: improve substituter speed

This commit is contained in:
Sandro - 2023-02-23 00:12:15 +01:00
parent 745474a624
commit 61685d4a6e
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 27 additions and 0 deletions

View File

@ -69,6 +69,19 @@ with final; {
mlat-client = python3Packages.callPackage ./mlat-client.nix { };
nixVersions = prev.nixVersions // {
stable = prev.nixVersions.stable.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
./nix-increase-substituter-threadpool.diff
# request compression
(fetchpatch {
url = "https://github.com/NixOS/nix/pull/7712.patch";
sha256 = "sha256-84C27RxOYi/pamvWLJ/NWsc9zf6VhUAA57llIn8DAT4=";
})
];
});
};
openssh = prev.openssh.overrideAttrs (_: {
# takes 30 minutes
doCheck = false;

View File

@ -0,0 +1,14 @@
diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc
index fb985c97b..a509d6f4d 100644
--- a/src/libstore/misc.cc
+++ b/src/libstore/misc.cc
@@ -102,7 +102,8 @@ void Store::queryMissing(const std::vector<DerivedPath> & targets,
downloadSize_ = narSize_ = 0;
// FIXME: make async.
- ThreadPool pool(fileTransferSettings.httpConnections);
+ // https://github.com/NixOS/nix/issues/5118
+ ThreadPool pool(300);
struct State
{