We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 02141ce commit 6ad2da9Copy full SHA for 6ad2da9
libcontainer/cgroups/systemd/apply_systemd.go
@@ -269,6 +269,13 @@ func (m *Manager) Apply(pid int) error {
269
newProp("CPUShares", uint64(c.Resources.CpuShares)))
270
}
271
272
+ // cpu.cfs_quota_us and cpu.cfs_period_us are controlled by systemd.
273
+ if c.Resources.CpuQuota != 0 && c.Resources.CpuPeriod != 0 {
274
+ cpuQuotaPerSecUSec := c.Resources.CpuQuota * 1000000 / c.Resources.CpuPeriod
275
+ properties = append(properties,
276
+ newProp("CPUQuotaPerSecUSec", uint64(cpuQuotaPerSecUSec)))
277
+ }
278
+
279
if c.Resources.BlkioWeight != 0 {
280
properties = append(properties,
281
newProp("BlockIOWeight", uint64(c.Resources.BlkioWeight)))
0 commit comments