A modern, delicious implementation of the Nix package manager, focused on correctness, usability, and growth — and committed to doing right by its community https://lix.systems
Find a file
Alois Wohlschlager ac8209404c nix-eval-jobs: estimate memory usage using the heap size
When the maximum memory size is chosen too large (relative to the free memory
usage), so that the evaluation workers don't fit into the free memory, they
will start being swapped out. Further increase in memory usage will not be
reflected in the RSS, so they will not exit, and instead fill up all swap too
until the system runs out of memory.

The BDW-GC keeps track of its heap size, including any parts of it that may be
swapped out. For this reason it does not suffer from a similar problem. While
not all memory usage by the evaluation worker is accounted for by the GC, a
simple affine model for the overhead works reasonably well in practice. The
specific parameter values were determined using nixpkgs evaluation, and appear
to work quite well also for somewhat different workloads (like the `hydraJobs`
of Lix, which include a bunch of NixOS system configurations). So this is what
gets used.

When Lix is configured without the BDW-GC, of course this approach cannot be
used. In this case the old strategy is retained.

Change-Id: I6cb5f0a9b4ceda9dd14be165dda108cd6a6a6964
2025-10-16 15:22:54 +00:00
.github fix: docs issue template was busted 2024-09-14 19:28:46 +00:00
bench bench: add memory benchmark 2025-09-29 15:22:41 +02:00
contrib codeowners: add some missing directories 2025-09-17 16:26:49 +00:00
doc doc: Mention Buildkite in the hacking document 2025-10-15 09:21:49 +00:00
lix libutil: add a log line splitter 2025-10-16 12:31:08 +00:00
maintainers Draft of OWNERS 2025-07-14 18:20:47 -07:00
meson codeowners: add some missing directories 2025-09-17 16:26:49 +00:00
misc flake: unvendor capnproto 2025-09-22 10:04:17 +03:00
nix-support codeowners: add some missing directories 2025-09-17 16:26:49 +00:00
perl codeowners: add some missing directories 2025-09-17 16:26:49 +00:00
releng Draft of OWNERS 2025-07-14 18:20:47 -07:00
scripts Draft of OWNERS 2025-07-14 18:20:47 -07:00
subprojects nix-eval-jobs: estimate memory usage using the heap size 2025-10-16 15:22:54 +00:00
tests functional2/http_server: add some example misbehaviour routes 2025-10-13 18:30:51 +02:00
.clang-format Add pre-commit checks 2024-03-29 22:57:40 -07:00
.clang-tidy clang-tidy: fix some lints on macOS 2025-07-27 23:34:59 -07:00
.dir-locals.el .dir-locals.el: Set c-block-comment-prefix 2020-07-10 11:21:06 +02:00
.editorconfig .editorconfig: json: init with 4 space indent 2025-05-15 15:11:57 -07:00
.envrc .envrc: remove MAKEFLAGS and use clang environment by default 2024-06-25 12:36:18 -06:00
.gitignore fix codestyle of functional2 2025-05-10 21:13:45 +02:00
.mailmap add .mailmap 2024-11-04 13:46:10 +01:00
.this-is-lix devShell: guard against running from another directory 2024-06-24 13:41:38 -07:00
Cargo.lock rnix: 0.11.0 -> 0.12.0 2025-07-29 09:51:33 +00:00
Cargo.toml fix tooling after include reorganization 2024-11-19 22:55:32 +00:00
CONTRIBUTING.md chore: re-work the contribution guide 2024-05-07 01:28:35 +00:00
COPYING Add pre-commit checks 2024-03-29 22:57:40 -07:00
default.nix Format Nix code with nixfmt 2024-04-08 13:00:00 -07:00
docker.nix flake: update nixpkgs input 2025-09-07 16:50:37 +02:00
flake.lock flake: unvendor capnproto 2025-09-22 10:04:17 +03:00
flake.nix n-e-j: disable darwin ci 2025-10-15 13:37:18 +00:00
justfile tests/functional2: add runner to justfile 2025-06-01 20:19:37 +02:00
meson.build meson: only require libatomic if the test program doesn't link 2025-09-13 21:30:52 +02:00
meson.options tests/functional2: Make Command Environment actually declarative 2025-08-15 06:56:07 +00:00
OWNERS codeowners: add some missing directories 2025-09-17 16:26:49 +00:00
package.nix libexpr: enable parallel marking in boehm-gc 2025-10-01 23:07:28 +00:00
README.md Fix typos in documentation 2025-03-18 04:20:00 +00:00
shell.nix Use locked flake-compat in shell.nix 2024-12-30 07:25:23 -08:00
treefmt.toml functional2: Added ruff formatter 2025-05-10 22:14:10 +02:00
version.json unify version string between lix and nixos-module 2025-10-11 18:47:46 +00:00

Lix

Lix is an implementation of Nix, a powerful package management system for Linux and other Unix systems that makes package management reliable and reproducible.

Read more about us at https://lix.systems.

Installation

On Linux and macOS the easiest way to install Lix is to run the following shell command (as a user other than root):

$ curl -sSf -L https://install.lix.systems/lix | sh -s -- install

For systems that already have a Nix implementation installed, such as NixOS systems, read our install page

Building And Developing

See our Hacking guide in our manual for instruction on how to set up a development environment and build Lix from source.

Additional Resources

License

Lix is released under LGPL-2.1-or-later.