catchunks: Improve CUBIC performance for lossy networks
Change-Id: I4baea5dcbc02d5c4a989330603e059daa55e767f
refs: #5036
diff --git a/tools/chunks/catchunks/options.hpp b/tools/chunks/catchunks/options.hpp
index 0f432b3..fbca964 100644
--- a/tools/chunks/catchunks/options.hpp
+++ b/tools/chunks/catchunks/options.hpp
@@ -46,7 +46,7 @@
size_t maxPipelineSize = 1;
// Adaptive pipeline common options
- double initCwnd = 1.0; ///< initial congestion window size
+ double initCwnd = 2.0; ///< initial congestion window size
double initSsthresh = std::numeric_limits<double>::max(); ///< initial slow start threshold
time::milliseconds rtoCheckInterval{10}; ///< interval for checking retransmission timer
bool ignoreCongMarks = false; ///< disable window decrease after receiving congestion mark
diff --git a/tools/chunks/catchunks/pipeline-interests-adaptive.hpp b/tools/chunks/catchunks/pipeline-interests-adaptive.hpp
index a48813b..914143c 100644
--- a/tools/chunks/catchunks/pipeline-interests-adaptive.hpp
+++ b/tools/chunks/catchunks/pipeline-interests-adaptive.hpp
@@ -192,9 +192,9 @@
double m_cwnd; ///< current congestion window size (in segments)
double m_ssthresh; ///< current slow start threshold
+ RttEstimatorWithStats& m_rttEstimator;
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
- RttEstimatorWithStats& m_rttEstimator;
Scheduler m_scheduler;
scheduler::ScopedEventId m_checkRtoEvent;
diff --git a/tools/chunks/catchunks/pipeline-interests-cubic.cpp b/tools/chunks/catchunks/pipeline-interests-cubic.cpp
index b4ae43f..74aab0c 100644
--- a/tools/chunks/catchunks/pipeline-interests-cubic.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-cubic.cpp
@@ -70,10 +70,10 @@
// 3. Target: W_cubic(t) = C*(t-K)^3 + wmax (Eq. 1)
const double wCubic = CUBIC_C * std::pow(t - k, 3) + m_wmax;
- // 4. Estimate of Reno Increase (Currently Disabled)
- // const double rtt = m_rtt->GetCurrentEstimate().GetSeconds();
- // const double w_est = wmax*m_beta + (3*(1-m_beta)/(1+m_beta)) * (t/rtt);
- const double wEst = 0.0;
+ // 4. Estimate of Reno Increase (Eq. 4)
+ const double rtt = m_rttEstimator.getSmoothedRtt().count() / 1e9;
+ const double wEst = m_wmax * m_options.cubicBeta +
+ (3 * (1 - m_options.cubicBeta) / (1 + m_options.cubicBeta)) * (t / rtt);
// Actual adaptation
double cubicIncrement = std::max(wCubic, wEst) - m_cwnd;