diff options
Diffstat (limited to 'weed/command/volume.go')
| -rw-r--r-- | weed/command/volume.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go index b87555456..4d34fbc1e 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -43,6 +43,7 @@ type VolumeServerOptions struct { readRedirect *bool cpuProfile *string memProfile *string + compactionMBPerSecond *int } func init() { @@ -63,6 +64,7 @@ func init() { v.readRedirect = cmdVolume.Flag.Bool("read.redirect", true, "Redirect moved or non-local volumes.") v.cpuProfile = cmdVolume.Flag.String("cpuprofile", "", "cpu profile output file") v.memProfile = cmdVolume.Flag.String("memprofile", "", "memory profile output file") + v.compactionMBPerSecond = cmdVolume.Flag.Int("compactionMBps", 0, "limit compaction speed in mega bytes per second") } var cmdVolume = &Command{ @@ -157,6 +159,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v strings.Split(masters, ","), *v.pulseSeconds, *v.dataCenter, *v.rack, v.whiteList, *v.fixJpgOrientation, *v.readRedirect, + *v.compactionMBPerSecond, ) listeningAddress := *v.bindIp + ":" + strconv.Itoa(*v.port) |
