Home Explore Blog CI



nix

4th chunk of `doc/manual/source/release-notes/rl-0.10.md`
7cada02e2d4d2070faf4f43ec2fbdfe0ea82e545cda22a4c0000000100000c18
        specified in the configuration file in the `build-max-jobs`
        setting.

  - Garbage collector improvements:
    
      - Open files (such as running programs) are now used as roots of
        the garbage collector. This prevents programs that have been
        uninstalled from being garbage collected while they are still
        running. The script that detects these additional runtime roots
        (`find-runtime-roots.pl`) is inherently system-specific, but it
        should work on Linux and on all platforms that have the `lsof`
        utility.
    
      - `nix-store --gc` (a.k.a. `nix-collect-garbage`) prints out the
        number of bytes freed on standard output. `nix-store
                                                        --gc --print-dead` shows how many bytes would be freed by an
        actual garbage collection.
    
      - `nix-collect-garbage -d` removes all old generations of *all*
        profiles before calling the actual garbage collector (`nix-store
                                                        --gc`). This is an easy way to get rid of all old packages in
        the Nix store.
    
      - `nix-store` now has an operation `--delete` to delete specific
        paths from the Nix store. It won’t delete reachable
        (non-garbage) paths unless `--ignore-liveness` is specified.

  - Berkeley DB 4.4’s process registry feature is used to recover from
    crashed Nix processes.

  - A performance issue has been fixed with the `referer` table, which
    stores the inverse of the `references` table (i.e., it tells you
    what store paths refer to a given path). Maintaining this table
    could take a quadratic amount of time, as well as a quadratic amount
    of Berkeley DB log file space (in particular when running the
    garbage collector) (`NIX-23`).

  - Nix now catches the `TERM` and `HUP` signals in addition to the
    `INT` signal. So you can now do a `killall
            nix-store` without triggering a database recovery.

  - `bsdiff` updated to version 4.3.

  - Substantial performance improvements in expression evaluation and
    `nix-env -qa`, all thanks to [Valgrind](http://valgrind.org/).
    Memory use has been reduced by a factor 8 or so. Big speedup by
    memoisation of path hashing.

  - Lots of bug fixes, notably:
    
      - Make sure that the garbage collector can run successfully when
        the disk is full (`NIX-18`).
    
      - `nix-env` now locks the profile to prevent races between
        concurrent `nix-env` operations on the same profile (`NIX-7`).
    
      - Removed misleading messages from `nix-env -i` (e.g.,
        ``installing
                                                        `foo'`` followed by ``uninstalling
                                                        `foo'``) (`NIX-17`).

  - Nix source distributions are a lot smaller now since we no longer
    include a full copy of the Berkeley DB source distribution (but only
    the bits we need).

  - Header files are now installed so that external programs can use the
    Nix libraries.

Title: Nix Release 0.10: Garbage Collection, Performance Enhancements, and Bug Fixes
Summary
This section of the Nix Release 0.10 notes focuses on garbage collection improvements, performance enhancements, and bug fixes. It covers the use of open files as garbage collection roots, providing more detailed output for garbage collection operations, and adding the ability to delete specific paths from the Nix store. The release incorporates Berkeley DB's process registry for crash recovery and fixes a performance issue with the `referer` table. Nix now catches `TERM` and `HUP` signals and updates `bsdiff` to version 4.3. Significant performance improvements in expression evaluation and `nix-env -qa` were achieved using Valgrind. The release also addresses various bugs, including issues with garbage collection on full disks and race conditions in `nix-env` operations. Finally, it mentions reduced source distribution size and the installation of header files for external programs to use Nix libraries.