From e5117499783c2a48c1264e08c6c2e5a5d9b8d453 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Tue, 8 Oct 2024 16:11:19 +0800 Subject: [PATCH 1/2] statistics: sync load will be attempted at most 3 times Signed-off-by: Weizhen Wang --- pkg/statistics/handle/syncload/stats_syncload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/statistics/handle/syncload/stats_syncload.go b/pkg/statistics/handle/syncload/stats_syncload.go index d21d3a76c5596..768d62fc5cc45 100644 --- a/pkg/statistics/handle/syncload/stats_syncload.go +++ b/pkg/statistics/handle/syncload/stats_syncload.go @@ -43,7 +43,7 @@ import ( ) // RetryCount is the max retry count for a sync load task. -const RetryCount = 3 +const RetryCount = 2 // GetSyncLoadConcurrencyByCPU returns the concurrency of sync load by CPU. func GetSyncLoadConcurrencyByCPU() int { From 0e063a9dc7f2873b248eaaf1e3bc5d271a25866b Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Tue, 8 Oct 2024 16:57:31 +0800 Subject: [PATCH 2/2] update --- pkg/statistics/handle/syncload/stats_syncload.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/statistics/handle/syncload/stats_syncload.go b/pkg/statistics/handle/syncload/stats_syncload.go index 768d62fc5cc45..7aef9352d29fd 100644 --- a/pkg/statistics/handle/syncload/stats_syncload.go +++ b/pkg/statistics/handle/syncload/stats_syncload.go @@ -49,13 +49,13 @@ const RetryCount = 2 func GetSyncLoadConcurrencyByCPU() int { core := runtime.GOMAXPROCS(0) if core <= 8 { - return 5 - } else if core <= 16 { return 6 - } else if core <= 32 { + } else if core <= 16 { return 8 + } else if core <= 32 { + return 10 } - return 10 + return 12 } type statsSyncLoad struct {