• Neal Cardwell's avatar
    tcp: restore 1.5x per RTT limit to CUBIC cwnd growth in congestion avoidance · d578e18c
    Neal Cardwell authored
    Commit 814d488c ("tcp: fix the timid additive increase on stretch
    ACKs") fixed a bug where tcp_cong_avoid_ai() would either credit a
    connection with an increase of snd_cwnd_cnt, or increase snd_cwnd, but
    not both, resulting in cwnd increasing by 1 packet on at most every
    alternate invocation of tcp_cong_avoid_ai().
    
    Although the commit correctly implemented the CUBIC algorithm, which
    can increase cwnd by as much as 1 packet per 1 packet ACKed (2x per
    RTT), in practice that could be too aggressive: in tests on network
    paths with small buffers, YouTube server retransmission rates nearly
    doubled.
    
    This commit restores CUBIC to a maximum cwnd growth rate of 1 packet
    per 2 packets ACKed (1.5x per RTT). In YouTube tests this restored
    retransmit rates to low levels.
    
    Testing: This patch has been tested in datacenter netperf transfers
    and live youtube.com and google.com servers.
    
    Fixes: 9cd981dc ("tcp: fix stretch ACK bugs in CUBIC")
    Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
    Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d578e18c
tcp_cubic.c 14.2 KB