Actions runner: Allow configuration of cgroup quotas for systemd service #159847
-
Select Topic AreaGeneral BodyIt would be amazing if we could add a way to configure The use case would be to run multiple small, stateful runners on a single, powerful machine, while keeping the resource usage of each runner in check. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @blackliner , I’d like to suggest enhancing the actions.runner.service.template file to support optional configuration of CPUQuota and MemoryMax. This would provide a flexible and native way to control system resource limits for each GitHub Actions runner instance when using systemd. Use case In scenarios where multiple runners are hosted on a single, powerful machine (e.g., self-hosted runners for parallel jobs), it’s important to contain their resource usage. Being able to configure these systemd directives directly would help: [Service]
CPUQuota=25%
MemoryMax=2GThis would ensure each runner doesn’t exceed a defined CPU or memory usage threshold, avoiding contention or resource starvation on shared machines. Proposal CPUQuota={{CPUQuota}}
MemoryMax={{MemoryMax}}Then users could set these values at installation or via environment substitution during configuration. |
Beta Was this translation helpful? Give feedback.
Hi @blackliner ,
I’d like to suggest enhancing the actions.runner.service.template file to support optional configuration of CPUQuota and MemoryMax. This would provide a flexible and native way to control system resource limits for each GitHub Actions runner instance when using systemd.
Use case
In scenarios where multiple runners are hosted on a single, powerful machine (e.g., self-hosted runners for parallel jobs), it’s important to contain their resource usage. Being able to configure these systemd directives directly would help:
This would ensure each runner doesn’t exceed a defined CPU or memory usage threshold, avoiding contention or resource sta…