|
@ -57,6 +57,7 @@ type VolumeServerOptions struct { |
|
|
compactionMBPerSecond *int |
|
|
compactionMBPerSecond *int |
|
|
fileSizeLimitMB *int |
|
|
fileSizeLimitMB *int |
|
|
concurrentUploadLimitMB *int |
|
|
concurrentUploadLimitMB *int |
|
|
|
|
|
concurrentDownloadLimitMB *int |
|
|
pprof *bool |
|
|
pprof *bool |
|
|
preStopSeconds *int |
|
|
preStopSeconds *int |
|
|
metricsHttpPort *int |
|
|
metricsHttpPort *int |
|
@ -85,7 +86,8 @@ func init() { |
|
|
v.memProfile = cmdVolume.Flag.String("memprofile", "", "memory profile output file") |
|
|
v.memProfile = cmdVolume.Flag.String("memprofile", "", "memory profile output file") |
|
|
v.compactionMBPerSecond = cmdVolume.Flag.Int("compactionMBps", 0, "limit background compaction or copying speed in mega bytes per second") |
|
|
v.compactionMBPerSecond = cmdVolume.Flag.Int("compactionMBps", 0, "limit background compaction or copying speed in mega bytes per second") |
|
|
v.fileSizeLimitMB = cmdVolume.Flag.Int("fileSizeLimitMB", 256, "limit file size to avoid out of memory") |
|
|
v.fileSizeLimitMB = cmdVolume.Flag.Int("fileSizeLimitMB", 256, "limit file size to avoid out of memory") |
|
|
v.concurrentUploadLimitMB = cmdVolume.Flag.Int("concurrentUploadLimitMB", 128, "limit total concurrent upload size") |
|
|
|
|
|
|
|
|
v.concurrentUploadLimitMB = cmdVolume.Flag.Int("concurrentUploadLimitMB", 256, "limit total concurrent upload size") |
|
|
|
|
|
v.concurrentDownloadLimitMB = cmdVolume.Flag.Int("concurrentDownloadLimitMB", 256, "limit total concurrent download size") |
|
|
v.pprof = cmdVolume.Flag.Bool("pprof", false, "enable pprof http handlers. precludes --memprofile and --cpuprofile") |
|
|
v.pprof = cmdVolume.Flag.Bool("pprof", false, "enable pprof http handlers. precludes --memprofile and --cpuprofile") |
|
|
v.metricsHttpPort = cmdVolume.Flag.Int("metricsPort", 0, "Prometheus metrics listen port") |
|
|
v.metricsHttpPort = cmdVolume.Flag.Int("metricsPort", 0, "Prometheus metrics listen port") |
|
|
v.idxFolder = cmdVolume.Flag.String("dir.idx", "", "directory to store .idx files") |
|
|
v.idxFolder = cmdVolume.Flag.String("dir.idx", "", "directory to store .idx files") |
|
@ -232,6 +234,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v |
|
|
*v.compactionMBPerSecond, |
|
|
*v.compactionMBPerSecond, |
|
|
*v.fileSizeLimitMB, |
|
|
*v.fileSizeLimitMB, |
|
|
int64(*v.concurrentUploadLimitMB)*1024*1024, |
|
|
int64(*v.concurrentUploadLimitMB)*1024*1024, |
|
|
|
|
|
int64(*v.concurrentDownloadLimitMB)*1024*1024, |
|
|
) |
|
|
) |
|
|
// starting grpc server
|
|
|
// starting grpc server
|
|
|
grpcS := v.startGrpcService(volumeServer) |
|
|
grpcS := v.startGrpcService(volumeServer) |
|
|