Oriel — AI & technology worth noticing, every day.

Shrinking NixOS RAM footprint and resource requirements to the bare minimum

Web page · https://lowendspirit.com/discussion/11543/shrinking-nixos-ram-footprint-and-resource-requirements-to-the-bare-minimum

First seen by Oriel on .

AI summary

A TierHive VPS configuration reduces NixOS 26.05 idle memory from 288MB to about 96MB and enables rebuilds within 512MB RAM through kernel, service, and Nix tuning.

  • The author reports a full channel update and rebuild peaking at 371MB on a 512MB VPS, with 54 kernel modules instead of 89.
  • Kernel parameters disable memory profiling, KFENCE, auditing, selected watchdog and hardware features, and transparent huge pages; the latter frees substantial reserved memory.
  • A custom derivation trims the kernel module tree from 162MB to 45MB while retaining dependencies for kept modules and applying the reduction to kernel updates.
  • The setup uses zstd zram, adjusted swap behavior, and Boehm GC settings to reduce rebuild memory pressure; zram used 116MB of real RAM during a rebuild.
  • Release upgrades from 26.05 to unstable may still OOM at 512MB; the author recommends temporarily adding RAM or retrying after downloads complete.

#nixos #linux kernel #zram #memory optimization

Generated by gpt-5.6-sol. Check the original for details.

Metric trends

Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained

Points

Score reported by the source.

  • Hacker News: 121, latest observation ; +115 over observed period since
  • Lobsters: 22, latest observation ; +21 over observed period since

Comments

Comment count reported by the source.

  • Hacker News: 17, latest observation ; +17 over observed period since
  • Lobsters: 9, latest observation ; +9 over observed period since

Aliases

SourceExternal IDURL
Hacker News50326246https://lowendspirit.com/discussion/11543/shrinking-nixos-ram-footprint-and-resource-requirements-to-the-bare-minimum Read discussion
Lobsterso1z9mmhttps://lowendspirit.com/discussion/11543/shrinking-nixos-ram-footprint-and-resource-requirements-to-the-bare-minimum Read discussion