Default max_concurrent_processing to half the CPUs pixa sees (closes #242) #261
@@ -42,9 +42,7 @@ const (
|
|||||||
// (runtime.GOMAXPROCS(0), which follows a container's CPU limit), rounded
|
// (runtime.GOMAXPROCS(0), which follows a container's CPU limit), rounded
|
||||||
// down, and at least 1.
|
// down, and at least 1.
|
||||||
func DefaultMaxConcurrentProcessing() int {
|
func DefaultMaxConcurrentProcessing() int {
|
||||||
const cpusPerImage = 2
|
return max(runtime.GOMAXPROCS(0)/2, 1) //nolint:mnd // half the CPUs
|
||||||
|
|
||||||
return max(runtime.GOMAXPROCS(0)/cpusPerImage, 1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configuration key names.
|
// Configuration key names.
|
||||||
|
|||||||
Reference in new issue
Block a user