summaryrefslogtreecommitdiff
path: root/cmd/podman/shared/parallel.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/shared/parallel.go')
-rw-r--r--cmd/podman/shared/parallel.go27
1 files changed, 22 insertions, 5 deletions
diff --git a/cmd/podman/shared/parallel.go b/cmd/podman/shared/parallel.go
index 03eba2f0b..633781a45 100644
--- a/cmd/podman/shared/parallel.go
+++ b/cmd/podman/shared/parallel.go
@@ -72,20 +72,37 @@ func ParallelExecuteWorkerPool(workers int, functions []ParallelWorkerInput) map
func Parallelize(job string) int {
numCpus := runtime.NumCPU()
switch job {
+ case "kill":
+ if numCpus <= 3 {
+ return numCpus * 3
+ }
+ return numCpus * 4
+ case "pause":
+ if numCpus <= 3 {
+ return numCpus * 3
+ }
+ return numCpus * 4
+ case "ps":
+ return 8
+ case "restart":
+ return numCpus * 2
+ case "rm":
+ if numCpus <= 3 {
+ return numCpus * 3
+ } else {
+ return numCpus * 4
+ }
case "stop":
if numCpus <= 2 {
return 4
} else {
return numCpus * 3
}
- case "rm":
+ case "unpause":
if numCpus <= 3 {
return numCpus * 3
- } else {
- return numCpus * 4
}
- case "ps":
- return 8
+ return numCpus * 4
}
return 3
}