WO2020244448A1 - 一种拥塞控制方法、设备及计算机可读介质 - Google Patents
一种拥塞控制方法、设备及计算机可读介质 Download PDFInfo
- Publication number
- WO2020244448A1 WO2020244448A1 PCT/CN2020/093138 CN2020093138W WO2020244448A1 WO 2020244448 A1 WO2020244448 A1 WO 2020244448A1 CN 2020093138 W CN2020093138 W CN 2020093138W WO 2020244448 A1 WO2020244448 A1 WO 2020244448A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- detection information
- sending
- bandwidth utilization
- utilization rate
- end device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/25—Flow control; Congestion control with rate being modified by the source upon detecting a change of network conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/1607—Details of the supervisory signal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/26—Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L5/00—Arrangements affording multiple use of the transmission path
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L5/00—Arrangements affording multiple use of the transmission path
- H04L5/003—Arrangements for allocating sub-channels of the transmission path
- H04L5/0053—Allocation of signalling, i.e. of overhead other than pilot signals
- H04L5/0055—Physical resource allocation for ACK/NACK
Definitions
- This application relates to the field of information technology, and in particular to a congestion control method, device and computer readable medium.
- RDMA Remote Direct Memory Access
- RoCE RDMA over Converged Ethernet
- the participants involved in the DCQCN algorithm are shown in Figure 1, including three participants: a sender, receiver, and switch.
- the switch is responsible for forwarding data packets from the sending end device to the receiving end device.
- the switch puts an ECN (Explicit Congestion Notification) mark on the data packet.
- the receiving end device receives the data packet with the ECN identifier, it will correspondingly generate a CNP (Congestion Notification Packets) message to inform the sending end device, thereby guiding the sending end device to adjust the sending speed.
- the DCQCN scheme can effectively control the throughput of the sending end device in the early stage of network congestion, thereby avoiding the appearance of a large number of PFCs.
- Open-loop control means that the adjustment time period and amplitude of the DCQCN's acceleration and deceleration are based on a set of preset fixed parameters. And this set of fixed parameters cannot adapt to different network congestion scenarios and dynamic changes of network traffic.
- DCTCP Data Center TCP
- Timely Timely
- general congestion control algorithms such as BBR and CUBIC.
- the DCTCP algorithm also needs to use the ECN identifier and rely on queue changes to feed back a fuzzy degree of network congestion. Therefore, the algorithm cannot respond to the degree and change of network congestion in a timely and accurate manner, and will cause the network Increase in end-to-end delay.
- the Timely algorithm is an algorithm that uses the network card hardware to measure the RTT (Round-Trip Time) value of the network to detect and control congestion.
- the core idea of this algorithm is based on hardware-based RTT measurement so as to eliminate the influence of the software layer. Therefore, the measured RTT value only includes the delay of network transmission. After the RTT value is obtained, the speed can be increased or decelerated according to the size of the RTT value, and it can also be dynamically adjusted according to the direction of change of the RTT value.
- the disadvantages of this algorithm are: First of all, it needs to rely on network congestion to increase network queues.
- An objective of the present application is to provide a congestion control solution to solve the problem of poor accuracy in implementing congestion control in the existing solution and increase delay.
- the embodiment of the present application provides a congestion control method, which includes:
- the sending end device obtains the ACK message of the data packet from the receiving end device, where the ACK message contains detection information inserted by the switch into the data packet;
- the sending end device determines the bandwidth utilization rate according to the first detection information and the second detection information, where the first detection information is the detection information in the ACK packet corresponding to the next RTT interval, and the second detection information is The detection information in the ACK packet corresponding to the previous RTT interval;
- the sending end device adjusts the sending window according to the bandwidth utilization rate.
- the embodiment of the present application also provides a congestion control method, which includes:
- the switch receives the data packet sent by the sending end device, wherein the sending window for the sending end device to send the data packet is obtained by adjusting the sending end device according to the bandwidth utilization rate, and the bandwidth utilization rate is determined by the sending end device first.
- the detection information and the second detection information are determined;
- the switch inserts detection information into the data packet, and sends the data packet with the detection information inserted to the receiving end device, so that the receiving end device returns to the sending end device after receiving the data packet
- the ACK message of the data packet wherein the ACK message includes detection information inserted by the switch into the data packet, the first detection information is the detection information in the ACK message corresponding to the next RTT interval, and the The second detection information is the detection information in the ACK packet corresponding to the previous RTT interval.
- the embodiment of the present application also provides a sender device that implements congestion control, and the sender device includes:
- the receiving module is configured to obtain the ACK message of the data packet from the receiving end device, where the ACK message contains the detection information inserted by the switch into the data packet;
- the control module is configured to determine the bandwidth utilization rate according to the first detection information and the second detection information, wherein the first detection information is the detection information in the ACK packet corresponding to the next RTT interval, and the second detection information is The detection information in the ACK message corresponding to the last RTT interval, and adjusting the sending window according to the bandwidth utilization;
- the sending module sends data packets to the receiving end device based on the sending window.
- some embodiments of the present application also provide a computing device, which includes a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor At this time, the device is triggered to execute the congestion control method.
- the embodiment of the present application also provides a switch that implements congestion control, and the switch includes:
- the receiving module is configured to receive the data packet sent by the sending end device, wherein the sending window for the sending end device to send the data packet is obtained by adjusting the sending end device according to the bandwidth utilization rate, and the bandwidth utilization rate is determined by the sending end device.
- the first detection information and the second detection information of the end device are determined;
- the information insertion module is used to insert detection information into the data packet
- the sending module is configured to send the data packet with the detection information inserted to the receiving end device, so that the receiving end device returns the ACK message of the data packet to the sending end device after receiving the data packet,
- the ACK message includes detection information inserted by the switch into the data packet
- the first detection information is the detection information in the ACK message corresponding to the next RTT interval
- the second detection information is the previous RTT interval The detection information in the corresponding ACK packet.
- the switch inserts detection information into the data packet when transmitting data, and the sending end device can obtain the ACK packet of the data packet from the receiving end device.
- the detection information in the ACK packet is sent The end device performs calculations based on the first detection information in the ACK message corresponding to the next RTT interval and the second detection information in the ACK message corresponding to the previous RTT interval to determine the bandwidth utilization rate, and then according to the bandwidth utilization rate Adjust the sending window.
- the transmission window can be adjusted in a closed loop accordingly, which can adapt to different network congestion levels and make control It is more accurate, and does not rely on the queue in the whole process, and will not cause an increase in delay.
- Figure 1 is a schematic diagram of participants involved in a congestion control scheme
- FIG. 2 is a schematic diagram of a scenario involved in a congestion control solution in an embodiment of the application
- FIG. 3 is a schematic diagram of a format of INT information inserted by a switch into a data packet in an embodiment of the application
- FIG. 4 is a processing flowchart when the sending end device implements the congestion control method provided by an embodiment of the present application
- FIG. 5 is a processing logic flow diagram of a method for adjusting a sending window in an embodiment of the application
- FIG. 6 is a schematic structural diagram of a sending end device provided by an embodiment of this application.
- FIG. 7 is a schematic structural diagram of a computing device provided by an embodiment of this application.
- the terminal and the equipment serving the network all include one or more processors (CPU), input/output interfaces, network interfaces, and memory.
- processors CPU
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- Memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
- RAM random access memory
- ROM read-only memory
- flash RAM flash memory
- Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
- the information can be computer readable instructions, data structures, program devices, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic cassette type Magnetic tape, magnetic tape storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
- PRAM phase change memory
- SRAM static random access memory
- DRAM dynamic random access memory
- RAM random access memory
- ROM read-only memory
- EEPROM electrically erasable programmable read-only memory
- flash memory or other memory technology
- CD-ROM
- the embodiment of the present application provides a congestion control method.
- the method can use the detection information inserted into the data packet by the switch to calculate the bandwidth utilization at the beginning of each RTT, and adjust the sending window in a closed loop accordingly. It can adapt to different levels of network congestion, making the control more accurate, and does not rely on queues in the entire process, and will not cause an increase in delay.
- the process of congestion control involves three participants as shown in Figure 1, including a sender device (Sender), a receiver device (Receiver) and a switch (Switch).
- the sending end device is used to adjust the sending window according to the congestion control method provided in the embodiment of the present application, so as to control the congestion on the link.
- the switch is used to forward data packets sent by the sending end device, and insert detection information into the data packets one by one or sampling during the forwarding process, that is, the detection information can be inserted into each forwarded data packet, or it can be inserted in every N data packets.
- Package Select a data package to insert detection information.
- each switch can insert detection information in the data packet. For example, in the scenario shown in Figure 2, there are two switches Link-1 and Link-2, and the detection information inserted is INT (In-band Network Telemetry) information.
- INT In-band Network Telemetry
- the switch Link-1 will insert the INT information INT1 in it, and then the switch Link-2 will forward the data packet pkt, and the switch Link-2 will insert the INT information in it. INT2, and then send the data packet pkt to the receiver device Receiver.
- Figure 3 shows a format of the INT information inserted by the switch into the data packet in the embodiment of the present application, where the INT information includes the following parts: nHop is used to indicate the switch serial number, each switch is incremented by 1, and pathID is a hop-by-hop switch ID is the result of XOR (exclusive OR) operation.
- 1 st Hop and 2 nd Hop represent the B, ts, txBytes and qlen inserted by each switch respectively, where B is the port rate, and ts is the timestamp (time when INT information is inserted).
- txBytes is the sending data count of the sending queue, that is, the accumulated number of bytes sent by the port
- qLen is the length of the sending queue.
- other information can be added according to the specific conditions of the device, such as INT packet identification header, INT information category, and so on.
- the receiver device Receiver receives a data packet with detection information, generates an ACK message about the data packet, and feeds back the ACK to the sender device.
- the ACK message will carry the detection information inserted by the switch into the data packet. If multiple switches insert multiple detection information into the data packet, the ACK message will carry all the detection information. Taking the scenario shown in Figure 2 as an example, the ACK message returned by the receiving end device will carry both INT information INT1 and INT2 inserted by Link-1 and Link-2.
- Fig. 4 shows the processing flow when the sending end device implements the congestion control method provided by the embodiment of the present application, including the following processing steps:
- Step S401 Obtain the ACK message of the data packet from the receiving end device.
- the ACK message contains detection information inserted by the switch into the data packet, and the detection information is information that can be used to calculate and determine the bandwidth utilization of the link.
- the detection The information may be INT information including at least the length of the sending queue (qlen), the sending data count of the sending queue (txBytes), the insertion clock (ts), and the port rate (B).
- the data packet sent by the sender device is forwarded to the receiver device via the switch, and the switch can insert corresponding detection information into the data packet when forwarding, that is, during the interaction of the data packet, the switch performs the following processing to achieve congestion control:
- Switch Receive the data packet sent by the sending end device, insert detection information into the data packet, and send the data packet with the detection information inserted to the receiving end device.
- the receiving end device After receiving the data packet containing the detection information, the receiving end device will generate and return an ACK message about the data packet to the sending end device.
- the ACK message will carry the detection information in the data packet to facilitate the receiving end device
- the detection information can be obtained from the received ACK message, so as to realize congestion control based on this.
- the receiving end device may preferentially generate and return an ACK message for the data packet carrying detection information, so that the sending end device can obtain the detection information as soon as possible to achieve the purpose of rapid response.
- Step S402 Determine the bandwidth utilization rate according to the first detection information and the second detection information.
- the first detection information is detection information in an ACK packet corresponding to a next RTT interval
- the second detection information is detection information in an ACK packet corresponding to a previous RTT interval.
- the RTT refers to the time when a data packet is sent from the sending end device to the receiving end device and the receiving end device returns an ACK message
- the RTT interval indicates the time interval corresponding to the one RTT.
- the RTT interval can be distinguished in the following ways: First, when sending a data packet, record the sequence number snd_nxt of the data packet corresponding to the RTT interval, and the sequence number carried in the return of the ACK packet corresponding to each data packet is the receiving device The sequence number of the received packet is increased by 1. When the sending end device receives an ACK message, it can judge whether it has experienced an RTT interval according to the sequence number of the ACK message.
- the sending device when it is preparing to send a data packet with a sequence number of N, it can record the sequence number N of the data packet corresponding to the next RTT interval (that is, the RTT interval corresponding to the sending process of the data packet with the sequence number N).
- the receiving device receives a data packet with a sequence number of N, and will generate an ACK message with a sequence number of N+1, indicating that the receiving device expects to receive a data packet with a sequence number of N+1 next time. Therefore, the sender device will receive an ACK message with a sequence number of N+1, and by comparing the sequence number N+1 of the received ACK message and the sequence number N of the sent data packet, it can be determined whether an RTT has been experienced Interval. Taking the situation in this embodiment as an example, since N+1>N, it means that when the ACK message is received, an RTT interval has been passed.
- the transmission window can be updated once in each RTT interval.
- the bandwidth utilization When calculating bandwidth utilization, you can first calculate the amount of data that the link needs to process in the next RTT interval and the bandwidth-delay product (BDP, Bandwidth-Delay Product) of the link based on the first detection information and the second detection information. Then, according to the amount of data that the link needs to process in the next RTT interval and the bandwidth delay of the link, the bandwidth utilization can be calculated.
- the amount of data that needs to be processed in the next RTT interval represents the total amount of data that the link needs to process in the current RTT interval, that is, the amount of data in in-flight packets, and the bandwidth delay product of the link represents the chain The amount of data that the road can actually handle in an RTT interval. Therefore, by dividing the data volume of the in-flight packet by the BDP, the bandwidth utilization rate of the entire link can be obtained.
- the first detection information may be denoted as ack.L
- the second detection information may be denoted as L.
- ack.L After going through an RTT interval again, a new ack.L will be received, and the original ack.L will be used as the new L.
- Both ack.L and L can contain four types of information: qlen, txBytes, ts, and B to calculate bandwidth utilization.
- the detection information inserted by each switch can be marked as ack.L[i], L[i], where i represents a different switch, for example, the INT information inserted by the aforementioned Link-1 is ack. L[1] and L[1], the INT information inserted by Link-2 is ack.L[2] and L[2].
- the amount of data that needs to be processed in the next RTT interval and the bandwidth delay product of the link can be calculated in the following way: the data count and the second detection can be sent according to the sending queue in the first detection information
- the difference between the sending queue sending data count in the information, and the difference between the inserted clock in the first detection information and the inserted clock in the second detection information calculate the sending rate txRate, namely:
- txRate (ack.L[i].txBytes-L[i].txBytes)/(ack.L[i].ts–L[i].ts)
- the bandwidth utilization rate can be calculated as:
- the bandwidth utilization rate u calculated at this time is calculated based on the detection information corresponding to the two RTT intervals (that is, the previous RTT interval and the next RTT interval) to obtain the bandwidth utilization rate, which represents the bandwidth utilization in a short period of time As a result, it may be affected by changes in the network environment within a short period of time. Therefore, moving average processing can be performed based on the calculated bandwidth utilization rate to obtain an average bandwidth utilization rate that can more effectively represent the actual bandwidth utilization.
- the bandwidth utilization rate when calculating the bandwidth utilization rate according to the amount of data that the link needs to process in the next RTT interval and the bandwidth delay product of the link, you can first according to the link that needs to be processed in the next RTT interval. Calculate the first instantaneous bandwidth utilization rate of the data volume and the bandwidth delay product of the link, and the first instantaneous bandwidth utilization rate is the instantaneous bandwidth utilization rate u obtained by the current calculation. Then, moving average processing can be performed according to the first instantaneous bandwidth utilization rate and the second average bandwidth utilization rate to calculate the first average bandwidth utilization rate U.
- the first average bandwidth utilization rate is the average bandwidth utilization rate obtained by the current calculation
- the second average bandwidth utilization rate is the average bandwidth utilization rate obtained by the previous calculation.
- the following formula may be used to calculate the first average bandwidth utilization
- U' is the second average bandwidth utilization
- T is the baseline RTT value
- u is the first instantaneous bandwidth utilization.
- the second average bandwidth utilization rate in this calculation can be determined according to the actual transmission window, for example, If the sending end device uses full wire speed to send the entire data for a new data stream, the second average bandwidth utilization rate when calculating the first average bandwidth utilization rate in the first RTT interval can be set to 1.
- the first instantaneous bandwidth utilization rate may be determined before moving average processing is performed according to the first instantaneous bandwidth utilization rate and the second average bandwidth utilization rate to calculate the first average bandwidth utilization rate. Whether it is greater than the second instantaneous bandwidth utilization rate, and perform subsequent processing only when the judgment result is yes.
- the second instantaneous bandwidth utilization rate is the instantaneous bandwidth utilization rate obtained by the previous calculation. Therefore, the first average bandwidth utilization rate can be updated only when the bandwidth utilization rate in the previous RTT interval is higher.
- Step S403 Adjust the sending window according to the bandwidth utilization rate.
- the principle of adjusting the transmission window is as follows: if the bandwidth utilization is high, the transmission window can be appropriately slowed down; if the bandwidth utilization is low, the transmission window can be appropriately accelerated, that is, the transmission window can be increased.
- the sending window may be adjusted in the following manner: when the bandwidth utilization rate is greater than or equal to a preset utilization rate threshold, the sending window is multiplicatively reduced.
- multiplicative adjustment is to multiply the baseline value with a certain coefficient to achieve rapid increase or decrease.
- the preset utilization threshold can be set to U target
- the calculated bandwidth utilization is the aforementioned first average bandwidth utilization U.
- R c is the rate baseline value of each adjustment, that is, the R after the last adjustment or the initial value at the first adjustment
- the multiplicative adjustment coefficient is the ratio of the bandwidth utilization rate to the utilization rate threshold.
- the sending window can also be adjusted in the following ways:
- aiRate is a preset adjustment value that is preset to an order of magnitude smaller than R.
- R can be 100 Gbps
- aiRate can be within 100 Mbps.
- the sending window can be increased additively.
- additive adjustment means adding the baseline value to a certain coefficient to achieve a slow increase or decrease.
- the additive adjustment coefficient in the embodiment of the present application may be the preset adjustment value aiRate.
- the method of adjusting the sending window provided by the embodiment of the present application complies with the AIMD (Additive-Increase Multiplicative-Decrease) criterion, and thus can reflect fairness.
- AIMD Additional-Increase Multiplicative-Decrease
- the sending window when the number of times that the sending window is continuously increased additively is greater than or equal to the preset number, it generally indicates that there is still a large amount of unused bandwidth in the link, so the sending window can be quickly increased, that is, the sending window can be increased multiplicatively .
- Fig. 5 shows the processing logic of a method for adjusting the sending window in an embodiment of the present application.
- the bandwidth utilization rate will be calculated when each RTT interval is passed, so the adjustment of the sending window will also be carried out at the beginning of each RTT interval, so that congestion control can adapt to the degree of network congestion and The impact of different flows.
- this solution can determine the degree of network congestion more accurately. And it makes the convergence faster. Generally, convergence can be achieved in an RTT.
- this solution does not rely on queue feedback, but directly calculates bandwidth utilization based on the detection information inserted by the switch and adjusts the sending window, it does not increase network delay.
- ACK messages Due to some special circumstances in the actual scenario, for example, some transmission protocols cannot support the generation of ACK messages for every data packet, or some transmission protocols generate an ACK message after receiving multiple data packets, and do not even need to generate an ACK message.
- Messages such as RDMA READ
- ACK messages share a message queue with data packets during two-way data transmission, causing delays in INT information.
- a probe packet dedicated to carrying detection information can be used to obtain detection information.
- the probing packet can be used in the same five-tuple of the data packet, or a special five-tuple, but it is necessary to make it It can measure the congestion of the link.
- an embodiment of the present application also provides a sender device that implements congestion control.
- the method corresponding to the sender device is the congestion control method in the foregoing embodiment, and the principle of solving the problem is similar to this method. .
- the sender device When implementing congestion control, the sender device provided by the embodiment of the application can use the detection information inserted into the data packet by the switch to calculate the bandwidth utilization at the beginning of each RTT, and perform the transmission window accordingly Closed-loop adjustment can adapt to different levels of network congestion, making the control more accurate, and does not rely on queues in the entire process, and will not cause an increase in delay.
- the process of congestion control involves three participants as shown in Figure 1, including a sender device (Sender), a receiver device (Receiver) and a switch (Switch).
- the sending end device is used to adjust the sending window according to the congestion control method provided in the embodiment of the present application, so as to control the congestion on the link.
- the switch is used to forward data packets sent by the sending end device, and insert detection information into the data packets one by one or sampling during the forwarding process, that is, the detection information can be inserted into each forwarded data packet, or it can be inserted in every N data packets.
- Package Select a data package to insert detection information.
- each switch can insert detection information in the data packet. For example, in the scenario shown in Figure 2, there are two switches Link-1 and Link-2, and the detection information inserted is INT (In-band Network Telemetry) information.
- INT In-band Network Telemetry
- the switch Link-1 will insert the INT information INT1 in it, and then the switch Link-2 will forward the data packet pkt, and the switch Link-2 will insert the INT information in it. INT2, and then send the data packet pkt to the receiver device Receiver.
- Figure 3 shows a format of the INT information inserted by the switch into the data packet in the embodiment of the present application, where the INT information includes the following parts: nHop is used to indicate the switch serial number, each switch is incremented by 1, and pathID is a hop-by-hop switch ID is the result of XOR (exclusive OR) operation.
- 1 st Hop and 2 nd Hop represent the B, ts, txBytes and qlen inserted by each switch respectively, where B is the port rate, and ts is the timestamp (time when INT information is inserted).
- txBytes is the sending data count of the sending queue, that is, the accumulated number of bytes sent by the port
- qLen is the length of the sending queue.
- other information can be added according to the specific conditions of the device, such as INT packet identification header, INT information category, and so on.
- the receiver device Receiver receives a data packet with detection information, generates an ACK message about the data packet, and feeds back the ACK to the sender device.
- the ACK message will carry the detection information inserted by the switch into the data packet. If multiple switches insert multiple detection information into the data packet, the ACK message will carry all the detection information. Taking the scenario shown in Figure 2 as an example, the ACK message returned by the receiving end device will carry both INT information INT1 and INT2 inserted by Link-1 and Link-2.
- FIG. 6 shows a structure of a sending end device that implements congestion control provided by an embodiment of the present application, and includes a receiving module 610, a control module 620, and a sending module 630.
- the receiving module 610 is configured to obtain the ACK message of the data packet from the receiving end device
- the control module 620 is configured to determine the bandwidth utilization rate according to the first detection information and the second detection information, and adjust the transmission window according to the bandwidth utilization rate.
- the sending module 630 sends data packets to the receiving end device based on the sending window sending.
- the ACK message contains detection information inserted by the switch into the data packet, and the detection information is information that can be used to calculate and determine the bandwidth utilization of the link.
- the detection information may be It is INT information including at least the length of the sending queue (qlen), the sending data count of the sending queue (txBytes), the insertion clock (ts), and the port rate (B).
- the data packet sent by the sending end device is forwarded to the receiving end device via the switch, and the switch can insert corresponding detection information into the data packet when forwarding. That is, in the process of data packet interaction, the switch performs the following processing to achieve congestion control: the receiving module of the switch receives the data packet sent by the sending end device, the information insertion module of the switch inserts detection information into the data packet, and the switch’s The sending module sends the data packet with the detection information inserted to the receiving device. After receiving the data packet containing the detection information, the receiving end device will generate and return an ACK message about the data packet to the sending end device.
- the ACK message will carry the detection information in the data packet to facilitate the receiving end device
- the detection information can be obtained from the received ACK message, so as to realize congestion control based on this.
- the receiving end device may preferentially generate and return an ACK message for the data packet carrying detection information, so that the sending end device can obtain the detection information as soon as possible to achieve the purpose of rapid response.
- the first detection information is the detection information in the ACK packet corresponding to the next RTT interval
- the second detection information is the detection information in the ACK packet corresponding to the previous RTT interval.
- the RTT refers to the time when a data packet is sent from the sending end device to the receiving end device, and the receiving end device returns an ACK message
- the RTT interval indicates the time interval corresponding to the one RTT.
- the RTT interval can be distinguished in the following ways: First, when sending a data packet, record the sequence number snd_nxt of the data packet corresponding to the RTT interval, and the sequence number carried in the return of the ACK packet corresponding to each data packet is the receiving device The sequence number of the received packet is increased by 1. When the sending end device receives an ACK message, it can judge whether it has experienced an RTT interval according to the sequence number of the ACK message.
- the sending device when it is preparing to send a data packet with a sequence number of N, it can record the sequence number N of the data packet corresponding to the next RTT interval (that is, the RTT interval corresponding to the sending process of the data packet with the sequence number N).
- the receiving device receives a data packet with a sequence number of N, and will generate an ACK message with a sequence number of N+1, indicating that the receiving device expects to receive a data packet with a sequence number of N+1 next time. Therefore, the sender device will receive an ACK message with a sequence number of N+1, and by comparing the sequence number N+1 of the received ACK message and the sequence number N of the sent data packet, it can be determined whether an RTT has been experienced Interval. Taking the situation in this embodiment as an example, since N+1>N, it means that when the ACK message is received, an RTT interval has been passed.
- the control module may determine whether the received ACK message is the ACK message corresponding to the next RTT interval according to the sequence number of the ACK message. Text. If the judgment result is the ACK message corresponding to the next RTT interval, the subsequent steps are performed to update the sending window, otherwise no adjustment may be made or only a small adjustment may be made on the basis of the original sending window. As a result, the transmission window can be updated once in each RTT interval.
- the control module can first calculate the amount of data that the link needs to process in the next RTT interval and the bandwidth delay product (BDP, Bandwidth-Delay Product) based on the first detection information and the second detection information. ), and then the bandwidth utilization can be calculated according to the amount of data that the link needs to process in the next RTT interval and the bandwidth delay of the link.
- the amount of data that needs to be processed in the next RTT interval represents the total amount of data that the link needs to process in the current RTT interval, that is, the amount of data in in-flight packets
- the bandwidth delay product of the link represents the chain The amount of data that the road can actually handle in an RTT interval. Therefore, by dividing the data volume of the in-flight packet by the BDP, the bandwidth utilization rate of the entire link can be obtained.
- the first detection information may be denoted as ack.L
- the second detection information may be denoted as L.
- ack.L After going through an RTT interval again, a new ack.L will be received, and the original ack.L will be used as the new L.
- Both ack.L and L can contain four types of information: qlen, txBytes, ts, and B to calculate bandwidth utilization.
- the detection information inserted by each switch can be marked as ack.L[i], L[i], where i represents a different switch, for example, the INT information inserted by the aforementioned Link-1 is ack. L[1] and L[1], the INT information inserted by Link-2 is ack.L[2] and L[2].
- the control module can calculate the amount of data that needs to be processed in the next RTT interval and the bandwidth delay product of the link in the following way: it can send the data count and the first detection information according to the sending queue in the first detection information.
- the difference between the count of sending data in the sending queue in the detection information, and the difference between the inserted clock in the first detection information and the inserted clock in the second detection information calculate the sending rate txRate, namely:
- txRate (ack.L[i].txBytes-L[i].txBytes)/(ack.L[i].ts–L[i].ts)
- the control module can calculate the amount of data that the link needs to process in the next RTT interval according to the sending rate, the baseline RTT value, and the sending queue length in the first detection information, which is ack.L[i].qlen+ txRate ⁇ T, where T is the baseline RTT value.
- the bandwidth delay product ack.L[i].B ⁇ T of the link can be calculated according to the port rate and the baseline RTT value in the first detection information. From this, the bandwidth utilization rate can be calculated as:
- the bandwidth utilization rate u calculated at this time is calculated based on the detection information corresponding to the two RTT intervals (that is, the previous RTT interval and the next RTT interval) to obtain the bandwidth utilization rate, which represents the bandwidth utilization in a short period of time As a result, it may be affected by changes in the network environment within a short period of time. Therefore, moving average processing can be performed based on the calculated bandwidth utilization rate to obtain an average bandwidth utilization rate that can more effectively represent the actual bandwidth utilization.
- the control module when calculating the bandwidth utilization rate according to the amount of data that the link needs to process in the next RTT interval and the bandwidth delay product of the link, the control module may first according to the link in the next RTT interval The amount of data to be processed and the bandwidth delay product of the link are calculated to calculate the first instantaneous bandwidth utilization rate, where the first instantaneous bandwidth utilization rate is the instantaneous bandwidth utilization rate u obtained by the current calculation. Then, moving average processing can be performed according to the first instantaneous bandwidth utilization rate and the second average bandwidth utilization rate to calculate the first average bandwidth utilization rate U.
- the first average bandwidth utilization rate is the average bandwidth utilization rate obtained by the current calculation
- the second average bandwidth utilization rate is the average bandwidth utilization rate obtained by the previous calculation.
- the following formula may be used to calculate the first average bandwidth utilization rate
- U' is the second average bandwidth utilization
- T is the baseline RTT value
- u is the first instantaneous bandwidth utilization.
- the second average bandwidth utilization rate in this calculation can be determined according to the actual transmission window, for example, If the sending end device uses full wire speed to send the entire data for a new data stream, the second average bandwidth utilization rate when calculating the first average bandwidth utilization rate in the first RTT interval can be set to 1.
- control module may determine the first instantaneous bandwidth before performing sliding average processing according to the first instantaneous bandwidth utilization rate and the second average bandwidth utilization rate to calculate the first average bandwidth utilization rate. Whether the utilization rate is greater than the second instantaneous bandwidth utilization rate, and perform subsequent processing only when the judgment result is yes.
- the second instantaneous bandwidth utilization rate is the instantaneous bandwidth utilization rate obtained by the previous calculation. Therefore, the first average bandwidth utilization rate can be updated only when the bandwidth utilization rate in the previous RTT interval is higher.
- the principle of adjusting the sending window is as follows: if the bandwidth utilization is high, it can be appropriately slowed down, that is, the sending window can be reduced; if the bandwidth utilization is low, it can be appropriately accelerated, that is, the sending window can be increased.
- control module may adjust the sending window in the following manner: when the bandwidth utilization is greater than or equal to a preset utilization threshold, the sending window is multiplicatively reduced.
- multiplicative adjustment is to multiply the baseline value with a certain coefficient to achieve rapid increase or decrease.
- the preset utilization threshold can be set to U target
- the calculated bandwidth utilization is the aforementioned first average bandwidth utilization U.
- R c is the rate baseline value of each adjustment, that is, the R after the last adjustment or the initial value at the first adjustment
- the multiplicative adjustment coefficient is the ratio of the bandwidth utilization rate to the utilization rate threshold.
- the sending window can also be adjusted in the following ways:
- aiRate is a preset adjustment value that is preset to an order of magnitude smaller than R.
- R can be 100 Gbps
- aiRate can be within 100 Mbps.
- the sending window can be increased additively.
- additive adjustment means adding the baseline value to a certain coefficient to achieve a slow increase or decrease.
- the additive adjustment coefficient in the embodiment of the present application may be the preset adjustment value aiRate.
- the method of adjusting the sending window provided by the embodiment of the present application complies with the AIMD (Additive-Increase Multiplicative-Decrease) criterion, and thus can reflect fairness.
- AIMD Additional-Increase Multiplicative-Decrease
- the control module can quickly increase the sending window, that is, increase it multiplicatively. Send window.
- Fig. 5 shows the processing logic of a method for adjusting the sending window in an embodiment of the present application.
- the bandwidth utilization rate will be calculated when each RTT interval is passed, so the adjustment of the sending window will also be carried out at the beginning of each RTT interval, so that congestion control can adapt to the degree of network congestion and The impact of different flows.
- this solution can determine the degree of network congestion more accurately. And it makes the convergence faster. Generally, convergence can be achieved in an RTT.
- this solution does not rely on queue feedback, but directly calculates bandwidth utilization based on the detection information inserted by the switch and adjusts the sending window, it does not increase network delay.
- ACK messages Due to some special circumstances in the actual scenario, for example, some transmission protocols cannot support the generation of ACK messages for every data packet, or some transmission protocols generate an ACK message after receiving multiple data packets, and do not even need to generate an ACK message.
- Messages such as RDMA READ
- ACK messages share a message queue with data packets during two-way data transmission, causing delays in INT information.
- a probe packet dedicated to carrying detection information can be used to obtain detection information.
- the probing packet can be used in the same five-tuple of the data packet, or a special five-tuple, but it is necessary to make it It can measure the congestion of the link.
- a part of this application can be applied as a computer program product, such as computer program instructions, when executed by a computer, through the operation of the computer, the method and/or technical solution according to the application can be invoked or provided.
- the program instructions that call the method of the present application may be stored in a fixed or removable recording medium, and/or be transmitted through a data stream in a broadcast or other signal-bearing medium, and/or be stored in accordance with the program In the working memory of the computer equipment where the instructions are executed.
- some embodiments according to the present application include a computing device as shown in FIG.
- some embodiments of the present application also provide a computer-readable medium on which computer program instructions are stored, and the computer-readable instructions can be executed by a processor to implement the methods and methods of the foregoing multiple embodiments of the present application. / Or technical solutions.
- this application can be implemented in software and/or a combination of software and hardware, for example, it can be implemented by an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device.
- the software program of the present application may be executed by a processor to realize the above steps or functions.
- the software program (including related data structure) of the present application can be stored in a computer-readable recording medium, such as RAM memory, magnetic or optical drive or floppy disk and similar devices.
- some steps or functions of the present application may be implemented by hardware, for example, as a circuit that cooperates with a processor to execute each step or function.
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请提供了一种拥塞控制方法、设备及计算机可读介质。所述方法的一个实施例中,交换机在传输数据时会向数据包插入的检测信息,而发送端设备可以从接收端设备获取数据包的ACK报文,该ACK报文中所述检测信息,发送端设备根据下一个RTT区间对应的ACK报文中的第一检测信息以及上一个RTT区间对应的ACK报文中的第二检测信息进行计算,可以确定带宽利用率,进而根据所述带宽利用率调整发送窗口。由于本方案是在每个RTT开始时都可以利用交换机在传输数据时会向数据包插入的检测信息计算带宽利用率,据此对发送窗口进行闭环调整,能够适应不同的网络拥塞程度,使得控制更加准确,并且在整个过程中不依赖队列,不会造成延迟的增加。
Description
本申请要求2019年06月05日递交的申请号为201910487772.5、发明名称为“一种拥塞控制方法、设备及计算机可读介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及信息技术领域,尤其涉及一种拥塞控制方法、设备及计算机可读介质。
RDMA(Remote Direct Memory Access,远程直接内存访问)技术能够提供高带宽、低时延和低CPU负载的特性,在数据中心中的应用越来越广泛。RDMA在以太网上的实现标准叫RoCE(RDMA over Converged Ethernet),由于以太网不能保证不丢包,为了到达不丢包的目的,引入了PFC(Priority-Based Flow Control,基于优先级流量控制)技术。
然而,虽然PFC可以保证不丢包,但这个技术也存在相应的缺点,比如不公平、拥塞扩散和网络死锁等问题,所以在网络中需要尽量少的使用PFC。在这种需求下,出现了DCQCN(Data Center Quantized Congestion Notification)方案实现网络的拥塞控制。
DCQCN算法中涉及的参与方如图1所示,包括发送端设备(Sender),接收端设备(Receiver)和交换机(Switch)三个参与方。交换机负责转发从发送端设备到接收端设备的数据包。当交换机中的队列出现拥塞时,交换机在数据包上打上ECN(Explicit Congestion Notification)标识。当接收端设备收到带有ECN标识的数据包后,会相应地产生CNP(Congestion Notification Packets)报文告知发送端设备,从而引导发送端设备调整发送速度。DCQCN方案可以有效的在网络拥塞的早期控制发送端设备的吞吐量,从而避免大量PFC的出现。
但是,DCQCN算法具有深层次的设计缺陷,这种方案是一种开环的、模糊的、依靠队列的控制机制。
1)开环的控制是指,DCQCN的升速和减速的调整的时间周期、幅度,均是依据一组预设的固定参数。而这一组固定的参数无法适应于不同的网络拥塞场景以及网络流量的动态变化。
2)模糊的控制是指,DCQCN响应网络的拥塞状态,依据的是网络反馈的单一比特的ECN信号,因此算法对于网络拥塞的程度、变化,都不能做及时且精确的响应。
3)依靠队列的控制是指,DCQCN算法需要在网络中维护一个较大的队列,并且依靠队列变化来反馈一个模糊的网络拥塞的程度,但是这就造成了网络端到端延迟的增加,同RDMA提供低延迟网络的初衷是违背的。
此外,还有DCTCP(Data Center TCP)、Timely以及如BBR、CUBIC等通用的拥塞控制算法。其中,DCTCP算法同样需要利用ECN标识,并且依靠队列变化来反馈一个模糊的网络拥塞的程度,因此导致该算法对于网络拥塞的程度、变化,都不能做及时且精确的响应,并且会造成了网络端到端延迟的增加。
Timely算法是利用网卡硬件测量网络的RTT(Round-Trip Time)值,从而检测并控制拥塞的算法。该算法的核心思想是基于硬件的RTT测量从而排除掉软件层面影响,因此条件下测量的RTT值仅仅包含网络传输的延迟。在获得RTT值之后,可以根据RTT值的大小执行增速或者减速,此外还可以根据RTT值的变化方向进行动态调整。该算法的不足在于:首先,需要依赖于网络拥塞造成网络排队的增加,因此其同样需要在网络中维护一个较大的队列,并且依靠队列变化来反馈网络拥塞的程度,但是这就造成了网络端到端延迟的增加;其次,Timely算法的拥塞调整手段拥塞收敛较慢;最后,依靠RTT调整拥塞会受反向拥塞的影响,且有网络公平性的问题。
而BBR、CUBIC等通用的拥塞控制算法的主要问题在于拥塞的检测仅仅是基于丢包,而往往这种检测存在滞后性,若网络有大量的排队延迟,在网络发生丢包减速前,拥塞的影响已经造成。并且丢包重传也会造成延迟,甚至超时(timeout),因此拥塞控制的整体效果不佳。
发明内容
本申请的一个目的是提供一种拥塞控制方案,用以解决现有方案在实现拥塞控制时准确性不佳,且会造成延迟增加的问题。
本申请实施例提供了一种拥塞控制方法,该方法包括:
发送端设备从接收端设备获取数据包的ACK报文,其中,所述ACK报文中包含交换机向数据包插入的检测信息;
所述发送端设备根据第一检测信息和第二检测信息确定带宽利用率,其中,所述第一检测信息为下一个RTT区间对应的ACK报文中的检测信息,所述第二检测信息为上 一个RTT区间对应的ACK报文中的检测信息;
所述发送端设备根据所述带宽利用率调整发送窗口。
本申请实施例还提供了一种拥塞控制方法,该方法包括:
交换机接收由发送端设备发送的数据包,其中,所述发送端设备发送数据包的发送窗口由所述发送端设备根据带宽利用率调整获得,所述带宽利用率由所述发送端设备第一检测信息和第二检测信息确定;
所述交换机向所述数据包中插入检测信息,并将插入检测信息后的数据包发送至接收端设备,以使所述接收端设备在接收到所述数据包后向所述发送端设备返回所述数据包的ACK报文,其中,所述ACK报文中包含交换机向数据包插入的检测信息,所述第一检测信息为下一个RTT区间对应的ACK报文中的检测信息,所述第二检测信息为上一个RTT区间对应的ACK报文中的检测信息。
本申请实施例还提供了一种实现拥塞控制的发送端设备,该发送端设备包括:
接收模块,用于从接收端设备获取数据包的ACK报文,其中,所述ACK报文中包含交换机向数据包插入的检测信息;
控制模块,用于根据第一检测信息和第二检测信息确定带宽利用率,其中,所述第一检测信息为下一个RTT区间对应的ACK报文中的检测信息,所述第二检测信息为上一个RTT区间对应的ACK报文中的检测信息,以及根据所述带宽利用率调整发送窗口;
发送模块,基于发送窗口发送向接收端设备发送数据包。
此外,本申请的一些实施例还提供了一种计算设备,该设备包括用于存储计算机程序指令的存储器和用于执行计算机程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述设备执行所述的拥塞控制方法。
本申请实施例还提供了一种实现拥塞控制的交换机,该交换机包括:
接收模块,用于接收由发送端设备发送的数据包,其中,所述发送端设备发送数据包的发送窗口由所述发送端设备根据带宽利用率调整获得,所述带宽利用率由所述发送端设备第一检测信息和第二检测信息确定;
信息插入模块,用于向所述数据包中插入检测信息,
发送模块,用于将插入检测信息后的数据包发送至接收端设备,以使所述接收端设备在接收到所述数据包后向所述发送端设备返回所述数据包的ACK报文,其中,所述ACK报文中包含交换机向数据包插入的检测信息,所述第一检测信息为下一个RTT区间对应的ACK报文中的检测信息,所述第二检测信息为上一个RTT区间对应的ACK报 文中的检测信息。
本申请的另一些实施例还提供了一种计算机可读介质,其上存储有计算机程序指令,所述计算机可读指令可被处理器执行以实现所述的拥塞控制方法。
本申请实施例提供方案中,交换机在传输数据时会向数据包插入的检测信息,而发送端设备可以从接收端设备获取数据包的ACK报文,该ACK报文中所述检测信息,发送端设备根据下一个RTT区间对应的ACK报文中的第一检测信息以及上一个RTT区间对应的ACK报文中的第二检测信息进行计算,可以确定带宽利用率,进而根据所述带宽利用率调整发送窗口。由于本方案是在每个RTT开始时都可以利用交换机在传输数据时会向数据包插入的检测信息计算带宽利用率,据此对发送窗口进行闭环调整,能够适应不同的网络拥塞程度,使得控制更加准确,并且在整个过程中不依赖队列,不会造成延迟的增加。
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1为拥塞控制方案中涉及的参与方的示意图;
图2为本申请实施例中一种拥塞控制方案所涉及的场景示意图;
图3为本申请实施例中交换机对数据包插入的INT信息的一种格式示意图;
图4为发送端设备在实现本申请实施例提供的拥塞控制方法时的处理流程图;
图5为本申请实施例中一种调整发送窗口的方式的处理逻辑流图;
图6为本申请实施例提供的一种发送端设备的结构示意图;
图7为本申请实施例提供的一种计算设备的结构示意图;
附图中相同或相似的附图标记代表相同或相似的部件。
下面结合附图对本申请作进一步详细描述。
在本申请一个典型的配置中,终端、服务网络的设备均包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和 /或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体,可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的装置或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。
本申请实施例提供了一种拥塞控制方法,该方法在每个RTT开始时都可以利用交换机在传输数据时会向数据包插入的检测信息计算带宽利用率,据此对发送窗口进行闭环调整,能够适应不同的网络拥塞程度,使得控制更加准确,并且在整个过程中不依赖队列,不会造成延迟的增加。
在实际场景中,拥塞控制的过程中涉及如图1所示的三个参与方,包括发送端设备(Sender),接收端设备(Receiver)和交换机(Switch)。其中,发送端设备用于根据本申请实施例中提供的拥塞控制方法来调整发送窗口,以对链路上的拥塞情况进行控制。
交换机用于转发发送端设备发出的数据包,并在转发过程中逐个或者抽样在数据包中插入检测信息,即可以对每个转发的数据包都插入检测信息,或者也可以在每N个数据包选择一个数据包插入检测信息。此外,当链路中存在多个交换机时,每个交换机都可以在数据包中插入检测信息。例如在图2所示的场景中,包含两个交换机Link-1和Link-2,其插入的检测信息为INT(In-band Network Telemetry)信息,当发送端设备Sender发送数据包pkt后,首先由交换机Link-1转发该数据包pkt,此时交换机Link-1会在其中插入INT信息INT1,然后再由交换机Link-2转发该数据包pkt,此时交换机Link-2会在其中插入INT信息INT2,再将数据包pkt发送给接收端设备Receiver。
图3示出了本申请实施例中交换机对数据包插入的INT信息的一种格式,其中,INT信息包括以下几部分:nHop用于表示交换机序号,每个交换机加1,pathID是 逐跳交换机ID进行XOR(异或)运算后的结果,1
st Hop、2
nd Hop分别表示各个交换机插入的B、ts、txBytes和qlen,其中,B是端口速率,ts是插入INT信息时的timestamp(时间戳),即插入时钟,txBytes是发送队列发送数据计数,即累积的端口发送字节数,qLen是发送队列长度。在实际场景中,根据设备的具体情况,还可以增加其它信息,例如INT包识别头、INT信息类别等等。
接收端设备Receiver接收带有检测信息的数据包,会产生关于该数据包的ACK报文,并将该ACK反馈至发送端设备。该ACK报文中会携带交换机向数据包中插入的检测信息,若有多个交换机向数据包中插入了多个检测信息,ACK报文中会携带所有的检测信息。以图2所示的场景为例,接收端设备返回的ACK报文中,会同时携带Link-1和Link-2插入的INT信息INT1和INT2。
图4示出了发送端设备在实现本申请实施例提供的拥塞控制方法时的处理流程,包括以下处理步骤:
步骤S401,从接收端设备获取数据包的ACK报文。其中,所述ACK报文中包含交换机向数据包插入的检测信息,所述检测信息是能够用于计算确定链路的带宽利用率的信息,例如在本申请的一些实施例中,所述检测信息可以是至少包括了发送队列长度(qlen)、发送队列发送数据计数(txBytes)、插入时钟(ts)和端口速率(B)的INT信息。
发送端设备发出的数据包经由交换机转发至接收端设备,交换机在转发时可以向数据包中插入相应的检测信息,即在数据包的交互过程中,交换机执行以下的处理以实现拥塞控制:交换机接收由发送端设备发送的数据包,向所述数据包中插入检测信息,并将插入检测信息后的数据包发送至接收端设备。接收端设备在获取到包含检测信息的数据包之后,会产生并向发送端设备返回关于该数据包的ACK报文,该ACK报文中会携带数据包中的检测信息,以便于接收端设备能够从收到的ACK报文获得检测信息,从而以此为依据实现拥塞控制。为了确保拥塞控制的实时性,接收端设备对于携带检测信息的数据包,可以优先产生并返回ACK报文,以使发送端设备能够尽快获得检测信息,以达到迅速响应的目的。
步骤S402,根据第一检测信息和第二检测信息确定带宽利用率。其中,所述第一检测信息为下一个RTT区间对应的ACK报文中的检测信息,所述第二检测信息为上一个RTT区间对应的ACK报文中的检测信息。所述RTT是指从发送端设备发送一 个数据包到达接收端设备,并收到接收端设备返回ACK报文的时间,RTT区间则表示该一个RTT所对应的时间区间。
RTT区间的区分可以采用如下的方式:首先,在发送数据包时记录下一个RTT区间对应数据包的序列号snd_nxt,而每个数据包对应的ACK报文返回时携带的序列号是接收端设备收到的数据包序列号加1。当发送端设备收到ACK报文时,可以根据ACK报文的序列号判断是否经历了一个RTT区间。
例如,发送端设备在准备发送序列号为N的数据包时,可以记录下一个RTT区间(即该序列号为N的数据包的发送过程所对应的RTT区间)对应的数据包的序列号N,接收端设备收到序列号为N的数据包,会产生序列号为N+1的ACK报文,表示接收端设备下一次期待收到序列号为N+1的数据包。由此,发送端设备会收到序列号为N+1的ACK报文,通过比较收到ACK报文的序列号N+1以及发出的数据包的序列号N,可以确定是否经历了一个RTT区间。以本实施例中的情况为例,由于N+1>N,则表示收到的ACK报文时,已经经历了一个RTT区间。
在本申请的一些实施例中,可以在从接收端设备获取数据包的ACK报文之后,根据ACK报文的序列号判断接收到的ACK报文是否为下一个RTT区间对应的ACK报文。若判断结果为下一个RTT区间对应的ACK报文,则执行后续步骤更新发送窗口,否则可以不做调整或者仅在原发送窗口的基础上进行小幅度的调整。由此,可以在每个RTT区间更新一次发送窗口。
在计算带宽利用率时,可以先基于根据第一检测信息和第二检测信息,计算链路在下一个RTT区间中需要处理的数据量和链路的带宽延迟积(BDP,Bandwidth-Delay Product),然后根据链路在下一个RTT区间中需要处理的数据量以及链路的带宽延迟,可以计算带宽利用率。其中,下一个RTT区间中需要处理的数据量表示了链路在当前的RTT区间中还需要处理的数据总量,即in-flight包的数据量,而链路的带宽延迟积则表示了链路在一个RTT区间中实际可以处理的数据量。由此,利用in-flight包的数据量除以BDP,就可以获得整个链路的带宽利用率。
例如,在本申请实施例中可以将第一检测信息可以记作ack.L,将第二检测信息可以记作L。当再次经历一个RTT区间之后,会收到新的ack.L,而原来的ack.L将作为新的L。ack.L和L中都可以包含qlen、txBytes、ts、B四种信息,以用于计算带宽利用率。对于包含多个交换机的场景,对于各个交换机插入的检测信息,可 以记为ack.L[i]、L[i],i表示不同的交换机,例如前述Link-1插入的INT信息即为ack.L[1]和L[1],Link-2插入的INT信息即为ack.L[2]和L[2]。
对于各个交换机所插入的检测信息,可以采用如下的方式计算下一个RTT区间中需要处理的数据量以及链路的带宽延迟积:可以根据第一检测信息中的发送队列发送数据计数和第二检测信息中的发送队列发送数据计数之差,以及第一检测信息中的插入时钟和第二检测信息中的插入时钟之差,计算发送速率txRate,即:
txRate=(ack.L[i].txBytes-L[i].txBytes)/(ack.L[i].ts–L[i].ts)
而后,可以根据所述发送速率、基线RTT值和第一检测信息中的发送队列长度,计算链路在下一个RTT区间中需要处理的数据量,即为ack.L[i].qlen+txRate×T,其中,T为基线RTT值。此外,可以根据第一检测信息中的端口速率和基线RTT值,计算链路的带宽延迟积ack.L[i].B×T。由此可以计算出带宽利用率为:
u=(ack.L[i].qlen+txRate×T)/ack.L[i].B×T
=ack.L[i].qlen/(ack.L[i].B×T)+txRate/ack.L[i].B
由于此时计算获得带宽利用率u是基于两个RTT区间(即前一个RTT区间和下一个RTT区间)对应的检测信息计算获得带宽利用率,该带宽利用率表示了短时间内的带宽利用情况,其结果有可能会收到短时间内的网络环境变化影响。因此,可以基于计算获得的该带宽利用率进行滑动平均处理,以获得能够更加有效地表示实际带宽利用情况的平均带宽利用率。
由此,本申请的一些实施例中,在根据链路在下一个RTT区间中需要处理的数据量以及链路的带宽延迟积计算带宽利用率时,可以先根据链路在下一个RTT区间中需要处理的数据量以及链路的带宽延迟积,计算第一瞬时带宽利用率,该第一瞬时带宽利用率为当前计算获得的瞬时带宽利用率u。然后可以根据第一瞬时带宽利用率和第二平均带宽利用率进行滑动平均处理,计算第一平均带宽利用率U。其中,所述第一平均带宽利用率为当前计算获得的平均带宽利用率,所述第二平均带宽利用率为上一次计算获得的平均带宽利用率。在本申请的一些实施例中,可以采用如下的公式计算第一平均带宽利用率
U=(1-τ/T)×U'+τ/T×u
其中,U'为第二平均带宽利用率,T为基线RTT值,τ为(ack.L[i].ts–L[i].ts)与T中的较小值,即τ=min(ack.L[i].ts–L[i].ts,T),u为第一瞬时带宽利用率。 在此,本领域技术人员应当理解,上述计算第一平均带宽利用率的方式仅为举例,现有或今后出现的基于类似原理的其它方式如果能够适用于本申请,也应该包含在本申请的保护范围内,并以引用的形式包含于此。
在实际场景中,对于第一个RTT区间,由于不存在上一次计算获得的平均带宽利用率,因此,该次计算时的第二平均带宽利用率可以根据实际发送窗口的情况进行确定,例如,若发送端设备对于一个新的数据流都采用满线速发送整个数据,此时在第一个RTT区间计算第一平均带宽利用率时的第二平均带宽利用率可以设定为1。
在本申请的一些实施例中,可以在根据第一瞬时带宽利用率和第二平均带宽利用率进行滑动平均处理,计算第一平均带宽利用率之前,判断所述第一瞬时带宽利用率是否大于第二瞬时带宽利用率,并仅在判断结果为是时执行后续处理。其中,所述第二瞬时带宽利用率为上一次计算获得的瞬时带宽利用率。由此,可以仅在比上一个RTT区间的带宽利用率更高时,更新第一平均带宽利用率。
步骤S403,根据所述带宽利用率调整发送窗口。其中,调整发送窗口的原则如下:若带宽利用率较高,则可以适当减速,即减小发送窗口;若带宽利用率较低,则可以适当加速,即增大发送窗口。
在本申请的一些实施例中,可以采用如下的方式调整发送窗口:当所述带宽利用率大于等于预设的利用率阈值时,乘性地减小发送窗口。其中,乘性地调整即为将基线值与某一系数相乘,以实现快速的增大或减小。例如,本实施例中可以设置预设的利用率阈值为U
target,计算获得的带宽利用率为前述的第一平均带宽利用率U,当U≥U
target时,可以采用如下的公式计算发送窗口W:
R=R
c/(U/U
target)
W=R×T
其中,R
c为每次调整的速率基线值,即上一次调整后的R或者第一次调整时的初始值,乘性的调整系数为带宽利用率与利用率阈值之比。在本申请的另一些实施中,还可以采用如下方式调整发送窗口:
R=R
c/(U/U
target)+aiRate
W=R×T
其中,aiRate为预先设置的数量级小于R的预设调整值,例如在万兆以太网场 景下,R可以是100Gbps,而aiRate可以是100Mbps以内。
而当所述带宽利用率小于预设的利用率阈值时,可以加性地增大发送窗口。其中,加性地调整即为将基线值与某一系数相加,以实现慢速的增大或减小。例如,本申请实施例中加性的调整系数可以是预设调整值aiRate,当U<U
target时,可以采用如下的公式计算发送窗口W:
R=R
c+aiRate
W=R×T
由此,本申请实施例提供的调整发送窗口的方式服从AIMD(Additive-Increase Multiplicative-Decrease)准则,从而能够体现公平性。
此外,当连续加性地增大发送窗口的次数大于等于预设次数时,此时一般表示链路还有大量带宽未被利用,因此可以快速增大发送窗口,即乘性地增大发送窗口。
在实际场景中,可以设置一个参数incStage,在每次加性地增大发送窗口后,该参数incStage自增1,在每次乘性地减小发送窗口后,该参数incStage置0,由此可以在通过比较该参数incStage与预设次数maxStage,来确定是否需要乘性地增大发送窗口。图5示出了本申请实施例中一种调整发送窗口的方式的处理逻辑。
由于本申请实施例的方案中,带宽利用率会在经过每个RTT区间时进行计算,因此调整发送窗口也会在每个RTT区间开始时进行,由此使得拥塞控制能够适应网络拥塞的程度和不同流量的影响。并且,由于发送窗口的调整是依赖于网络的拥塞情况,即发送队列长度、发送队列发送数据计数、时钟等,相对于单依靠单一的ECN信息,本方案能够更加精准的确定网络的拥塞程度,而且使得收敛更加快速,一般可以在一个RTT实现收敛。此外,由于本方案并不依赖队列的反馈,而是基于交换机插入的检测信息直接计算带宽利用率进而调整发送窗口,因此不会增加网络延迟。
由于实际场景中可能存在一些特殊情况,例如部分传输协议无法支持每个数据包都产生ACK报文,或者部分传输协议会在收到多个数据包才产生一个ACK报文,甚至不需要产生ACK报文(如RDMA READ),或者在双向数据传输时ACK报文会与数据包共享一个消息队列造成INT信息的延迟等。在这些场景下,可以使用专用于携带检测信息的探测数据包(probing包)来获取检测信息,probing包可以使用于数据包相同的五元组,或者特殊的五元组,但都需要使其能够测量链路的拥塞情况。
基于同一发明构思,本申请实施例中还提供了一种实现拥塞控制的发送端设备, 所述发送端设备对应的方法是前述实施例中拥塞控制方法,并且其解决问题的原理与该方法相似。
本申请实施例提供的一种发送端设备在实现拥塞控制时,在每个RTT开始时都可以利用交换机在传输数据时会向数据包插入的检测信息计算带宽利用率,据此对发送窗口进行闭环调整,能够适应不同的网络拥塞程度,使得控制更加准确,并且在整个过程中不依赖队列,不会造成延迟的增加。
在实际场景中,拥塞控制的过程中涉及如图1所示的三个参与方,包括发送端设备(Sender),接收端设备(Receiver)和交换机(Switch)。其中,发送端设备用于根据本申请实施例中提供的拥塞控制方法来调整发送窗口,以对链路上的拥塞情况进行控制。
交换机用于转发发送端设备发出的数据包,并在转发过程中逐个或者抽样在数据包中插入检测信息,即可以对每个转发的数据包都插入检测信息,或者也可以在每N个数据包选择一个数据包插入检测信息。此外,当链路中存在多个交换机时,每个交换机都可以在数据包中插入检测信息。例如在图2所示的场景中,包含两个交换机Link-1和Link-2,其插入的检测信息为INT(In-band Network Telemetry)信息,当发送端设备Sender发送数据包pkt后,首先由交换机Link-1转发该数据包pkt,此时交换机Link-1会在其中插入INT信息INT1,然后再由交换机Link-2转发该数据包pkt,此时交换机Link-2会在其中插入INT信息INT2,再将数据包pkt发送给接收端设备Receiver。
图3示出了本申请实施例中交换机对数据包插入的INT信息的一种格式,其中,INT信息包括以下几部分:nHop用于表示交换机序号,每个交换机加1,pathID是逐跳交换机ID进行XOR(异或)运算后的结果,1
st Hop、2
nd Hop分别表示各个交换机插入的B、ts、txBytes和qlen,其中,B是端口速率,ts是插入INT信息时的timestamp(时间戳),即插入时钟,txBytes是发送队列发送数据计数,即累积的端口发送字节数,qLen是发送队列长度。在实际场景中,根据设备的具体情况,还可以增加其它信息,例如INT包识别头、INT信息类别等等。
接收端设备Receiver接收带有检测信息的数据包,会产生关于该数据包的ACK报文,并将该ACK反馈至发送端设备。该ACK报文中会携带交换机向数据包中插入的检测信息,若有多个交换机向数据包中插入了多个检测信息,ACK报文中会携带所 有的检测信息。以图2所示的场景为例,接收端设备返回的ACK报文中,会同时携带Link-1和Link-2插入的INT信息INT1和INT2。
图6示出了本申请实施例提供的一种实现拥塞控制的发送端设备的结构,包括接收模块610、控制模块620和发送模块630。接收模块610用于从接收端设备获取数据包的ACK报文,控制模块620用于根据第一检测信息和第二检测信息确定带宽利用率,以及根据所述带宽利用率调整发送窗口。发送模块630基于发送窗口发送向接收端设备发送数据包。
所述ACK报文中包含交换机向数据包插入的检测信息,所述检测信息是能够用于计算确定链路的带宽利用率的信息,例如在本申请的一些实施例中,所述检测信息可以是至少包括了发送队列长度(qlen)、发送队列发送数据计数(txBytes)、插入时钟(ts)和端口速率(B)的INT信息。
发送端设备发出的数据包经由交换机转发至接收端设备,交换机在转发时可以向数据包中插入相应的检测信息。即在数据包的交互过程中,交换机执行以下的处理以实现拥塞控制:交换机的接收模块接收由发送端设备发送的数据包,交换机的信息插入模块向所述数据包中插入检测信息,交换机的发送模块将插入检测信息后的数据包发送至接收端设备。接收端设备在获取到包含检测信息的数据包之后,会产生并向发送端设备返回关于该数据包的ACK报文,该ACK报文中会携带数据包中的检测信息,以便于接收端设备能够从收到的ACK报文获得检测信息,从而以此为依据实现拥塞控制。为了确保拥塞控制的实时性,接收端设备对于携带检测信息的数据包,可以优先产生并返回ACK报文,以使发送端设备能够尽快获得检测信息,以达到迅速响应的目的。
所述第一检测信息为下一个RTT区间对应的ACK报文中的检测信息,所述第二检测信息为上一个RTT区间对应的ACK报文中的检测信息。所述RTT是指从发送端设备发送一个数据包到达接收端设备,并收到接收端设备返回ACK报文的时间,RTT区间则表示该一个RTT所对应的时间区间。
RTT区间的区分可以采用如下的方式:首先,在发送数据包时记录下一个RTT区间对应数据包的序列号snd_nxt,而每个数据包对应的ACK报文返回时携带的序列号是接收端设备收到的数据包序列号加1。当发送端设备收到ACK报文时,可以根据ACK报文的序列号判断是否经历了一个RTT区间。
例如,发送端设备在准备发送序列号为N的数据包时,可以记录下一个RTT区间(即该序列号为N的数据包的发送过程所对应的RTT区间)对应的数据包的序列号N,接收端设备收到序列号为N的数据包,会产生序列号为N+1的ACK报文,表示接收端设备下一次期待收到序列号为N+1的数据包。由此,发送端设备会收到序列号为N+1的ACK报文,通过比较收到ACK报文的序列号N+1以及发出的数据包的序列号N,可以确定是否经历了一个RTT区间。以本实施例中的情况为例,由于N+1>N,则表示收到的ACK报文时,已经经历了一个RTT区间。
在本申请的一些实施例中,控制模块可以在从接收端设备获取数据包的ACK报文之后,根据ACK报文的序列号判断接收到的ACK报文是否为下一个RTT区间对应的ACK报文。若判断结果为下一个RTT区间对应的ACK报文,则执行后续步骤更新发送窗口,否则可以不做调整或者仅在原发送窗口的基础上进行小幅度的调整。由此,可以在每个RTT区间更新一次发送窗口。
在计算带宽利用率时,控制模块可以先基于根据第一检测信息和第二检测信息,计算链路在下一个RTT区间中需要处理的数据量和链路的带宽延迟积(BDP,Bandwidth-Delay Product),然后根据链路在下一个RTT区间中需要处理的数据量以及链路的带宽延迟,可以计算带宽利用率。其中,下一个RTT区间中需要处理的数据量表示了链路在当前的RTT区间中还需要处理的数据总量,即in-flight包的数据量,而链路的带宽延迟积则表示了链路在一个RTT区间中实际可以处理的数据量。由此,利用in-flight包的数据量除以BDP,就可以获得整个链路的带宽利用率。
例如,在本申请实施例中可以将第一检测信息可以记作ack.L,将第二检测信息可以记作L。当再次经历一个RTT区间之后,会收到新的ack.L,而原来的ack.L将作为新的L。ack.L和L中都可以包含qlen、txBytes、ts、B四种信息,以用于计算带宽利用率。对于包含多个交换机的场景,对于各个交换机插入的检测信息,可以记为ack.L[i]、L[i],i表示不同的交换机,例如前述Link-1插入的INT信息即为ack.L[1]和L[1],Link-2插入的INT信息即为ack.L[2]和L[2]。
对于各个交换机所插入的检测信息,控制模块可以采用如下的方式计算下一个RTT区间中需要处理的数据量以及链路的带宽延迟积:可以根据第一检测信息中的发送队列发送数据计数和第二检测信息中的发送队列发送数据计数之差,以及第一检测信息中的插入时钟和第二检测信息中的插入时钟之差,计算发送速率txRate,即:
txRate=(ack.L[i].txBytes-L[i].txBytes)/(ack.L[i].ts–L[i].ts)
而后,控制模块可以根据所述发送速率、基线RTT值和第一检测信息中的发送队列长度,计算链路在下一个RTT区间中需要处理的数据量,即为ack.L[i].qlen+txRate×T,其中,T为基线RTT值。此外,可以根据第一检测信息中的端口速率和基线RTT值,计算链路的带宽延迟积ack.L[i].B×T。由此可以计算出带宽利用率为:
u=(ack.L[i].qlen+txRate×T)/ack.L[i].B×T
=ack.L[i].qlen/(ack.L[i].B×T)+txRate/ack.L[i].B
由于此时计算获得带宽利用率u是基于两个RTT区间(即前一个RTT区间和下一个RTT区间)对应的检测信息计算获得带宽利用率,该带宽利用率表示了短时间内的带宽利用情况,其结果有可能会收到短时间内的网络环境变化影响。因此,可以基于计算获得的该带宽利用率进行滑动平均处理,以获得能够更加有效地表示实际带宽利用情况的平均带宽利用率。
由此,本申请的一些实施例中,在根据链路在下一个RTT区间中需要处理的数据量以及链路的带宽延迟积计算带宽利用率时,控制模块可以先根据链路在下一个RTT区间中需要处理的数据量以及链路的带宽延迟积,计算第一瞬时带宽利用率,该第一瞬时带宽利用率为当前计算获得的瞬时带宽利用率u。然后可以根据第一瞬时带宽利用率和第二平均带宽利用率进行滑动平均处理,计算第一平均带宽利用率U。其中,所述第一平均带宽利用率为当前计算获得的平均带宽利用率,所述第二平均带宽利用率为上一次计算获得的平均带宽利用率。在本申请的一些实施例中,可以采用如下的公式计算第一平均带宽利用率
U=(1-τ/T)×U'+τ/T×u
其中,U'为第二平均带宽利用率,T为基线RTT值,τ为(ack.L[i].ts–L[i].ts)与T中的较小值,即τ=min(ack.L[i].ts–L[i].ts,T),u为第一瞬时带宽利用率。在此,本领域技术人员应当理解,上述计算第一平均带宽利用率的方式仅为举例,现有或今后出现的基于类似原理的其它方式如果能够适用于本申请,也应该包含在本申请的保护范围内,并以引用的形式包含于此。
在实际场景中,对于第一个RTT区间,由于不存在上一次计算获得的平均带宽利用率,因此,该次计算时的第二平均带宽利用率可以根据实际发送窗口的情况进行确定,例如,若发送端设备对于一个新的数据流都采用满线速发送整个数据,此 时在第一个RTT区间计算第一平均带宽利用率时的第二平均带宽利用率可以设定为1。
在本申请的一些实施例中,控制模块可以在根据第一瞬时带宽利用率和第二平均带宽利用率进行滑动平均处理,计算第一平均带宽利用率之前,判断所述第一瞬时带宽利用率是否大于第二瞬时带宽利用率,并仅在判断结果为是时执行后续处理。其中,所述第二瞬时带宽利用率为上一次计算获得的瞬时带宽利用率。由此,可以仅在比上一个RTT区间的带宽利用率更高时,更新第一平均带宽利用率。
调整发送窗口的原则如下:若带宽利用率较高,则可以适当减速,即减小发送窗口;若带宽利用率较低,则可以适当加速,即增大发送窗口。
在本申请的一些实施例中,控制模块可以采用如下的方式调整发送窗口:当所述带宽利用率大于等于预设的利用率阈值时,乘性地减小发送窗口。其中,乘性地调整即为将基线值与某一系数相乘,以实现快速的增大或减小。例如,本实施例中可以设置预设的利用率阈值为U
target,计算获得的带宽利用率为前述的第一平均带宽利用率U,当U≥U
target时,可以采用如下的公式计算发送窗口W:
R=R
c/(U/U
target)
W=R×T
其中,R
c为每次调整的速率基线值,即上一次调整后的R或者第一次调整时的初始值,乘性的调整系数为带宽利用率与利用率阈值之比。在本申请的另一些实施中,还可以采用如下方式调整发送窗口:
R=R
c/(U/U
target)+aiRate
W=R×T
其中,aiRate为预先设置的数量级小于R的预设调整值,例如在万兆以太网场景下,R可以是100Gbps,而aiRate可以是100Mbps以内。
而当所述带宽利用率小于预设的利用率阈值时,可以加性地增大发送窗口。其中,加性地调整即为将基线值与某一系数相加,以实现慢速的增大或减小。例如,本申请实施例中加性的调整系数可以是预设调整值aiRate,当U<U
target时,可以采用如下的公式计算发送窗口W:
R=R
c+aiRate
W=R×T
由此,本申请实施例提供的调整发送窗口的方式服从AIMD(Additive-Increase Multiplicative-Decrease)准则,从而能够体现公平性。
此外,当连续加性地增大发送窗口的次数大于等于预设次数时,此时一般表示链路还有大量带宽未被利用,因此控制模块可以快速增大发送窗口,即乘性地增大发送窗口。
在实际场景中,可以设置一个参数incStage,在每次加性地增大发送窗口后,该参数incStage自增1,在每次乘性地减小发送窗口后,该参数incStage置0,由此可以在通过比较该参数incStage与预设次数maxStage,来确定是否需要乘性地增大发送窗口。图5示出了本申请实施例中一种调整发送窗口的方式的处理逻辑。
由于本申请实施例的方案中,带宽利用率会在经过每个RTT区间时进行计算,因此调整发送窗口也会在每个RTT区间开始时进行,由此使得拥塞控制能够适应网络拥塞的程度和不同流量的影响。并且,由于发送窗口的调整是依赖于网络的拥塞情况,即发送队列长度、发送队列发送数据计数、时钟等,相对于单依靠单一的ECN信息,本方案能够更加精准的确定网络的拥塞程度,而且使得收敛更加快速,一般可以在一个RTT实现收敛。此外,由于本方案并不依赖队列的反馈,而是基于交换机插入的检测信息直接计算带宽利用率进而调整发送窗口,因此不会增加网络延迟。
由于实际场景中可能存在一些特殊情况,例如部分传输协议无法支持每个数据包都产生ACK报文,或者部分传输协议会在收到多个数据包才产生一个ACK报文,甚至不需要产生ACK报文(如RDMA READ),或者在双向数据传输时ACK报文会与数据包共享一个消息队列造成INT信息的延迟等。在这些场景下,可以使用专用于携带检测信息的探测数据包(probing包)来获取检测信息,probing包可以使用于数据包相同的五元组,或者特殊的五元组,但都需要使其能够测量链路的拥塞情况。
另外,本申请的一部分可被应用为计算机程序产品,例如计算机程序指令,当其被计算机执行时,通过该计算机的操作,可以调用或提供根据本申请的方法和/或技术方案。而调用本申请的方法的程序指令,可能被存储在固定的或可移动的记录介质中,和/或通过广播或其他信号承载媒体中的数据流而被传输,和/或被存储在根据程序指令运行的计算机设备的工作存储器中。在此,根据本申请的一些实施例包括一个如图7所示的计算设备,该设备包括存储有计算机可读指令的一个或多个存储器710和用于执行计算机可读指令的处理器720,其中,当该计算机可读指令被 该处理器执行时,使得所述设备执行基于前述本申请的多个实施例的方法和/或技术方案。
此外,本申请的一些实施例还提供了一种计算机可读介质,其上存储有计算机程序指令,所述计算机可读指令可被处理器执行以实现前述本申请的多个实施例的方法和/或技术方案。
需要注意的是,本申请可在软件和/或软件与硬件的组合体中被实施,例如,可采用专用集成电路(ASIC)、通用目的计算机或任何其他类似硬件设备来实现。在一些实施例中,本申请的软件程序可以通过处理器执行以实现上文步骤或功能。同样地,本申请的软件程序(包括相关的数据结构)可以被存储到计算机可读记录介质中,例如,RAM存储器,磁或光驱动器或软磁盘及类似设备。另外,本申请的一些步骤或功能可采用硬件来实现,例如,作为与处理器配合从而执行各个步骤或功能的电路。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。装置权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。
Claims (22)
- 一种拥塞控制方法,其中,该方法包括:发送端设备从接收端设备获取数据包的ACK报文,其中,所述ACK报文中包含交换机向数据包插入的检测信息;所述发送端设备根据第一检测信息和第二检测信息确定带宽利用率,其中,所述第一检测信息为下一个RTT区间对应的ACK报文中的检测信息,所述第二检测信息为上一个RTT区间对应的ACK报文中的检测信息;所述发送端设备根据所述带宽利用率调整发送窗口。
- 根据权利要求1所述的方法,其中,所述发送端设备根据第一检测信息和第二检测信息确定带宽利用率,包括:所述发送端设备根据第一检测信息和第二检测信息,计算链路在下一个RTT区间中需要处理的数据量和链路的带宽延迟积;所述发送端设备根据链路在下一个RTT区间中需要处理的数据量以及链路的带宽延迟积计算带宽利用率。
- 根据权利要求2所述的方法,其中,所述检测信息包括发送队列长度、发送队列发送数据计数、插入时钟和端口速率;所述发送端设备根据第一检测信息和第二检测信息,计算链路在下一个RTT区间中需要处理的数据量和链路的带宽延迟积,包括:所述发送端设备根据第一检测信息中的发送队列发送数据计数和第二检测信息中的发送队列发送数据计数之差,以及第一检测信息中的插入时钟和第二检测信息中的插入时钟之差,计算发送速率;所述发送端设备根据所述发送速率、基线RTT值和第一检测信息中的发送队列长度,计算链路在下一个RTT区间中需要处理的数据量;所述发送端设备根据第一检测信息中的端口速率和基线RTT值,计算链路的带宽延迟积。
- 根据权利要求2所述的方法,其中,所述发送端设备根据链路在下一个RTT区间中需要处理的数据量以及链路的带宽延迟积,计算带宽利用率,包括:所述发送端设备根据链路在下一个RTT区间中需要处理的数据量以及链路的带宽延迟积,计算第一瞬时带宽利用率,其中,所述第一瞬时带宽利用率为当前计算获得的瞬时带宽利用率;所述发送端设备根据第一瞬时带宽利用率和第二平均带宽利用率进行滑动平均处理,计算第一平均带宽利用率,其中,所述第一平均带宽利用率为当前计算获得的平均带宽利用率,所述第二平均带宽利用率为上一次计算获得的平均带宽利用率。
- 根据权利要求4所述的方法,其中,所述发送端设备在根据第一瞬时带宽利用率和第二平均带宽利用率进行滑动平均处理,计算第一平均带宽利用率之前,还包括:所述发送端设备判断所述第一瞬时带宽利用率是否大于第二瞬时带宽利用率,并确定判断结果为是,其中,所述第二瞬时带宽利用率为上一次计算获得的瞬时带宽利用率。
- 根据权利要求1所述的方法,其中,所述发送端设备在从接收端设备获取数据包的ACK报文之后,还包括:所述发送端设备根据ACK报文的序列号判断接收到的ACK报文是否为下一个RTT区间对应的ACK报文。
- 根据权利要求1所述的方法,其中,所述发送端设备根据所述带宽利用率调整发送窗口,包括:当所述带宽利用率大于等于预设的利用率阈值时,所述发送端设备乘性地减小发送窗口;当所述带宽利用率小于预设的利用率阈值时,所述发送端设备加性地增大发送窗口。
- 根据权利要求7所述的方法,其中,该方法还包括:当连续加性地增大发送窗口的次数大于等于预设次数时,所述发送端设备乘性地增大发送窗口。
- 根据权利要求7或8所述的方法,其中,乘性的调整系数为带宽利用率与利用率阈值之比,加性的调整系数为预设调整值。
- 根据权利要求1所述的方法,其中,所述数据包包括专用于携带检测信息的探测数据包。
- 一种拥塞控制方法,其中,该方法包括:交换机接收由发送端设备发送的数据包,其中,所述发送端设备发送数据包的发送窗口由所述发送端设备根据带宽利用率调整获得,所述带宽利用率由所述发送端设备第一检测信息和第二检测信息确定;所述交换机向所述数据包中插入检测信息,并将插入检测信息后的数据包发送至接收端设备,以使所述接收端设备在接收到所述数据包后向所述发送端设备返回所述数据 包的ACK报文,其中,所述ACK报文中包含交换机向数据包插入的检测信息,所述第一检测信息为下一个RTT区间对应的ACK报文中的检测信息,所述第二检测信息为上一个RTT区间对应的ACK报文中的检测信息。
- 一种实现拥塞控制的发送端设备,其中,该发送端设备包括:接收模块,用于从接收端设备获取数据包的ACK报文,其中,所述ACK报文中包含交换机向数据包插入的检测信息;控制模块,用于根据第一检测信息和第二检测信息确定带宽利用率,其中,所述第一检测信息为下一个RTT区间对应的ACK报文中的检测信息,所述第二检测信息为上一个RTT区间对应的ACK报文中的检测信息,以及根据所述带宽利用率调整发送窗口;发送模块,基于发送窗口发送向接收端设备发送数据包。
- 根据权利要求12所述的发送端设备,其中,所述控制模块,用于根据第一检测信息和第二检测信息,计算链路在下一个RTT区间中需要处理的数据量和链路的带宽延迟积;以及根据链路在下一个RTT区间中需要处理的数据量以及链路的带宽延迟积计算带宽利用率。
- 根据权利要求13所述的发送端设备,其中,所述检测信息包括发送队列长度、发送队列发送数据计数、插入时钟和端口速率;所述控制模块,用于根据第一检测信息中的发送队列发送数据计数和第二检测信息中的发送队列发送数据计数之差,以及第一检测信息中的插入时钟和第二检测信息中的插入时钟之差,计算发送速率;根据所述发送速率、基线RTT值和第一检测信息中的发送队列长度,计算链路在下一个RTT区间中需要处理的数据量;以及根据第一检测信息中的端口速率和基线RTT值,计算链路的带宽延迟积。
- 根据权利要求13所述的发送端设备,其中,所述控制模块,用于根据链路在下一个RTT区间中需要处理的数据量以及链路的带宽延迟积,计算第一瞬时带宽利用率,其中,所述第一瞬时带宽利用率为当前计算获得的瞬时带宽利用率;以及根据第一瞬时带宽利用率和第二平均带宽利用率进行滑动平均处理,计算第一平均带宽利用率,其中,所述第一平均带宽利用率为当前计算获得的平均带宽利用率,所述第二平均带宽利用率为上一次计算获得的平均带宽利用率。
- 根据权利要求15所述的发送端设备,其中,所述控制模块,还用于在根据第一瞬时带宽利用率和第二平均带宽利用率进行滑动平均处理,计算第一平均带宽利用率之前,判断所述第一瞬时带宽利用率是否大于第二瞬时带宽利用率,并确定判断结果为是, 其中,所述第二瞬时带宽利用率为上一次计算获得的瞬时带宽利用率。
- 根据权利要求12所述的发送端设备,其中,所述控制模块,用于在所述带宽利用率大于等于预设的利用率阈值时,乘性地减小发送窗口;以及在所述带宽利用率小于预设的利用率阈值时,加性地增大发送窗口。
- 根据权利要求17所述的发送端设备,其中,所述控制模块,还用于在连续加性地增大发送窗口的次数大于等于预设次数时,乘性地增大发送窗口。
- 根据权利要求17或18所述的发送端设备,其中,乘性的调整系数为带宽利用率与利用率阈值之比,加性的调整系数为预设调整值。
- 一种实现拥塞控制的交换机,其中,该交换机包括:接收模块,用于接收由发送端设备发送的数据包,其中,所述发送端设备发送数据包的发送窗口由所述发送端设备根据带宽利用率调整获得,所述带宽利用率由所述发送端设备第一检测信息和第二检测信息确定;信息插入模块,用于向所述数据包中插入检测信息,发送模块,用于将插入检测信息后的数据包发送至接收端设备,以使所述接收端设备在接收到所述数据包后向所述发送端设备返回所述数据包的ACK报文,其中,所述ACK报文中包含交换机向数据包插入的检测信息,所述第一检测信息为下一个RTT区间对应的ACK报文中的检测信息,所述第二检测信息为上一个RTT区间对应的ACK报文中的检测信息。
- 一种计算设备,其中,该设备包括用于存储计算机程序指令的存储器和用于执行计算机程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述设备执行权利要求1至11中任一项所述的方法。
- 一种计算机可读介质,其上存储有计算机程序指令,所述计算机可读指令可被处理器执行以实现如权利要求1至11中任一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910487772.5A CN112054965B (zh) | 2019-06-05 | 2019-06-05 | 一种拥塞控制方法、设备及计算机可读介质 |
| CN201910487772.5 | 2019-06-05 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020244448A1 true WO2020244448A1 (zh) | 2020-12-10 |
Family
ID=73608954
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/093138 Ceased WO2020244448A1 (zh) | 2019-06-05 | 2020-05-29 | 一种拥塞控制方法、设备及计算机可读介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN112054965B (zh) |
| WO (1) | WO2020244448A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114374628A (zh) * | 2022-02-09 | 2022-04-19 | 江苏济楚信息技术有限公司 | 一种基于模型的音视频通信低延时拥塞控制方法 |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112653634A (zh) * | 2020-12-10 | 2021-04-13 | 苏州浪潮智能科技有限公司 | 一种流量控制方法、装置、设备及可读存储介质 |
| CN112532536B (zh) * | 2020-12-15 | 2023-03-24 | 北京秒如科技有限公司 | 一种文件传输方法、系统、计算机可读存储介质及设备 |
| CN112968811A (zh) * | 2021-02-20 | 2021-06-15 | 中国工商银行股份有限公司 | 一种rdma网络的pfc异常处理方法及装置 |
| CN113037859B (zh) * | 2021-03-24 | 2022-04-22 | 新华三技术有限公司 | 一种会话信息管理方法、装置、交换设备及介质 |
| CN113259255B (zh) * | 2021-06-03 | 2021-10-08 | 鹏城实验室 | 一种网络拥塞控制方法、装置、终端及存储介质 |
| CN114401224B (zh) * | 2022-01-19 | 2023-07-11 | 平安科技(深圳)有限公司 | 一种数据限流方法、装置、电子设备以及存储介质 |
| CN114726730B (zh) * | 2022-02-15 | 2023-12-29 | 阿里巴巴(中国)有限公司 | 应用于cdn的拥塞控制方法、电子设备、介质及产品 |
| CN114938354B (zh) * | 2022-06-24 | 2025-03-25 | 北京有竹居网络技术有限公司 | 拥塞控制的方法、装置、设备和存储介质 |
| CN115473855B (zh) * | 2022-08-22 | 2024-04-09 | 阿里巴巴(中国)有限公司 | 网络系统、数据传输方法 |
| CN117914750B (zh) * | 2024-03-20 | 2024-06-04 | 腾讯科技(深圳)有限公司 | 数据处理方法、装置、计算机、存储介质及程序产品 |
| CN119316363A (zh) * | 2024-09-13 | 2025-01-14 | 中国移动通信有限公司研究院 | 流量整形方法、信息传输方法、装置、相关设备、存储介质及计算机程序产品 |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101056259A (zh) * | 2007-05-21 | 2007-10-17 | 中南大学 | 一种用于高速网络中的协同工作式拥塞控制方法 |
| CN101645765A (zh) * | 2009-08-03 | 2010-02-10 | 四川大学 | 面向高误码率、长时延特性网络的可靠传输加速方法 |
| CN102388584A (zh) * | 2011-09-22 | 2012-03-21 | 华为技术有限公司 | 拥塞控制方法及设备 |
| US20130163428A1 (en) * | 2011-06-30 | 2013-06-27 | The Chinese University Of Hong Kong | Method and system for improved tcp performance over mobile data networks |
| CN106059951A (zh) * | 2016-06-08 | 2016-10-26 | 中南大学 | 一种用于dcn中基于多级拥塞反馈的传输控制方法 |
| CN106911583A (zh) * | 2017-03-14 | 2017-06-30 | 国网四川省电力公司经济技术研究院 | 一种显式反馈拥塞程度滑动平均值的传输层拥塞控制方法 |
| WO2017192414A1 (en) * | 2016-05-04 | 2017-11-09 | Microsoft Technology Licensing, Llc | Adaptive gain reduction for background connections |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100912178B1 (ko) * | 2002-09-27 | 2009-08-14 | 주식회사 케이티 | 무선 환경에서의 혼잡제어방법 및 기록매체 |
| US8125910B2 (en) * | 2004-06-25 | 2012-02-28 | Nec Corporation | Communication system |
| KR100608581B1 (ko) * | 2004-07-14 | 2006-08-03 | 삼성전자주식회사 | 애드 혹 네트워크에서의 데이터 전송 방법 및 장치 |
| CN101964755B (zh) * | 2010-11-03 | 2012-03-07 | 中南大学 | 高带宽延时网络中基于带宽估计的显式拥塞控制方法 |
| CN103905328B (zh) * | 2012-12-25 | 2017-09-12 | 中国移动通信集团公司 | 一种数据传输控制系统、方法及相关装置 |
| CN104125159B (zh) * | 2014-07-29 | 2017-09-12 | 福建星网锐捷网络有限公司 | 一种拥塞带宽检测方法、装置及系统 |
| CN105049369A (zh) * | 2015-08-14 | 2015-11-11 | 浙江大学 | 异构无线网络中基于mptcp的视频传输拥塞控制方法 |
| CN105141542B (zh) * | 2015-09-18 | 2019-04-02 | 北京百度网讯科技有限公司 | 基于tcp通信协议的拥塞窗口的控制算法和系统 |
| CN107800642A (zh) * | 2016-08-31 | 2018-03-13 | 北京金山云网络技术有限公司 | 一种拥塞控制方法及装置 |
| CN109412958B (zh) * | 2017-08-18 | 2022-04-05 | 华为技术有限公司 | 数据中心的拥塞控制方法和装置 |
| CN108494698B (zh) * | 2017-12-13 | 2022-02-25 | 天地伟业技术有限公司 | 一种基于传输速率的拥塞控制方法 |
-
2019
- 2019-06-05 CN CN201910487772.5A patent/CN112054965B/zh active Active
-
2020
- 2020-05-29 WO PCT/CN2020/093138 patent/WO2020244448A1/zh not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101056259A (zh) * | 2007-05-21 | 2007-10-17 | 中南大学 | 一种用于高速网络中的协同工作式拥塞控制方法 |
| CN101645765A (zh) * | 2009-08-03 | 2010-02-10 | 四川大学 | 面向高误码率、长时延特性网络的可靠传输加速方法 |
| US20130163428A1 (en) * | 2011-06-30 | 2013-06-27 | The Chinese University Of Hong Kong | Method and system for improved tcp performance over mobile data networks |
| CN102388584A (zh) * | 2011-09-22 | 2012-03-21 | 华为技术有限公司 | 拥塞控制方法及设备 |
| WO2017192414A1 (en) * | 2016-05-04 | 2017-11-09 | Microsoft Technology Licensing, Llc | Adaptive gain reduction for background connections |
| CN106059951A (zh) * | 2016-06-08 | 2016-10-26 | 中南大学 | 一种用于dcn中基于多级拥塞反馈的传输控制方法 |
| CN106911583A (zh) * | 2017-03-14 | 2017-06-30 | 国网四川省电力公司经济技术研究院 | 一种显式反馈拥塞程度滑动平均值的传输层拥塞控制方法 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114374628A (zh) * | 2022-02-09 | 2022-04-19 | 江苏济楚信息技术有限公司 | 一种基于模型的音视频通信低延时拥塞控制方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112054965A (zh) | 2020-12-08 |
| CN112054965B (zh) | 2024-06-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020244448A1 (zh) | 一种拥塞控制方法、设备及计算机可读介质 | |
| US10063488B2 (en) | Tracking queuing delay and performing related congestion control in information centric networking | |
| US11032179B2 (en) | Heterogeneous flow congestion control | |
| CN112217686B (zh) | 一种评估往返时延的系统、方法及装置 | |
| US8797871B2 (en) | Transmission control protocol (TCP) congestion control using transmission delay components | |
| CN107948103B (zh) | 一种基于预测的交换机pfc控制方法及控制系统 | |
| CN102045219B (zh) | 一种高效的单端可用带宽测量方法 | |
| US11115308B2 (en) | System and method for congestion control using time difference congestion notification | |
| CN106301684B (zh) | 一种媒体数据传输方法及装置 | |
| WO2020207479A1 (zh) | 一种网络拥塞控制方法和装置 | |
| WO2020042624A1 (zh) | 传输速率控制方法、装置、发送设备和接收设备 | |
| EP1061698A2 (en) | Method and apparatus for forecasting and controlling congestion in a data transport network | |
| CN113141314B (zh) | 一种拥塞控制方法及设备 | |
| CN112104562A (zh) | 拥塞控制方法及装置、通信网络、计算机存储介质 | |
| CN104869077B (zh) | 令牌传输控制方法及系统 | |
| US10063489B2 (en) | Buffer bloat control | |
| CN117411833A (zh) | 拥塞控制方法、设备及系统 | |
| Lim et al. | Robust end-to-end loss differentiation scheme for transport control protocol over wired/wireless networks | |
| CN115665058A (zh) | 一种数据发送速度控制方法、装置、设备及介质 | |
| Lu et al. | EQF: An explicit queue-length feedback for TCP congestion control in datacenter networks | |
| Lu et al. | TS-TCP: Two-stage congestion control algorithm for high concurrency TCPs in data center networks | |
| Chen et al. | FCC: Fast Source Congestion Control for Ultra-Low Latency in Data Center Networks | |
| US11863451B2 (en) | Hardware accelerated temporal congestion signals | |
| CN119449718B (zh) | 基于时延变化的拥塞窗口调整方法及系统 | |
| CN120675960A (zh) | 双端协同的片上网络流量控制方法、装置及电子设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20817870 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20817870 Country of ref document: EP Kind code of ref document: A1 |