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.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
add master profiling option
Chris Lub38ff39e8bab
diff --git a/weed/command/master.go b/weed/command/master.goindex aed8fc7935..cb6b492e32 100644--- a/weed/command/master.go+++ b/weed/command/master.go@@ -4,6 +4,7 @@ import ("net/http""os""runtime"+ "runtime/pprof""strconv""strings""time"@@ -42,6 +43,7 @@ var (garbageThreshold = cmdMaster.Flag.String("garbageThreshold", "0.3", "threshold to vacuum and reclaim spaces")masterWhiteListOption = cmdMaster.Flag.String("whiteList", "", "comma separated Ip addresses having write permission. No limit if empty.")masterSecureKey = cmdMaster.Flag.String("secure.secret", "", "secret to encrypt Json Web Token(JWT)")+ masterCpuProfile = cmdMaster.Flag.String("cpuprofile", "", "cpu profile output file")masterWhiteList []string)@@ -51,6 +53,14 @@ func runMaster(cmd *Command, args []string) bool {*mMaxCpu = runtime.NumCPU()}runtime.GOMAXPROCS(*mMaxCpu)+ if *masterCpuProfile != "" {+ f, err := os.Create(*masterCpuProfile)+ if err != nil {+ glog.Fatal(err)+ }+ pprof.StartCPUProfile(f)+ defer pprof.StopCPUProfile()+ }if err := util.TestFolderWritable(*metaFolder); err != nil {glog.Fatalf("Check Meta Folder (-mdir) Writable %s : %s", *metaFolder, err)}