mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-06-28 07:19:58 +00:00
feat: increase brutal congestion window multiplier to 2
This commit is contained in:
parent
7c46e845a6
commit
994cef32ea
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user