more tweaking
This commit is contained in:
parent
070585ab3d
commit
81a353570b
@ -34,14 +34,15 @@ float CUBIC::getCWnD(void) const {
|
|||||||
|
|
||||||
void CUBIC::onCongestion(void) {
|
void CUBIC::onCongestion(void) {
|
||||||
if (getTimeNow() - _time_point_reduction >= getCurrentDelay()*4.f) {
|
if (getTimeNow() - _time_point_reduction >= getCurrentDelay()*4.f) {
|
||||||
|
const auto tmp_old_tp = getTimeNow() - _time_point_reduction;
|
||||||
|
|
||||||
const auto current_cwnd = getCWnD();
|
const auto current_cwnd = getCWnD();
|
||||||
const auto tmp_old_tp = _time_point_reduction;
|
|
||||||
_time_point_reduction = getTimeNow();
|
_time_point_reduction = getTimeNow();
|
||||||
_window_max = current_cwnd * BETA;
|
_window_max = current_cwnd * BETA;
|
||||||
_window_max = std::max(_window_max, 2.*MAXIMUM_SEGMENT_SIZE);
|
_window_max = std::max(_window_max, 2.*MAXIMUM_SEGMENT_SIZE);
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
std::cout << "CONGESTION!"
|
std::cout << "----CONGESTION!"
|
||||||
<< " cwnd_max:" << _window_max
|
<< " cwnd_max:" << _window_max
|
||||||
<< " pts:" << tmp_old_tp
|
<< " pts:" << tmp_old_tp
|
||||||
<< " rtt:" << getCurrentDelay()
|
<< " rtt:" << getCurrentDelay()
|
||||||
|
@ -8,7 +8,8 @@ struct CUBIC : public FlowOnly {
|
|||||||
//using clock = std::chrono::steady_clock;
|
//using clock = std::chrono::steady_clock;
|
||||||
|
|
||||||
public: // config
|
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 SCALING_CONSTANT {0.4f};
|
||||||
static constexpr float RTT_EMA_ALPHA = 0.1f; // 0.1 is very smooth, might need more
|
static constexpr float RTT_EMA_ALPHA = 0.1f; // 0.1 is very smooth, might need more
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user