aboutsummaryrefslogtreecommitdiff
path: root/weed/command/volume.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-09-16 23:54:39 -0700
committerchrislu <chris.lu@gmail.com>2022-09-16 23:54:39 -0700
commit3fc261d27c90fc06c1d555dd998d7535b844a746 (patch)
treeb17d0f9af6a7e8812e40d2e4aae3f3afaef373b3 /weed/command/volume.go
parent06748f27714d51235ec8c9b41f91eb6f0545130e (diff)
parent5d87ad72d8ee90146d2f6b619d54c6ac0ba4b868 (diff)
downloadseaweedfs-3fc261d27c90fc06c1d555dd998d7535b844a746.tar.xz
seaweedfs-3fc261d27c90fc06c1d555dd998d7535b844a746.zip
Merge branch 'master' of https://github.com/seaweedfs/seaweedfs
Diffstat (limited to 'weed/command/volume.go')
-rw-r--r--weed/command/volume.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go
index 3b31ada50..5b62a4844 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -67,6 +67,7 @@ type VolumeServerOptions struct {
// pulseSeconds *int
inflightUploadDataTimeout *time.Duration
hasSlowRead *bool
+ readBufferSize *int
}
func init() {
@@ -98,6 +99,7 @@ func init() {
v.idxFolder = cmdVolume.Flag.String("dir.idx", "", "directory to store .idx files")
v.inflightUploadDataTimeout = cmdVolume.Flag.Duration("inflightUploadDataTimeout", 60*time.Second, "inflight upload data wait timeout of volume servers")
v.hasSlowRead = cmdVolume.Flag.Bool("hasSlowRead", false, "<experimental> if true, this prevents slow reads from blocking other requests, but large file read P99 latency will increase.")
+ v.readBufferSize = cmdVolume.Flag.Int("readBufferSize", 1024 * 1024, "<experimental> larger values can optimize query performance but will increase some memory usage,Use with hasSlowRead normally.")
}
var cmdVolume = &Command{
@@ -246,6 +248,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
int64(*v.concurrentDownloadLimitMB)*1024*1024,
*v.inflightUploadDataTimeout,
*v.hasSlowRead,
+ *v.readBufferSize,
)
// starting grpc server
grpcS := v.startGrpcService(volumeServer)