Eee: MGLRU min_ttl, earlyoom on RAM alone
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
de5e2968e7
commit
169447f593
1 changed files with 7 additions and 1 deletions
|
|
@ -101,8 +101,14 @@ in
|
|||
# 1GB RAM: compressed swap only (disk swap is off, see hardware file).
|
||||
zramSwap.enable = true;
|
||||
# A heavy page (bbc.co.uk) used to freeze everything; now the biggest
|
||||
# process (the browser's web process) dies instead.
|
||||
# process (the browser's web process) dies instead. zram lives in RAM, so
|
||||
# swap never looks full: judge on RAM alone.
|
||||
services.earlyoom.enable = true;
|
||||
services.earlyoom.freeSwapThreshold = 100;
|
||||
# Even with no disk swap it still froze: the kernel kept evicting and
|
||||
# re-reading program code from disk. MGLRU's min_ttl OOM-kills instead
|
||||
# when it can't keep the last 1s of working set in RAM.
|
||||
systemd.tmpfiles.rules = [ "w /sys/kernel/mm/lru_gen/min_ttl_ms - - - - 1000" ];
|
||||
|
||||
# The NixOS manual is a big from-source build on i686 for a page nobody reads.
|
||||
documentation.nixos.enable = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue