Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

debugging: track all memory allocations

Chris Lu81904ad33646
diff --git a/weed/util/pprof.go b/weed/util/pprof.go
index 3630175558..a2621ceee3 100644
--- a/weed/util/pprof.go
+++ b/weed/util/pprof.go
@@ -2,6 +2,7 @@ package util
import (
"os"
+ "runtime"
"runtime/pprof"
"github.com/chrislusf/seaweedfs/weed/glog"
@@ -19,6 +20,7 @@ func SetupProfiling(cpuProfile, memProfile string) {
})
}
if memProfile != "" {
+ runtime.MemProfileRate = 1
f, err := os.Create(memProfile)
if err != nil {
glog.Fatal(err)