diff options
author | Filipe Brandenburger <filbranden@google.com> | 2018-11-02 17:21:57 +0100 |
---|---|---|
committer | Filipe Brandenburger <filbranden@google.com> | 2019-02-14 20:04:42 +0100 |
commit | 10f28641115733c61754342d5dcbe70b083bea4b (patch) | |
tree | f0f8ab9e60ffa381fed0ad638e785ac601d29164 /man | |
parent | time-util: Introduce parse_sec_def_infinity (diff) | |
download | systemd-10f28641115733c61754342d5dcbe70b083bea4b.tar.xz systemd-10f28641115733c61754342d5dcbe70b083bea4b.zip |
core: add CPUQuotaPeriodSec=
This new setting allows configuration of CFS period on the CPU cgroup, instead
of using a hardcoded default of 100ms.
Tested:
- Legacy cgroup + Unified cgroup
- systemctl set-property
- systemctl show
- Confirmed that the cgroup settings (such as cpu.cfs_period_ns) were set
appropriately, including updating the CPU quota (cpu.cfs_quota_ns) when
CPUQuotaPeriodSec= is updated.
- Checked that clamping works properly when either period or (quota * period)
are below the resolution of 1ms, or if period is above the max of 1s.
Diffstat (limited to 'man')
-rw-r--r-- | man/systemd.resource-control.xml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/man/systemd.resource-control.xml b/man/systemd.resource-control.xml index a4d793c32e..744bfa938f 100644 --- a/man/systemd.resource-control.xml +++ b/man/systemd.resource-control.xml @@ -199,6 +199,25 @@ </varlistentry> <varlistentry> + <term><varname>CPUQuotaPeriodSec=</varname></term> + + <listitem> + <para>Assign the duration over which the CPU time quota specified by <varname>CPUQuota=</varname> is measured. + Takes a time duration value in seconds, with an optional suffix such as "ms" for milliseconds (or "s" for seconds.) + The default setting is 100ms. The period is clamped to the range supported by the kernel, which is [1ms, 1000ms]. + Additionally, the period is adjusted up so that the quota interval is also at least 1ms. + Setting <varname>CPUQuotaPeriodSec=</varname> to an empty value resets it to the default.</para> + + <para>This controls the second field of <literal>cpu.max</literal> attribute on the unified control group hierarchy + and <literal>cpu.cfs_period_us</literal> on legacy. For details about these control group attributes, see + <ulink url="https://www.kernel.org/doc/Documentation/cgroup-v2.txt">cgroup-v2.txt</ulink> and + <ulink url="https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt">sched-design-CFS.txt</ulink>.</para> + + <para>Example: <varname>CPUQuotaPeriodSec=10ms</varname> to request that the CPU quota is measured in periods of 10ms.</para> + </listitem> + </varlistentry> + + <varlistentry> <term><varname>MemoryAccounting=</varname></term> <listitem> |