From 2b0a4704744af8003a547db0ca8320dbd5bda800 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Wed, 28 Jun 2023 12:48:38 +0530 Subject: [PATCH] Less flapping in probe. (#1834) - Increase max interval between probes to 2 minutes. - Use a minimum probe rate of 200 kbps. This is to ensure that the probe rate is decent and can produce a stronger signal. --- pkg/sfu/streamallocator/probe_controller.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/sfu/streamallocator/probe_controller.go b/pkg/sfu/streamallocator/probe_controller.go index 28fda6ac7..9fc80ad53 100644 --- a/pkg/sfu/streamallocator/probe_controller.go +++ b/pkg/sfu/streamallocator/probe_controller.go @@ -10,7 +10,7 @@ import ( const ( ProbeWaitBase = 5 * time.Second ProbeBackoffFactor = 1.5 - ProbeWaitMax = 30 * time.Second + ProbeWaitMax = 2 * time.Minute ProbeSettleWait = 250 ProbeSettleWaitMax = 10 * time.Second ProbeTrendWait = 2 * time.Second @@ -178,7 +178,11 @@ func (p *ProbeController) InitProbe(probeGoalDeltaBps int64, expectedBandwidthUs p.lastProbeStartTime = time.Now() // overshoot a bit to account for noise (in measurement/estimate etc) - p.probeGoalBps = expectedBandwidthUsage + ((probeGoalDeltaBps * ProbePct) / 100) + desiredIncreaseBps := (probeGoalDeltaBps * ProbePct) / 100 + if desiredIncreaseBps < ProbeMinBps { + desiredIncreaseBps = ProbeMinBps + } + p.probeGoalBps = expectedBandwidthUsage + desiredIncreaseBps p.abortedProbeClusterId = ProbeClusterIdInvalid