mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-22 23:03:36 +08:00
reduce memory usage
This commit is contained in:
@@ -20,7 +20,9 @@ type MountOptions struct {
|
||||
}
|
||||
|
||||
var (
|
||||
mountOptions MountOptions
|
||||
mountOptions MountOptions
|
||||
mountCpuProfile *string
|
||||
mountMemProfile *string
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -35,6 +37,8 @@ func init() {
|
||||
mountOptions.ttlSec = cmdMount.Flag.Int("ttl", 0, "file ttl in seconds")
|
||||
mountOptions.chunkSizeLimitMB = cmdMount.Flag.Int("chunkSizeLimitMB", 16, "local write buffer size, also chunk large files")
|
||||
mountOptions.dataCenter = cmdMount.Flag.String("dataCenter", "", "prefer to write to the data center")
|
||||
mountCpuProfile = cmdMount.Flag.String("cpuprofile", "", "cpu profile output file")
|
||||
mountMemProfile = cmdMount.Flag.String("memprofile", "", "memory profile output file")
|
||||
}
|
||||
|
||||
var cmdMount = &Command{
|
||||
|
@@ -28,6 +28,8 @@ func runMount(cmd *Command, args []string) bool {
|
||||
|
||||
fuse.Unmount(*mountOptions.dir)
|
||||
|
||||
util.SetupProfiling(*mountCpuProfile, *mountMemProfile)
|
||||
|
||||
c, err := fuse.Mount(
|
||||
*mountOptions.dir,
|
||||
fuse.VolumeName("SeaweedFS"),
|
||||
|
Reference in New Issue
Block a user