mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 05:37:55 +08:00
volume: add "hasSlowRead" option to customize read optimization
This commit is contained in:
@@ -66,6 +66,7 @@ type VolumeServerOptions struct {
|
||||
metricsHttpPort *int
|
||||
// pulseSeconds *int
|
||||
inflightUploadDataTimeout *time.Duration
|
||||
hasSlowRead *bool
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -96,6 +97,7 @@ func init() {
|
||||
v.metricsHttpPort = cmdVolume.Flag.Int("metricsPort", 0, "Prometheus metrics listen port")
|
||||
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, "if true, this prevents slow reads from blocking other requests, but large file read P99 latency will increase.")
|
||||
}
|
||||
|
||||
var cmdVolume = &Command{
|
||||
@@ -243,6 +245,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
|
||||
int64(*v.concurrentUploadLimitMB)*1024*1024,
|
||||
int64(*v.concurrentDownloadLimitMB)*1024*1024,
|
||||
*v.inflightUploadDataTimeout,
|
||||
*v.hasSlowRead,
|
||||
)
|
||||
// starting grpc server
|
||||
grpcS := v.startGrpcService(volumeServer)
|
||||
|
Reference in New Issue
Block a user