aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-07-18download-from-binary-cache: Print correct URLEelco Dolstra
2012-07-18Merge branch 'master' into no-manifestsEelco Dolstra
2012-07-17Add function queryPathFromHashPart()Eelco Dolstra
To implement binary caches efficiently, Hydra needs to be able to map the hash part of a store path (e.g. "gbg...zr7") to the full store path (e.g. "/nix/store/gbg...kzr7-subversion-1.7.5"). (The binary cache mechanism uses hash parts as a key for looking up store paths to ensure privacy.) However, doing a search in the Nix store for /nix/store/<hash>* is expensive since it requires reading the entire directory. queryPathFromHashPart() prevents this by doing a cheap database lookup.
2012-07-17queryPathInfo(): return hash in base-32 if desiredEelco Dolstra
Cherry-picked from the no-manifests branch.
2012-07-17Print some debug outputEelco Dolstra
2012-07-17Return an exit code of 100 for cached failed buildsEelco Dolstra
Exit code 100 should be returned for all permanent failures. This includes cached failures. Fixes #34.
2012-07-17Remove dead codeEelco Dolstra
2012-07-17Manual: Don't claim we support CygwinEelco Dolstra
2012-07-17Update Nix 1.1 release notesEelco Dolstra
2012-07-17Allow disabling log compressionEelco Dolstra
2012-07-12builtins.storePath: resolve symlinksEelco Dolstra
Needed for Charon/Hydra interaction.
2012-07-11Merge branch 'master' of github.com:NixOS/nix into no-manifestsEelco Dolstra
2012-07-11Update release notesEelco Dolstra
2012-07-11Update the other substitutersEelco Dolstra
2012-07-11Add some missing --version switchesEelco Dolstra
2012-07-11Set the User-Agent header to "Nix/<version>"Eelco Dolstra
2012-07-11download-from-binary-cache: Use HEAD requests if possibleEelco Dolstra
In "nix-env -qas", we don't need the substitute info, we just need to know if it exists. This can be done using a HTTP HEAD request, which saves bandwidth. Note however that curl currently has a bug that prevents it from reusing HTTP connections if HEAD requests return a 404: https://sourceforge.net/tracker/?func=detail&aid=3542731&group_id=976&atid=100976 Without the patch attached to the issue, using HEAD is actually quite a bit slower than GET.
2012-07-11Replace hasSubstitutes() with querySubstitutablePaths()Eelco Dolstra
querySubstitutablePaths() takes a set of paths, so this greatly reduces daemon <-> client latency.
2012-07-11Add a function queryValidPaths()Eelco Dolstra
queryValidPaths() combines multiple calls to isValidPath() in one. This matters when using the Nix daemon because it reduces latency. For instance, on "nix-env -qas \*" it reduces execution time from 5.7s to 4.7s (which is indistinguishable from the non-daemon case).
2012-07-11Rename queryValidPaths() to queryAllValidPaths()Eelco Dolstra
2012-07-11Implement querySubstitutablePathInfos() in the daemonEelco Dolstra
Also removed querySubstitutablePathInfo().
2012-07-11nix-env: Determine which paths have substitutes in parallelEelco Dolstra
2012-07-11CleanupEelco Dolstra
2012-07-09Pass --insecure to curl so that https worksEelco Dolstra
2012-07-09Inline fetchurl.shEelco Dolstra
2012-07-09Add a test for the fetchurl functionEelco Dolstra
2012-07-09Remove obsolete commentShea Levy
2012-07-09corepkgs/fetchurl: Build locally and outside of the chrootShea Levy
2012-07-09corepkgs/fetchurl: the 'system' argument can be optionalShea Levy
2012-07-09corepkgs: distribute fetchurl filesShea Levy
2012-07-09corepkgs/fetchurl: Call the shell directly instead of using the shebangShea Levy
2012-07-09corepkgs/fetchurl.sh: Use config.nix's curlShea Levy
2012-07-09The fetchurl builder is now fetchurl.shShea Levy
2012-07-09Remove old fetchurl makefileShea Levy
2012-07-09Move fetchurl files out of their subdirectoryShea Levy
2012-07-09corepkgs/config.nix.in: We'll need curlShea Levy
2012-07-09Resurrect old corepkgs fetchurlShea Levy
2012-07-09Really fix RPM buildsEelco Dolstra
2012-07-09Add WWW::Curl as a dependencyEelco Dolstra
2012-07-09Fix RPM buildsEelco Dolstra
http://hydra.nixos.org/build/2784908
2012-07-09Get rid of nix.conf.exampleEelco Dolstra
No need to duplicate the nix.conf manpage.
2012-07-09Install a nix.conf manpageEelco Dolstra
2012-07-09download-from-binary-cache: add nix.conf optionsEelco Dolstra
2012-07-09prim_import(): prefetch substitute info in parallel using queryMissing()Eelco Dolstra
2012-07-08build.cc: Don't use hasSubstitute()Eelco Dolstra
Instead make a single call to querySubstitutablePathInfo() per derivation output. This is faster and prevents having to implement the "have" function in the binary cache substituter.
2012-07-08CleanupEelco Dolstra
2012-07-06download-from-binary-cache: parallelise fetching of NAR info filesEelco Dolstra
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-06download-from-binary-cache: use WWW::CurlEelco Dolstra
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-03download-from-binary-cache: do negative NAR info cachingEelco Dolstra
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-03download-from-binary-cache: in queries, preferred cached infoEelco Dolstra