aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2025-07-03 06:03:49 +0500
committerGitHub <noreply@github.com>2025-07-02 18:03:49 -0700
commit93007c1842679c0ffb644fdef0d9126671ad82d2 (patch)
treec3821e67620c48aed95c49332ac3cc5654166bd0 /weed/command
parent1db7c2b8aad59177f9ccb32f156908faf0c13eca (diff)
downloadseaweedfs-93007c1842679c0ffb644fdef0d9126671ad82d2.tar.xz
seaweedfs-93007c1842679c0ffb644fdef0d9126671ad82d2.zip
[volume] refactor and add metrics for flight upload and download data limit condition (#6920)
* refactor concurrentDownloadLimit * fix loop * fix cmdServer * fix: resolve conversation pr 6920 * Changes logging function (#6919) * updated logging methods for stores * updated logging methods for stores * updated logging methods for filer * updated logging methods for uploader and http_util * updated logging methods for weed server --------- Co-authored-by: akosov <a.kosov@kryptonite.ru> * Improve lock ring (#6921) * fix flaky lock ring test * add more tests * fix: build * fix: rm import util/version * fix: serverOptions * refactoring --------- Co-authored-by: Aleksey Kosov <rusyak777@list.ru> Co-authored-by: akosov <a.kosov@kryptonite.ru> Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com> Co-authored-by: chrislu <chris.lu@gmail.com>
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/server.go2
-rw-r--r--weed/command/volume.go11
2 files changed, 9 insertions, 4 deletions
diff --git a/weed/command/server.go b/weed/command/server.go
index d0e04f633..9d7626e78 100644
--- a/weed/command/server.go
+++ b/weed/command/server.go
@@ -143,6 +143,8 @@ func init() {
serverOptions.v.pprof = cmdServer.Flag.Bool("volume.pprof", false, "enable pprof http handlers. precludes --memprofile and --cpuprofile")
serverOptions.v.idxFolder = cmdServer.Flag.String("volume.dir.idx", "", "directory to store .idx files")
serverOptions.v.inflightUploadDataTimeout = cmdServer.Flag.Duration("volume.inflightUploadDataTimeout", 60*time.Second, "inflight upload data wait timeout of volume servers")
+ serverOptions.v.inflightDownloadDataTimeout = cmdServer.Flag.Duration("volume.inflightDownloadDataTimeout", 60*time.Second, "inflight download data wait timeout of volume servers")
+
serverOptions.v.hasSlowRead = cmdServer.Flag.Bool("volume.hasSlowRead", true, "<experimental> if true, this prevents slow reads from blocking other requests, but large file read P99 latency will increase.")
serverOptions.v.readBufferSizeMB = cmdServer.Flag.Int("volume.readBufferSizeMB", 4, "<experimental> larger values can optimize query performance but will increase some memory usage,Use with hasSlowRead normally")
diff --git a/weed/command/volume.go b/weed/command/volume.go
index c8917819b..97986b500 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -68,10 +68,11 @@ type VolumeServerOptions struct {
metricsHttpPort *int
metricsHttpIp *string
// pulseSeconds *int
- inflightUploadDataTimeout *time.Duration
- hasSlowRead *bool
- readBufferSizeMB *int
- ldbTimeout *int64
+ inflightUploadDataTimeout *time.Duration
+ inflightDownloadDataTimeout *time.Duration
+ hasSlowRead *bool
+ readBufferSizeMB *int
+ ldbTimeout *int64
}
func init() {
@@ -104,6 +105,7 @@ func init() {
v.metricsHttpIp = cmdVolume.Flag.String("metricsIp", "", "metrics listen ip. If empty, default to same as -ip.bind option.")
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.inflightDownloadDataTimeout = cmdVolume.Flag.Duration("inflightDownloadDataTimeout", 60*time.Second, "inflight download data wait timeout of volume servers")
v.hasSlowRead = cmdVolume.Flag.Bool("hasSlowRead", true, "<experimental> if true, this prevents slow reads from blocking other requests, but large file read P99 latency will increase.")
v.readBufferSizeMB = cmdVolume.Flag.Int("readBufferSizeMB", 4, "<experimental> larger values can optimize query performance but will increase some memory usage,Use with hasSlowRead normally.")
}
@@ -261,6 +263,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
int64(*v.concurrentUploadLimitMB)*1024*1024,
int64(*v.concurrentDownloadLimitMB)*1024*1024,
*v.inflightUploadDataTimeout,
+ *v.inflightDownloadDataTimeout,
*v.hasSlowRead,
*v.readBufferSizeMB,
*v.ldbTimeout,