Is your feature request related to a problem? Please describe.
There is interest in the Kubernetes community supporting a tunable CPU CFS quota period in order to reduce latency for workloads with quota enforced. The initial proposal is to offer a tuning option in the kubelet to allow operators to configure the period, but its possible that future iterations will result in users wanting to tune this on a per-pod basis.
For details see:
https://github.com/kubernetes/kubernetes/pull/63437#issuecomment-391740566
Describe the solution you'd like
Understand if systemd will expose an option to configure the CPU period on a per control group basis.
Describe alternatives you've considered
Not using the systemd cgroup driver, or setting the cpu.cfs_quota directly, but that appears it will potentially conflict with systemd itself.
nitpick: You mean setting cpu.cfs_period_us directly. Yeah you're probably right systemd wouldn't like this.
cgroupv2 seems to expose the same concept. From the docs:
cpu.max
A read-write two value file which exists on non-root cgroups.
The default is "max 100000".
The maximum bandwidth limit. It's in the following format::
$MAX $PERIOD
which indicates that the group may consume upto $MAX in each
$PERIOD duration. "max" for $MAX indicates no limit. If only
one number is written, $MAX is updated.
So I see no problem exposing a tunable on systemd here... Will prepare a PR for it.
Cheers,
Filipe
Most helpful comment
nitpick: You mean setting
cpu.cfs_period_usdirectly. Yeah you're probably right systemd wouldn't like this.cgroupv2 seems to expose the same concept. From the docs:
So I see no problem exposing a tunable on systemd here... Will prepare a PR for it.
Cheers,
Filipe