Skip to content

buckconfig: run the daemon in its own cgroup - #282

Merged
daandemeyer merged 1 commit into
amutable-systems:mainfrom
daandemeyer:push-vwrsosyupzlw
Oct 9, 2026
Merged

daandemeyer merged 1 commit into
amutable-systems:mainfrom
daandemeyer:push-vwrsosyupzlw

Conversation

@daandemeyer

Copy link
Copy Markdown
Member

Buck runs the daemon and every local action in the cgroup of the shell that
started it. Buck therefore cannot measure how much memory an action used, and
it cannot kill processes that an action leaves running. Turn on resource
control. The daemon then starts in a systemd user scope and runs each action
in its own cgroup. tine init copies the section, so projects get it too.

When memory runs out during a build, Buck keeps every local action running.
systemd-oomd or the kernel OOM killer can then kill the daemon, and the build
fails. Turn on suspension, so that Buck freezes the newest actions when memory
pressure rises and thaws them once it drops.

Signed-off-by: Daan De Meyer daan@amutable.com

Buck runs the daemon and every local action in the cgroup of the shell that
started it. Buck therefore cannot measure how much memory an action used, and
it cannot kill processes that an action leaves running. Turn on resource
control. The daemon then starts in a systemd user scope and runs each action
in its own cgroup. `tine init` copies the section, so projects get it too.

When memory runs out during a build, Buck keeps every local action running.
systemd-oomd or the kernel OOM killer can then kill the daemon, and the build
fails. Turn on suspension, so that Buck freezes the newest actions when memory
pressure rises and thaws them once it drops.

Signed-off-by: Daan De Meyer <daan@amutable.com>
@daandemeyer
daandemeyer merged commit d986756 into amutable-systems:main Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants