Skip to content
Snippets Groups Projects
  1. Sep 21, 2016
  2. Sep 20, 2016
  3. Sep 16, 2016
    • Eric Litak's avatar
      0d38b4c7
    • Eelco Dolstra's avatar
      Make computeFSClosure() single-threaded again · 75989bdc
      Eelco Dolstra authored
      The fact that queryPathInfo() is synchronous meant that we needed a
      thread for every concurrent binary cache lookup, even though they end
      up being handled by the same download thread. Requiring hundreds of
      threads is not a good idea. So now there is an asynchronous version of
      queryPathInfo() that takes a callback function to process the
      result. Similarly, enqueueDownload() now takes a callback rather than
      returning a future.
      
      Thus, a command like
      
        nix path-info --store https://cache.nixos.org/ -r /nix/store/slljrzwmpygy1daay14kjszsr9xix063-nixos-16.09beta231.dccf8c5
      
      that returns 4941 paths now takes 1.87s using only 2 threads (the main
      thread and the downloader thread). (This is with a prewarmed
      CloudFront.)
      75989bdc
    • Eelco Dolstra's avatar
      printMsg(): Don't check for interrupts · 054be502
      Eelco Dolstra authored
      Having the logger function potentially throw exceptions is
      Heisenbuggy.
      054be502
  4. Sep 14, 2016
    • Eelco Dolstra's avatar
      nix path-info: Add some more examples · 2e149303
      Eelco Dolstra authored
      2e149303
    • Eelco Dolstra's avatar
      Revive binary-caches-parallel-connections · 6656ef7b
      Eelco Dolstra authored
      It's a slight misnomer now because it actually limits *all* downloads,
      not just binary cache lookups.
      
      Also add a "enable-http2" option to allow disabling use of HTTP/2
      (enabled by default).
      6656ef7b
    • Eelco Dolstra's avatar
      Enable HTTP/2 support · 90ad02bf
      Eelco Dolstra authored
      The binary cache store can now use HTTP/2 to do lookups. This is much
      more efficient than HTTP/1.1 due to multiplexing: we can issue many
      requests in parallel over a single TCP connection. Thus it's no longer
      necessary to use a bunch of concurrent TCP connections (25 by
      default).
      
      For example, downloading 802 .narinfo files from
      https://cache.nixos.org/, using a single TCP connection, takes 11.8s
      with HTTP/1.1, but only 0.61s with HTTP/2.
      
      This did require a fairly substantial rewrite of the Downloader class
      to use the curl multi interface, because otherwise curl wouldn't be
      able to do multiplexing for us. As a bonus, we get connection reuse
      even with HTTP/1.1. All downloads are now handled by a single worker
      thread. Clients call Downloader::enqueueDownload() to tell the worker
      thread to start the download, getting a std::future to the result.
      90ad02bf
    • Eelco Dolstra's avatar
      Add a toLower utility function · a75d11a7
      Eelco Dolstra authored
      a75d11a7
    • Eelco Dolstra's avatar
      e07c0dcf
  5. Sep 12, 2016
  6. Sep 08, 2016
  7. Sep 07, 2016
  8. Aug 31, 2016
  9. Aug 30, 2016
Loading