From f506117edb59591af6ee4d7c6487091331439add Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Tue, 22 Aug 2023 07:21:49 -0700 Subject: [PATCH] Reduce memory profiling rate (#17894) Change profiling from every 4KB to every 128K, reducing the lock contention by a factor of 32. --- cmd/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/utils.go b/cmd/utils.go index 4ee211efc..5b26f9c9a 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -345,7 +345,7 @@ func getProfileData() (map[string][]byte, error) { } func setDefaultProfilerRates() { - runtime.MemProfileRate = 4096 // 512K -> 4K - Must be constant throughout application lifetime. + runtime.MemProfileRate = 128 << 10 // 512KB -> 128K - Must be constant throughout application lifetime. runtime.SetMutexProfileFraction(0) // Disable until needed runtime.SetBlockProfileRate(0) // Disable until needed }