Use contiguous groups to determine queuing region. (#3308)
This commit is contained in:
@@ -228,34 +228,30 @@ func (q *qdMeasurement) ProcessPacketGroup(pg *packetGroup, groupIdx int) {
|
|||||||
}
|
}
|
||||||
q.maxSendTime = max(q.maxSendTime, maxSendTime)
|
q.maxSendTime = max(q.maxSendTime, maxSendTime)
|
||||||
|
|
||||||
if pqd < q.dqrMax {
|
switch {
|
||||||
|
case pqd < q.dqrMax:
|
||||||
q.numDQRGroups++
|
q.numDQRGroups++
|
||||||
if q.numJQRGroups > 0 {
|
if q.numJQRGroups > 0 {
|
||||||
// JQR continuity is broken
|
// broken continuity, seal
|
||||||
q.isSealed = true
|
q.isSealed = true
|
||||||
return
|
} else if q.dqrConfig.IsTriggered(q.numDQRGroups, q.maxSendTime-q.minSendTime) {
|
||||||
}
|
|
||||||
|
|
||||||
if q.dqrConfig.IsTriggered(q.numDQRGroups, q.maxSendTime-q.minSendTime) {
|
|
||||||
q.isSealed = true
|
q.isSealed = true
|
||||||
q.queuingRegion = queuingRegionDQR
|
q.queuingRegion = queuingRegionDQR
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if pqd > q.jqrMin {
|
case pqd > q.jqrMin:
|
||||||
q.numJQRGroups++
|
q.numJQRGroups++
|
||||||
if q.numDQRGroups > 0 {
|
if q.numDQRGroups > 0 {
|
||||||
// DQR continuity is broken
|
// broken continuity, seal
|
||||||
q.isSealed = true
|
q.isSealed = true
|
||||||
return
|
} else if q.jqrConfig.IsTriggered(q.numJQRGroups, q.maxSendTime-q.minSendTime) {
|
||||||
}
|
|
||||||
|
|
||||||
if q.jqrConfig.IsTriggered(q.numJQRGroups, q.maxSendTime-q.minSendTime) {
|
|
||||||
q.isSealed = true
|
q.isSealed = true
|
||||||
q.queuingRegion = queuingRegionJQR
|
q.queuingRegion = queuingRegionJQR
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
// broken continuity, seal
|
||||||
|
q.isSealed = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,17 +347,19 @@ func (l *lossMeasurement) ProcessPacketGroup(pg *packetGroup, groupIdx int) {
|
|||||||
if weightedLoss > l.jqrMinLoss {
|
if weightedLoss > l.jqrMinLoss {
|
||||||
l.weightedLoss = weightedLoss
|
l.weightedLoss = weightedLoss
|
||||||
l.queuingRegion = queuingRegionJQR
|
l.queuingRegion = queuingRegionJQR
|
||||||
l.isDQRSealed = true // seal DQR also as JQR is already hit
|
l.isDQRSealed = true // seal DQR also as queuing region has been determined
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if l.dqrConfig.IsTriggered(l.numGroups, l.ts.Duration()) {
|
if !l.isDQRSealed && l.dqrConfig.IsTriggered(l.numGroups, l.ts.Duration()) {
|
||||||
l.isDQRSealed = true
|
l.isDQRSealed = true
|
||||||
|
|
||||||
l.weightedLoss = l.ts.WeightedLoss()
|
weightedLoss := l.ts.WeightedLoss()
|
||||||
if l.weightedLoss < l.dqrMaxLoss {
|
if weightedLoss < l.dqrMaxLoss {
|
||||||
|
l.weightedLoss = weightedLoss
|
||||||
l.queuingRegion = queuingRegionDQR
|
l.queuingRegion = queuingRegionDQR
|
||||||
|
l.isJQRSealed = true // seal JQR also as queuing region has been determined
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -855,7 +853,6 @@ func (c *congestionDetector) prunePacketGroups() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *congestionDetector) updateCongestionSignal(
|
func (c *congestionDetector) updateCongestionSignal(
|
||||||
stage string,
|
|
||||||
qdJQRConfig CongestionSignalConfig,
|
qdJQRConfig CongestionSignalConfig,
|
||||||
qdDQRConfig CongestionSignalConfig,
|
qdDQRConfig CongestionSignalConfig,
|
||||||
lossJQRConfig CongestionSignalConfig,
|
lossJQRConfig CongestionSignalConfig,
|
||||||
@@ -902,7 +899,6 @@ func (c *congestionDetector) updateCongestionSignal(
|
|||||||
|
|
||||||
func (c *congestionDetector) updateEarlyWarningSignal() {
|
func (c *congestionDetector) updateEarlyWarningSignal() {
|
||||||
c.updateCongestionSignal(
|
c.updateCongestionSignal(
|
||||||
"early-warning",
|
|
||||||
c.params.Config.QueuingDelayEarlyWarningJQR,
|
c.params.Config.QueuingDelayEarlyWarningJQR,
|
||||||
c.params.Config.QueuingDelayEarlyWarningDQR,
|
c.params.Config.QueuingDelayEarlyWarningDQR,
|
||||||
c.params.Config.LossEarlyWarningJQR,
|
c.params.Config.LossEarlyWarningJQR,
|
||||||
@@ -912,7 +908,6 @@ func (c *congestionDetector) updateEarlyWarningSignal() {
|
|||||||
|
|
||||||
func (c *congestionDetector) updateCongestedSignal() {
|
func (c *congestionDetector) updateCongestedSignal() {
|
||||||
c.updateCongestionSignal(
|
c.updateCongestionSignal(
|
||||||
"congested",
|
|
||||||
c.params.Config.QueuingDelayCongestedJQR,
|
c.params.Config.QueuingDelayCongestedJQR,
|
||||||
c.params.Config.QueuingDelayCongestedDQR,
|
c.params.Config.QueuingDelayCongestedDQR,
|
||||||
c.params.Config.LossCongestedJQR,
|
c.params.Config.LossCongestedJQR,
|
||||||
|
|||||||
@@ -1065,6 +1065,12 @@ func (s *StreamAllocator) maybeStopProbe() {
|
|||||||
func (s *StreamAllocator) maybeBoostDeficientTracks() {
|
func (s *StreamAllocator) maybeBoostDeficientTracks() {
|
||||||
availableChannelCapacity := s.getAvailableHeadroom(false)
|
availableChannelCapacity := s.getAvailableHeadroom(false)
|
||||||
if availableChannelCapacity <= 0 {
|
if availableChannelCapacity <= 0 {
|
||||||
|
s.params.Logger.Infow(
|
||||||
|
"stream allocator: no available headroom to boost deficient tracks",
|
||||||
|
"committedChannelCapacity", s.committedChannelCapacity,
|
||||||
|
"availableChannelCapacity", availableChannelCapacity,
|
||||||
|
"expectedBandwidthUsage", s.getExpectedBandwidthUsage(),
|
||||||
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user