3 ms·
I love nix as a concept, but in my experience it isn't practical on systems without a ton of memory. I regularly get build errors due to oom errors.
by root_axis 6y ago
I love nix as a concept, but in my experience it isn't practical on systems without a ton of memory. I regularly get build errors due to oom errors.
- kaba0 6y agoThat’s strange, are you actually compiling packages or the evaluation itself ooms? Because if the former, you may help it by limiting concurrent builds.
- raxi 6y agoEvaluating/compiling packages is not greedy. Memory is eaten by lazy evaluation of NixOS modules. It can be optimized, but it is not a low-hanging fruit. It is still waiting for its hero. I'd compare it with creating the V8 for JavaScript.
- trulyrandom 6y agoYeah, it's clear that Nix has not been optimized to run on resource constrained devices. I run NixOS on a Raspberry Pi with 1GB of RAM and had to enable swap to prevent Nix from running into OOM situations. Any system with more memory than 1GB is usually fine in my experience though.
- ris 6y agoTo run it on systems with low memory, I suggest performing any custom builds on a separate machine. In "normal" circumstances you don't generally have to do any builds at all - (almost?) everything should come from the binary cache. To be doing all these rebuilds it sounds like you're customizing packages, which is already something other distributions don't tend to let you do at all.
- taktoa 6y agoyou're probably mistakenly using nix-env -i, rather than nix-env -iA
- root_axis 6y agoI think you're right! Thanks for this tip.