Closed ticoneva closed 5 months ago
I believe but don't know that CPUAccounting and CPUWeight are supported by systemd v245 and later. Do you know that we can assume these to be around in systemd v245?
They are around in that form since at least systemd 241, but my memory is a bit hazy since they might require cgroup v2, which legacy versions of distros might not yet use, but the hybrid cgroup layout should be fine.
I made an investigation about the fixme notes in #126 @behrmann, and opened #127 to remove them. What do you think? My conclusion is that we don't need them, because its handled by systemd no matter what.
@behrmann I opened https://github.com/jupyterhub/systemdspawner/issues/128 also, thinking maybe cpu_weight
shouldn't be added, but that instead we should ensure its easy to pass through CPUQuota config without declaring a new dedicated python based config option in SystemdSpawner.
What are your thoughts about doing that?
Sorry for the much delayed review here, @ticoneva.
I agree with @consideRatio here that we should move towards allowing people to pass through params directly to systemd, instead of special casing them here. With that, I'm going to close this PR.
This PR introduces a new configuration option
cpu_weight
. This sets the systemd propertyCPUWeight
, which causes available CPU time to be sliced in proportion to each user's weight.This is a follow-up to PR #98.