Skip to content

Commit

Permalink
set CPU quota
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
  • Loading branch information
ndeloof committed Dec 19, 2022
1 parent 1e682a4 commit d0e95cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/compose/create.go
Original file line number Diff line number Diff line change
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 d0e95cc

Please sign in to comment.