mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 14:29:35 +02:00
adjust EWMA RTT start values in TCPVegasCC
This commit is contained in:
parent
96ef1fa483
commit
c794c4af1a
2 changed files with 7 additions and 5 deletions
|
@ -113,18 +113,20 @@ void TCPVegasCC::performCongestionAvoidance(udt::SequenceNumber ack) {
|
|||
// (though congestion may be noticed a bit later)
|
||||
int rtt = _currentMinRTT;
|
||||
|
||||
int expectedWindowSize = _congestionWindowSize * _baseRTT / rtt;
|
||||
int windowSizeDiff = _congestionWindowSize * (rtt - _baseRTT) / _baseRTT;
|
||||
|
||||
qDebug() << "BRTT:" << _baseRTT << "CRTT:" << _currentMinRTT;
|
||||
qDebug() << "BRTT:" << _baseRTT << "CRTT:" << _currentMinRTT << "ERTT:" << _ewmaRTT;
|
||||
qDebug() << "D:" << windowSizeDiff;
|
||||
|
||||
|
||||
if (_slowStart) {
|
||||
if (windowSizeDiff > VEGAS_GAMMA_SEGMENTS) {
|
||||
// we're going too fast - this breaks us out of slow start and we switch to linear increase/decrease
|
||||
_slowStart = false;
|
||||
|
||||
int expectedWindowSize = _congestionWindowSize * _baseRTT / rtt;
|
||||
|
||||
qDebug() << "EWS:" << expectedWindowSize;
|
||||
|
||||
// drop the congestion window size to the expected size, if smaller
|
||||
_congestionWindowSize = std::min(_congestionWindowSize, expectedWindowSize + 1);
|
||||
|
||||
|
|
|
@ -55,8 +55,8 @@ private:
|
|||
int _currentMinRTT { 0x7FFFFFFF }; // Current RTT, in microseconds
|
||||
int _baseRTT { 0x7FFFFFFF }; // Lowest RTT during connection, in microseconds
|
||||
int _numRTT { 0 }; // Number of RTT collected during last RTT
|
||||
int _ewmaRTT { 0 }; // Exponential weighted moving average RTT
|
||||
int _rttVariance { 0 }; // Variance in collected RTT values
|
||||
int _ewmaRTT { 100000 }; // Exponential weighted moving average RTT
|
||||
int _rttVariance { 50000 }; // Variance in collected RTT values
|
||||
|
||||
int _slowStartOddAdjust { 0 }; // Marker for every window adjustment every other RTT in slow-start
|
||||
|
||||
|
|
Loading…
Reference in a new issue