From 994cef32ea81d3db41490c141ef3efce75be7c12 Mon Sep 17 00:00:00 2001 From: Toby Date: Tue, 10 Oct 2023 19:56:17 -0700 Subject: [PATCH] feat: increase brutal congestion window multiplier to 2 --- core/internal/congestion/brutal/brutal.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/internal/congestion/brutal/brutal.go b/core/internal/congestion/brutal/brutal.go index 6a705c7..a9eabe8 100644 --- a/core/internal/congestion/brutal/brutal.go +++ b/core/internal/congestion/brutal/brutal.go @@ -12,9 +12,10 @@ import ( ) const ( - pktInfoSlotCount = 5 // slot index is based on seconds, so this is basically how many seconds we sample - minSampleCount = 50 - minAckRate = 0.8 + pktInfoSlotCount = 5 // slot index is based on seconds, so this is basically how many seconds we sample + minSampleCount = 50 + minAckRate = 0.8 + congestionWindowMultiplier = 2 debugEnv = "HYSTERIA_BRUTAL_DEBUG" debugPrintInterval = 2 @@ -76,7 +77,7 @@ func (b *BrutalSender) GetCongestionWindow() congestion.ByteCount { if rtt <= 0 { return 10240 } - return congestion.ByteCount(float64(b.bps) * rtt.Seconds() * 1.5 / b.ackRate) + return congestion.ByteCount(float64(b.bps) * rtt.Seconds() * congestionWindowMultiplier / b.ackRate) } func (b *BrutalSender) OnPacketSent(sentTime time.Time, bytesInFlight congestion.ByteCount,