Skip to content

Commit

Permalink
Merge pull request #10100 from ndeloof/cpus
Browse files Browse the repository at this point in the history
set CPU quota
  • Loading branch information
glours committed Dec 19, 2022
2 parents 1e682a4 + d0e95cc commit 9d12eec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/compose/create.go
Expand Up @@ -529,7 +529,8 @@ func getDeployResources(s types.ServiceConfig) container.Resources {
CPURealtimePeriod: s.CPURTPeriod,
CPURealtimeRuntime: s.CPURTRuntime,
CPUShares: s.CPUShares,
CPUPercent: int64(s.CPUS * 100),
NanoCPUs: int64(s.CPUS * 1e9),
CPUPercent: int64(s.CPUPercent * 100),
CpusetCpus: s.CPUSet,
DeviceCgroupRules: s.DeviceCgroupRules,
}
Expand Down

0 comments on commit 9d12eec

Please sign in to comment.