Skip to content
Snippets Groups Projects
  1. Aug 19, 2013
  2. Aug 07, 2013
    • Eelco Dolstra's avatar
      Run the daemon worker on the same CPU as the client · a583a2bc
      Eelco Dolstra authored
      On a system with multiple CPUs, running Nix operations through the
      daemon is significantly slower than "direct" mode:
      
      $ NIX_REMOTE= nix-instantiate '<nixos>' -A system
      real    0m0.974s
      user    0m0.875s
      sys     0m0.088s
      
      $ NIX_REMOTE=daemon nix-instantiate '<nixos>' -A system
      real    0m2.118s
      user    0m1.463s
      sys     0m0.218s
      
      The main reason seems to be that the client and the worker get moved
      to a different CPU after every call to the worker.  This patch adds a
      hack to lock them to the same CPU.  With this, the overhead of going
      through the daemon is very small:
      
      $ NIX_REMOTE=daemon nix-instantiate '<nixos>' -A system
      real    0m1.074s
      user    0m0.809s
      sys     0m0.098s
      a583a2bc
  3. Aug 06, 2013
  4. Jul 12, 2013
  5. Mar 25, 2013
  6. Jan 02, 2013
  7. Nov 15, 2012
    • Eelco Dolstra's avatar
      Disable use of vfork() · f794465c
      Eelco Dolstra authored
      vfork() is just too weird.  For instance, in this build:
      
        http://hydra.nixos.org/build/3330487
      
      the value fromHook.writeSide becomes corrupted in the parent, even
      though the child only reads from it.  At -O0 the problem goes away.
      Probably the child is overriding some spilled temporary variable.
      
      If I get bored I may implement using posix_spawn() instead.
      f794465c
  8. Nov 09, 2012
  9. Oct 10, 2012
  10. Oct 03, 2012
  11. Sep 14, 2012
  12. Aug 27, 2012
  13. Aug 01, 2012
  14. Jul 23, 2012
  15. Jul 09, 2012
  16. Jun 29, 2012
    • Eelco Dolstra's avatar
      Use XZ compression in binary caches · 4911a10a
      Eelco Dolstra authored
      XZ compresses significantly better than bzip2.  Here are the
      compression ratios and execution times (using 4 cores in parallel) on
      my /var/run/current-system (3.1 GiB):
      
        bzip2: total compressed size 849.56 MiB, 30.8% [2m08]
        xz -6: total compressed size 641.84 MiB, 23.4% [6m53]
        xz -7: total compressed size 621.82 MiB, 22.6% [7m19]
        xz -8: total compressed size 599.33 MiB, 21.8% [7m18]
        xz -9: total compressed size 588.18 MiB, 21.4% [7m40]
      
      Note that compression takes much longer.  More importantly, however,
      decompression is much faster:
      
        bzip2: 1m47.274s
        xz -6: 0m55.446s
        xz -7: 0m54.119s
        xz -8: 0m52.388s
        xz -9: 0m51.842s
      
      The only downside to using -9 is that decompression takes a fair
      amount (~65 MB) of memory.
      4911a10a
  17. May 10, 2012
  18. May 04, 2012
  19. Apr 13, 2012
  20. Mar 19, 2012
  21. Mar 18, 2012
    • Eelco Dolstra's avatar
      Drop the externals directory · b006a31d
      Eelco Dolstra authored
      Nix now requires SQLite and bzip2 to be pre-installed.  SQLite is
      detected using pkg-config.  We required DBD::SQLite anyway, so
      depending on SQLite is not a big problem.
      
      The --with-bzip2, --with-openssl and --with-sqlite flags are gone.
      b006a31d
  22. Feb 15, 2012
    • Eelco Dolstra's avatar
      On Linux, make the Nix store really read-only by using the immutable bit · bd013b6f
      Eelco Dolstra authored
      I was bitten one time too many by Python modifying the Nix store by
      creating *.pyc files when run as root.  On Linux, we can prevent this
      by setting the immutable bit on files and directories (as in ‘chattr
      +i’).  This isn't supported by all filesystems, so it's not an error
      if setting the bit fails.  The immutable bit is cleared by the garbage
      collector before deleting a path.  The only tricky aspect is in
      optimiseStore(), since it's forbidden to create hard links to an
      immutable file.  Thus optimiseStore() temporarily clears the immutable
      bit before creating the link.
      bd013b6f
  23. Jan 11, 2012
  24. Jan 05, 2012
  25. Jan 04, 2012
  26. Jan 03, 2012
  27. Nov 21, 2011
  28. Nov 20, 2011
  29. Nov 18, 2011
  30. Nov 16, 2011
  31. Nov 07, 2011
  32. Oct 10, 2011
  33. Jul 13, 2011
  34. Jul 04, 2011
Loading