From 81a353570b49a2e7d72b76090aaa49758bfe43c2 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 2 Sep 2023 02:28:22 +0200 Subject: [PATCH] more tweaking --- solanaceae/ngc_ft1/cubic.cpp | 5 +++-- solanaceae/ngc_ft1/cubic.hpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/solanaceae/ngc_ft1/cubic.cpp b/solanaceae/ngc_ft1/cubic.cpp index 8c0a9a6..6882dba 100644 --- a/solanaceae/ngc_ft1/cubic.cpp +++ b/solanaceae/ngc_ft1/cubic.cpp @@ -34,14 +34,15 @@ float CUBIC::getCWnD(void) const { void CUBIC::onCongestion(void) { if (getTimeNow() - _time_point_reduction >= getCurrentDelay()*4.f) { + const auto tmp_old_tp = getTimeNow() - _time_point_reduction; + const auto current_cwnd = getCWnD(); - const auto tmp_old_tp = _time_point_reduction; _time_point_reduction = getTimeNow(); _window_max = current_cwnd * BETA; _window_max = std::max(_window_max, 2.*MAXIMUM_SEGMENT_SIZE); #if 1 - std::cout << "CONGESTION!" + std::cout << "----CONGESTION!" << " cwnd_max:" << _window_max << " pts:" << tmp_old_tp << " rtt:" << getCurrentDelay() diff --git a/solanaceae/ngc_ft1/cubic.hpp b/solanaceae/ngc_ft1/cubic.hpp index 377143c..b5ee809 100644 --- a/solanaceae/ngc_ft1/cubic.hpp +++ b/solanaceae/ngc_ft1/cubic.hpp @@ -8,7 +8,8 @@ struct CUBIC : public FlowOnly { //using clock = std::chrono::steady_clock; public: // config - static constexpr float BETA {0.7f}; + //static constexpr float BETA {0.7f}; + static constexpr float BETA {0.8f}; static constexpr float SCALING_CONSTANT {0.4f}; static constexpr float RTT_EMA_ALPHA = 0.1f; // 0.1 is very smooth, might need more