Elektrine lite

← Feed

@cks@mastodon.social

Post #1546571

2026-04-14 14:54 UTC

@regehr I think you can sort of do this on an ad-hoc basis with systemd's 'run in a separate cgroup' stuff in systemd-run and systemd-oomd, but you'd need to teach your build manager to retry if a job was abruptly killed as opposed to exited with a bad status. (You could do the cgroup stuff through front end scripts for gcc/clang/lld/etc/etc, stuffing each command into a subordinate cgroup. More elaborate would be to monitor PSI information and not start commands until it was low enough.)

Replies (1)

  • @cks@mastodon.social 2026-04-14 14:56

    @regehr You could do the PSI monitoring in the front-end script/program instead of the build system, since the script itself should be lightweight. When the build manager starts what it thinks is gcc/clang/etc, the script can 'start' but sit sleeping and periodically checking for 'is PSI low enough to risk running this ...'. I guess you could also make the front end script responsible for detecting OOM kills and re-running the underlying program, now that I think about it.

    Open ##1546573