feat: increase brutal congestion window multiplier to 2

This commit is contained in:
Toby 2023-10-10 19:56:17 -07:00
parent 7c46e845a6
commit 994cef32ea

View File

@ -12,9 +12,10 @@ import (
) )
const ( const (
pktInfoSlotCount = 5 // slot index is based on seconds, so this is basically how many seconds we sample pktInfoSlotCount = 5 // slot index is based on seconds, so this is basically how many seconds we sample
minSampleCount = 50 minSampleCount = 50
minAckRate = 0.8 minAckRate = 0.8
congestionWindowMultiplier = 2
debugEnv = "HYSTERIA_BRUTAL_DEBUG" debugEnv = "HYSTERIA_BRUTAL_DEBUG"
debugPrintInterval = 2 debugPrintInterval = 2
@ -76,7 +77,7 @@ func (b *BrutalSender) GetCongestionWindow() congestion.ByteCount {
if rtt <= 0 { if rtt <= 0 {
return 10240 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, func (b *BrutalSender) OnPacketSent(sentTime time.Time, bytesInFlight congestion.ByteCount,