From 8bbaae04ff63f22573cfc2bd32fb53bb511aca3c Mon Sep 17 00:00:00 2001 From: Bingyi Sun Date: Fri, 3 Dec 2021 18:57:33 +0800 Subject: [PATCH] Decrease compaction parallel (#12707) Signed-off-by: sunby Co-authored-by: sunby --- internal/datanode/compaction_executor.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/datanode/compaction_executor.go b/internal/datanode/compaction_executor.go index 0ee23255e..392060945 100644 --- a/internal/datanode/compaction_executor.go +++ b/internal/datanode/compaction_executor.go @@ -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 { -- GitLab