Reduce MemProfileRate (#8814)

Enabling the memory profiling has a significant impact on performance.

Reduce the profiling rate by 2 orders of magnitude. It is still 128x smaller than default so it should be plenty.
This commit is contained in:
Klaus Post 2020-01-15 01:18:45 +01:00 committed by kannappanr
parent 30922148fb
commit d8660b30cc

View File

@ -252,7 +252,7 @@ func startProfiler(profilerType string) (minioProfiler, error) {
}
case "mem":
old := runtime.MemProfileRate
runtime.MemProfileRate = 1
runtime.MemProfileRate = 4096
prof.stopFn = func() ([]byte, error) {
var buf bytes.Buffer
runtime.MemProfileRate = old