preface

Last time I briefly introduced the characteristics of BBR and the basic implementation ideas, but BBR is not perfect to beat the existence of all other algorithms. In July 2018, Google announced plans to improve BBR. There are currently trial documents for BBR V2 Alpha, but the official version has not yet been released. So with the help of BBR V2 update content to briefly sum up some shortcomings or shortcomings of BBR.

Planned updates to BBR V2

  • Improved fairness in coexistence with other algorithms: Adjust the time of BBR detection bandwidth to coexist with CUBIC/Reno
  • Reduce queuing pressure (packet loss and queue delay), taking packet loss and ECN into account when calculating the following indicators
    • Security range of in-flight data
    • Exit STARTUP time
  • Accelerate min_RTT convergence: increase the frequency of PROBE_RTT
  • Reduced PROBE_RTT extremes

A new model for calculating in-flight data sizes

Version V2 uses a new model to calculate the size range of in-flight data, which contains three parameters: INFLight_LO, INFLight_high, and INFLight_PROb.

  • Inflight_lo: Indicates the minimum value of in-flight packets calculated based on packet loss and ECN signals
  • Inflight_hi: indicates the maximum value of in-flight packets before packet loss and ECN signals occur
  • Inflight_prob: Indicates the increase in bandwidth that exceeds inflight_HI when detecting bandwidth

STARTUP phase

In BBR V1, STARTUP keeps increasing the send speed until the maximum detected bandwidth levels off and exits. However, packet loss is not considered in this phase. Therefore, serious packet loss may occur in the STARTUP phase. In version V2, the user is added to the STARTUP exit condition: If packet loss or ECN is detected, the user exits the STARTUP phase in advance and updates the inflight_hi variable. Another change in STARTUP mode is to change the congestion window gain from 2.89 to 2. This change will increase the stalling problem caused by ACK aggregation. BBR’s solution to this problem is BBR extra-cwnd.

DRAIN stage tapping

The DRAIN phase slows down sending, attempting to empty the cache on intermediate devices until the inflight data is less than the estimated bandwidth (” DRAIN to target”). This phase has not changed.

PROBE_BW phase

In the V2 version, PROBE_BW has three phases: cruise (leveling off), up (exploring more bandwidth), and Down (converging to available bandwidth). Meanwhile, in order to coexist with other algorithms based on packet loss, the PROBE_BW cycle is no longer 8 min_rtt, but min(T_bbr, T_reno), T_bbr is the time range of 2-5s, and T_reno is min(BDP, 50) * RTT. The BDP expiration time is not the past ten rounds, but the longer two PROBE_BW cycles.

cruise

In V1, the smooth phase keeps inflight at a constant value, while v2 reserves space (for other connections) to keep inflight between inflight_LO and inflight_hi, and reduces the value of inflight_LO based on packet loss and ECN events.

up

V1 simply increases the transmission speed by 1/4 when detecting more bandwidth, while V2 adopts the exponential growth mode, which detects available bandwidth slowly and quickly until packet loss occurs or the new available bandwidth is 1.25 times greater than the estimated bandwidth. Meanwhile, inflight_HI is updated when packet loss occurs.

down

In V1, each convergence is reduced by a quarter, whereas in V2, the “drain to target” strategy is used and converges directly to the estimated bandwidth. This subsequent phase may directly replace the DRAIN phase.

PROBE_RTT phase

In v1 version, when entering the PROBE_RTT stage, in order to detect min_RTT, the window is directly reduced to 4. Meanwhile, in order to minimize the impact of reduced throughput brought by PROBE_RTT, the PROBE_RTT frequency is relatively low (every 10 seconds). As a result, BBR converges slowly (usually 20 to 30 seconds). There are two improvements to this in version v2:

  • The window drops more gently, to 0.75*BDP instead of 4
  • They detect it more frequently, not every 10 seconds but every 2.5 seconds

Through such adjustment, PROBE_RTT is not so radical, and the convergence speed can be effectively improved.

conclusion

BBR V2 is generally more conservative, taking into account packet loss and ECN, as well as coexisting with other algorithms.

ECN means Explicit Congestion Notification. It communicates Congestion on both ends of the network by means of Explicit Notification. For details, see Wikipedia.