Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2012-07-11 | Cleanup | Eelco Dolstra | 1 | -3/+3 | |
2012-07-09 | download-from-binary-cache: add nix.conf options | Eelco Dolstra | 1 | -3/+7 | |
2012-07-08 | Cleanup | Eelco Dolstra | 1 | -13/+13 | |
2012-07-06 | download-from-binary-cache: parallelise fetching of NAR info files | Eelco Dolstra | 1 | -76/+128 | |
Getting substitute information using the binary cache substituter has non-trivial latency overhead. A package or NixOS system configuration can have hundreds of dependencies, and in the worst case (when the local info cache is empty) we have to do a separate HTTP request for each of these. If the ping time to the server is t, getting N info files will take tN seconds; e.g., with a ping time of 0.1s to nixos.org, sequentially downloading 1000 info files (a typical NixOS config) will take at least 100 seconds. To fix this problem, the binary cache substituter can now perform requests in parallel. This required changing the substituter interface to support a function querySubstitutablePathInfos() that queries multiple paths at the same time, and rewriting queryMissing() to take advantage of parallelism. (Due to local caching, parallelising queryMissing() is sufficient for most use cases, since it's almost always called before building a derivation and thus fills the local info cache.) For example, parallelism speeds up querying all 1056 paths in a particular NixOS system configuration from 116s to 2.6s. It works so well because the eccentricity of the top-level derivation in the dependency graph is only 9. So we only need 10 round-trips (when using an unlimited number of parallel connections) to get everything. Currently we do a maximum of 150 parallel connections to the server. Thus it's important that the binary cache server (e.g. nixos.org) has a high connection limit. Alternatively we could use HTTP pipelining, but WWW::Curl doesn't support it and libcurl has a hard-coded limit of 5 requests per pipeline. | |||||
2012-07-06 | download-from-binary-cache: use WWW::Curl | Eelco Dolstra | 1 | -11/+68 | |
Using WWW::Curl rather than running an external curl process for every NAR info file halves the time it takes to get info thanks to libcurl's support for persistent HTTP connections. (We save a roundtrip per file.) But the real gain will come from using parallel and/or pipelined requests. | |||||
2012-07-03 | download-from-binary-cache: do negative NAR info caching | Eelco Dolstra | 1 | -5/+29 | |
I.e. if a NAR info file does *not* exist, we record it in the cache DB so that we don't retry it later. | |||||
2012-07-03 | download-from-binary-cache: in queries, preferred cached info | Eelco Dolstra | 1 | -20/+28 | |
2012-07-03 | download-from-binary-cache: strip trailing / from URLs | Eelco Dolstra | 1 | -1/+1 | |
2012-07-03 | download-from-binary-cache: cache binary cache info in a SQLite DB | Eelco Dolstra | 1 | -8/+117 | |
2012-07-02 | download-from-binary-cache: Verify NAR hashes | Eelco Dolstra | 1 | -6/+15 | |
2012-07-02 | Binary caches: use a better key | Eelco Dolstra | 1 | -5/+10 | |
Use the hash part of the store path as a key rather than a hash of the store path. This is enough to get the desired privacy property. | |||||
2012-07-01 | Add an environment variable $NIX_BINARY_CACHES specifying URLs of binary caches | Eelco Dolstra | 1 | -2/+7 | |
2012-07-01 | Allow both bzip2 and xz compression | Eelco Dolstra | 1 | -5/+14 | |
2012-06-29 | First attempt at the manifest-less substituter | Eelco Dolstra | 1 | -0/+118 | |