Survey BBR algorithm

1. Description of network congestion

Layer is based on IP packets to Packet fragmentation block transmitted, therefore, the TCP protocol requires application delivery to split it into a plurality of character streams Packet (TCP transport layer is referred to as Segment) transmission, since the network speed changes and limited processing capability of the receiving host, TCP also determine when to send the Segment. TCP sliding window solved the Client, Server problem of the two hosts, but did not go to a lot of pipe connections routers, switches, IP packet forwarding problem, so when the input stream bottleneck router is greater than its output stream, congestion will occur. If the sender regardless of whether it after the bottleneck router buffer queue fills up a lot of packet loss will occur, and this time RTT (round-trip message time) because of the long queues and high.

As shown above, the best state is no queue, the lowest at this time RTT, and the RTT State2 elevated, but no packet loss, when the queue is full State 3 starts loss occurs

2.BBR Technology Brief

TCP congestion control will be used to address the issue. Before BBR appear, congestion control is divided into four parts: slow start, congestion avoidance, fast retransmit and fast recovery. Its meaning is not known when the bottleneck bandwidth of the connection, a lower transmission rate at the start, every RTT twice the rate of the rapid increase in the transmission rate, until it reaches a threshold value to the threshold value, the transmission rate increases linearly into the phase, which is called congestion avoidance, until packet loss occurs. After dropping, the rate of hair speed dropped for packet loss using fast retransmit algorithm resend sent, the fast recovery algorithm also uses the transmission rate of rise up as smooth as possible. If the bottleneck router buffer particularly large, then this algorithm to detect packet loss as congestion basis will lead to serious problems: the long RTT TCP link becomes larger, but the throughput remains unchanged.

CUBIC such as congestion control algorithm based on packet loss article 2 gray vertical bars in FIG. 2 play a role, it is too late, because the bottleneck router has reached the upper limit, the buffer queue is full. Better is the point of BDP limit comes into play, that is, Article 1 gray vertical line is the node at the bottleneck router buffer queue just beginning backlog. BBR congestion control is achieved by detecting and RTprop BtlBw.
RTprop: optical signal-to-end minimum delay B (actually twice the delay, because it is a round trip) from A, depending on the physical distance.
BtlBw: In the A to B link, the bandwidth of which depends on the period of the slowest link bandwidth, called bottleneck bandwidth.
BDP: the entire physical link (excluding router cache) that can store the sum of the data bits, the BDP = BtlBw * RTprop
the TCP protocol defined by the bandwidth of the BBR (delivery rate) = the amount of data / time sent out from the received ACK to the long
Note here that, RTporp and the RTT is not the same, in the RTT packet contains the router queue queuing time, ACK acknowledgment delay time. Each TCP packet must be acknowledged, transmission confirmation operation is achieved by the ACK message receiving end, but the TCP and IP header 40 bytes, if not only carry data to transmit ACK network efficiency is too low, it will let independent ACK packet to wait and see if there is no data to send, when to bring the other way, or wait and see more ACK hair together, called delayed acknowledgment. So, you can represent the difference RTT and RTprop with the following formula:

We can measure the RTT draw, we just need to find the minimum RTT measured at many times the bottleneck is the router queue is empty RTporo

When we got RTprop increased BtlBw, which they found in Article 1 of the best gray vertical line congestion control points, it has also been based on the subsequent transmission rate. BBR-based algorithm, due to the bottleneck router queue is empty, the most direct impact is RTT dropped significantly, but because there is no packet loss, BBR transfer rate will have increased dramatically.
In addition, the BBR will try new periodic probing bottleneck bandwidth, this cycle is 1.25,0.75,1,1,1,1, in order to respond to the link switching occurs, a new bottleneck bandwidth is increased or the situation becomes smaller. 1.25 BBR will make the attempt to send more messages, if generated queue backlog, 0.75 will be released queue.

Cubic 3.BBR algorithm and data comparison algorithm

FIG slow start phase at 10Mbps, 40ms network, the number of bytes in the network should be unacknowledged 10Mbps * 0.04s = 0.05MB. Brown line is the number of bytes sent CUBIC algorithm, and blue is the number of bytes acknowledged ACK, green is the number of bytes sent in the BBR algorithm. Obviously, the initial CUBIC BBR same algorithm, when 0.25 seconds flight number of bytes is clearly far more than the number of bytes 0.05MB, 0.1MB number of bytes that is about twice the BDP. About the time 0.3 seconds, CUBIC starts linearly increasing the congestion window, and to 0.5 seconds after the BBR starts to decrease the transmission rate, i.e. emptying the bottleneck router congestion queue, when 0.75 seconds to adjust the flight number of bytes to the BDP size, which is the most appropriate the transmission rate.

When the busy network sharp loss, BBR performance is much better than CUBIC algorithm. Below, the packet loss rate from 0.001% to 50%, you can see the green BBR much better than red CUBIC. About the time when the packet loss rate to 0.1%, CUBIC congestion due to the non-stop trigger algorithm, throughput speed down to only the original 1/10 10Mbps, while BBR up to 5% packet loss was noticeable decline in throughput. When CUBIC bottleneck router buffer queue fills up, RTT delay will be increasing, and the operating system to establish a three-way handshake is the maximum time limit, which leads to extreme network congestion CUBIC under construction, new connections success is difficult to establish.

4. Summary

BBR algorithm advantages:

  • A certain link in the network packet loss rate is full use of bandwidth.
  • Reducing buffer occupancy rate on the network link, thereby reducing latency.
    Insufficient BBR algorithm:
    Device Queues cache is large, BBR could not compete with Cubic and other more radical algorithm.
    BBR Algorithm Application:
    high bandwidth, high latency, packet loss rate of a certain length fat network, can reduce the transmission delay, and to ensure a high throughput.

Guess you like

Origin www.cnblogs.com/yumiao9111/p/12486397.html