Systemd: Ability to configure CPU CFS quota period

Created on 24 May 2018  路  1Comment  路  Source: systemd/systemd

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.

RFE 馃巵 cgroups

Most helpful comment

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

>All comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

flokli picture flokli  路  3Comments

ph448 picture ph448  路  3Comments

shibumi picture shibumi  路  3Comments

nontrinaryalternativeblackmale picture nontrinaryalternativeblackmale  路  3Comments

carloabelli picture carloabelli  路  3Comments