adjust EWMA RTT start values in TCPVegasCC

This commit is contained in:
Stephen Birarda 2016-09-26 15:09:01 -07:00
parent 96ef1fa483
commit c794c4af1a
2 changed files with 7 additions and 5 deletions

View file

@ -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);

View file

@ -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