未验证 提交 8bbaae04 编写于 作者: B Bingyi Sun 提交者: GitHub

Decrease compaction parallel (#12707)

Signed-off-by: Nsunby <bingyi.sun@zilliz.com>
Co-authored-by: Nsunby <bingyi.sun@zilliz.com>
上级 22fddc53
...@@ -18,7 +18,6 @@ package datanode ...@@ -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 { ...@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册