feat: zram, systemd-oomd, and user-slice memory caps - #20
Merged
Conversation
Builds (cargo/webpack/tsc/link steps) can balloon memory on this laptop's 8GiB and, with no swap and no OOM intervention, thrash the kernel until it hard-hangs and needs a force reboot. Same class of problem #15 already fixed for the bootc build itself, applied here to the running desktop: - zram-generator: compressed RAM swap (up to 8GiB, zstd) absorbs spikes instead of the kernel having nowhere to reclaim to. - systemd-oomd: enabled with SwapUsedLimit=90%, watches memory pressure (PSI) and kills the worst offending cgroup before the whole system grinds to a halt. - user-.slice MemoryHigh=85% / MemoryMax=92%: caps everything the user session runs (builds, browser, terminal) at 85% of RAM, always reserving headroom for system.slice and the kernel. Verified live via usr-overlay + matching /etc drop-ins before landing here: zram0 came up as 7.4G zstd swap, systemd-oomd.socket enabled and listening, and the slice cap applied and reads back correctly via systemctl show. Signed-off-by: Prasanth Baskar <prasanth@8gears.com>
bupd
force-pushed
the
feat/zram-oomd-memory-safety
branch
from
August 12, 2026 08:20
d9e9cf1 to
677729c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds (cargo/webpack/tsc/link steps) can balloon memory on this laptop's 8GiB and, with no swap and no OOM intervention, thrash the kernel until it hard-hangs and needs a force reboot. Same class of problem #15 already fixed for the bootc build itself, applied here to the running desktop:
SwapUsedLimit=90%, watches memory pressure (PSI) and kills the worst offending cgroup before the whole system grinds to a halt.MemoryHigh=85%/MemoryMax=92%— caps everything the user session runs (builds, browser, terminal) at 85% of RAM, always reserving headroom forsystem.sliceand the kernel.Verified live via
usr-overlay+ matching/etcdrop-ins before landing here: zram0 came up as 7.4G zstd swap,systemd-oomd.socketenabled and listening, and the slice cap applied and reads back correctly viasystemctl show. Fullbootc container lintpass via a realtask build-pcstill pending — will follow up separately.