Decrease compaction parallel (#12707)

Signed-off-by: sunby <bingyi.sun@zilliz.com>

Co-authored-by: sunby <bingyi.sun@zilliz.com>
This commit is contained in:
Bingyi Sun 2021-12-03 18:57:33 +08:00 committed by GitHub
parent 22fddc537c
commit 8bbaae04ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,6 @@ package datanode
import (
"context"
"runtime"
"sync"
"github.com/milvus-io/milvus/internal/log"
@ -40,11 +39,12 @@ type compactionExecutor struct {
// 0.5*min(8, NumCPU/2)
func calculeateParallel() int {
cores := runtime.NumCPU()
if cores < 16 {
return 4
}
return cores / 2
return 2
//cores := runtime.NumCPU()
//if cores < 16 {
//return 4
//}
//return cores / 2
}
func newCompactionExecutor() *compactionExecutor {