mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"runtime"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/milvus-io/milvus/internal/log"
|
"github.com/milvus-io/milvus/internal/log"
|
||||||
@ -40,11 +39,12 @@ type compactionExecutor struct {
|
|||||||
|
|
||||||
// 0.5*min(8, NumCPU/2)
|
// 0.5*min(8, NumCPU/2)
|
||||||
func calculeateParallel() int {
|
func calculeateParallel() int {
|
||||||
cores := runtime.NumCPU()
|
return 2
|
||||||
if cores < 16 {
|
//cores := runtime.NumCPU()
|
||||||
return 4
|
//if cores < 16 {
|
||||||
}
|
//return 4
|
||||||
return cores / 2
|
//}
|
||||||
|
//return cores / 2
|
||||||
}
|
}
|
||||||
|
|
||||||
func newCompactionExecutor() *compactionExecutor {
|
func newCompactionExecutor() *compactionExecutor {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user