mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
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:
parent
22fddc537c
commit
8bbaae04ff
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user