Congestion control method, equipment and system

文档序号:1524037 发布日期:2020-02-11 浏览:13次 中文

阅读说明:本技术 拥塞控制方法、设备及系统 (Congestion control method, equipment and system ) 是由 曹政 高山渊 刘兴奎 于 2018-07-31 设计创作,主要内容包括:本申请实施例提供一种拥塞控制方法、设备及系统。在本申请实施例中,网络交换设备对其输出端口的数据流分布情况进行监控,获得引起输出端口拥塞的数据流规模信息,进而根据所获得的数据流规模信息控制引起输出端口拥塞的数据流发送端调整发往该输出端口的数据流的发送速率;引起输出端口拥塞的数据流规模信息可以从整体上更加全面地反应拥塞情况,可促使数据流发送端快速地将发送速率降低到位,加快发送速率的收敛速度,便于快速消除拥塞,提高带宽利用率。(The embodiment of the application provides a congestion control method, equipment and a system. In the embodiment of the application, the network switching equipment monitors the data flow distribution condition of the output port of the network switching equipment, obtains the data flow scale information causing the congestion of the output port, and then controls the data flow sending end causing the congestion of the output port to adjust the sending rate of the data flow sent to the output port according to the obtained data flow scale information; the data flow scale information causing the congestion of the output port can comprehensively reflect the congestion situation on the whole, can promote the data flow sending end to quickly reduce the sending rate in place, quickens the convergence rate of the sending rate, is convenient to quickly eliminate the congestion and improves the bandwidth utilization rate.)

1. A congestion control method, comprising:

monitoring the data flow distribution condition of an output port of the network switching equipment to acquire data flow scale information causing the congestion of the output port;

and controlling the data flow sending end causing the output port congestion to adjust the sending rate of the data flow sent to the output port according to the data flow scale information causing the output port congestion.

2. The method of claim 1, wherein monitoring the data flow distribution at an output port of a network switch to obtain data flow size information causing congestion at the output port comprises:

and periodically monitoring the data flows on the output port for the times less than the continuous occurrence times of the set time interval so as to acquire the number of the data flows causing the congestion of the output port in each monitoring period.

3. The method of claim 2, wherein periodically monitoring the number of times that the data flows on the output port continuously appear less than a set time interval to obtain the number of data flows causing the congestion of the output port in each monitoring period comprises:

in each monitoring period, when a data stream reaches the output port, calculating the difference value between the time when the data stream reaches the output port at this time and the time when the data stream reaches the output port at the latest time;

if the difference is smaller than the set time interval, adding 1 to the data stream by the number of times of occurrence of the data stream smaller than the preset time interval; and

when the number of times that the data flow appears in the time interval smaller than the preset time interval is larger than the set number threshold, determining that the data flow belongs to the data flow causing the output port to be congested, and adding 1 to the number of the data flows causing the output port to be congested in the monitoring period.

4. The method of claim 3, further comprising:

if the difference is greater than or equal to the set time interval, setting the number of times of occurrence of the data stream in the preset time interval to be 0, and updating the time of the data stream reaching the output port last time to the time of the data stream reaching the output port this time.

5. The method of claim 4, further comprising:

and resetting the data streams acquired in the monitoring period by the times less than the preset time interval, the number of the data streams causing the congestion of the corresponding output port and the time when the data streams arrive at the corresponding output port for the latest time at the end of each monitoring period.

6. The method according to any one of claims 1 to 5, wherein controlling the data flow sender causing the output port to be congested to adjust the sending rate of the data flow sent to the output port according to the data flow size information causing the output port to be congested comprises:

when the output port meets the congestion control condition, generating a congestion notification message according to the data flow scale information causing the congestion of the output port;

and sending the congestion notification message to a data flow sending end causing the congestion of the output port, so that the data flow sending end adjusts the sending rate of the data flow sent to the output port based on the data flow scale information.

7. The method of claim 6, further comprising:

and when a new data packet arrives, if the data flow to which the new data packet belongs to the data flow causing the congestion of the output port and the output buffer of the output port reaches the congestion notification threshold, determining that the output port meets the congestion control condition.

8. The method of claim 7, wherein the generating a congestion notification message according to the data flow size information causing the congestion of the output port comprises:

extracting the packet header of the new data packet, exchanging source address information and destination address information in the packet header, and resetting a type domain in the packet header to a congestion notification type value;

and constructing the congestion notification message by combining the packet header with the data flow scale information as a message load.

9. A congestion control method applicable to a host, comprising:

receiving a congestion notification message sent by a network switching device, wherein the congestion notification message carries data flow scale information and a data flow identifier which cause congestion at an output port of the network switching device;

calculating the target sending rate of the data flow causing the output port congestion at the local end according to the data flow scale information and the data flow identification causing the output port congestion;

and adjusting the sending rate of the data stream causing the congestion of the output port by the local terminal according to the target sending rate.

10. The method according to claim 9, wherein said calculating the target sending rate of the data flow whose local end causes the congestion of the output port according to the data flow size information and the data flow identification causing the congestion of the output port comprises:

calculating the bandwidth average number corresponding to the data flow causing the output port congestion at the local end according to the data flow scale information and the data flow identification causing the output port congestion;

and calculating the target sending rate of the data stream causing the output port congestion at the local end according to the network bandwidth of the output port and the bandwidth average value corresponding to the current time.

11. The method of claim 10, wherein calculating the bandwidth average corresponding to the data flow causing the congestion of the output port at the local end according to the data flow size information and the data flow identification causing the congestion of the output port at the local end comprises:

acquiring a bandwidth average number corresponding to the data flow which causes the congestion of the output port at the local end according to the data flow identification which causes the congestion of the output port;

and updating the corresponding bandwidth halving number before according to the data flow scale information causing the output port congestion to obtain the corresponding bandwidth halving number at this time.

12. The method according to claim 11, wherein updating the previous corresponding bandwidth halving number according to the data flow size information causing the congestion of the output port to obtain the current corresponding bandwidth halving number comprises:

according to the formula

Figure FDA0001749045500000031

wherein R is flowRepresenting the previously corresponding bandwidth average,

Figure FDA0001749045500000032

13. The method according to claim 11 or 12, wherein calculating the target sending rate of the data flow causing the congestion of the output port at the local end according to the network bandwidth of the output port and the average value of the bandwidth corresponding to the current time comprises:

calculating a first sending rate according to congestion degree indication information of an output buffer area of the output port carried in the congestion notification message;

calculating a second sending rate according to the network bandwidth of the output port and the bandwidth average value corresponding to the current time;

selecting a smaller transmission rate from the first transmission rate and the second transmission rate as the target transmission rate.

14. A network switching device, comprising: m output ports and K congestion detection modules, wherein M and K are positive integers;

the M output ports are used for forwarding the data stream from the data stream sending end;

the K congestion detection modules are used for monitoring the data flow distribution conditions of the M output ports so as to acquire data flow scale information causing congestion of each output port; and for each output port, controlling a data flow sending end causing the congestion of the output port to adjust the sending rate of the data flow sent to the output port according to the data flow scale information causing the congestion of the output port.

15. The network switching device of claim 14, wherein each congestion detection module comprises: a congestion detection sub-module and a congestion notification sub-module;

the congestion detection submodule is used for periodically monitoring the continuous occurrence times of each data stream on the output port, which are less than a set time interval, aiming at each output port of Mx output ports which the congestion detection submodule belongs to, so as to obtain the quantity of the data streams which cause the congestion of the output port in each monitoring period;

the congestion notification submodule is used for controlling a data stream sending end causing the congestion of the output port to adjust the sending rate of the data stream sent to the output port according to the quantity of the data stream causing the congestion of the output port aiming at each output port in Mx output ports; mx is a positive integer, Mx and M.

16. The network switching device of claim 15, wherein each congestion detection module further comprises: a periodic reset timer, a mapping submodule, a congestion information table and a counter;

the periodic reset timer is used for repeatedly timing a monitoring period;

the counter is used for recording the number of data flows causing the congestion of the output port in each monitoring period aiming at each output port in Mx output ports;

the congestion information table is used for recording the continuous occurrence times of each data stream on each output port of Mx output ports, which are smaller than a set time interval, and the time of the data stream reaching the output port at the latest time;

the mapping sub-module is configured to determine, for each output port of the Mx output ports, a corresponding entry of the data flow in the congestion information table according to flow information of the data flow that reaches the output port;

the congestion detection submodule is specifically configured to: for each output port of Mx output ports, in each monitoring period, every time when a data stream reaches the output port, acquiring the time of the data stream reaching the output port for the last time from a table entry output by the mapping submodule, calculating the difference between the time of the data stream reaching the output port for the current time and the time of the data stream reaching the output port for the last time, and adding 1 to the number of times of occurrence of the data stream recorded in the table entry in a manner of being smaller than the preset time interval when the difference is smaller than the set time interval; and when the number of times of occurrence of the data flow in the time interval smaller than the preset time interval is larger than the set number threshold, determining that the data flow belongs to the data flow causing the congestion of the output port, and adding 1 to the value of the counter.

17. The network switching device of claim 16, wherein the congestion detection sub-module is further configured to:

and when the difference is greater than or equal to the set time interval, setting the number of times of occurrence of the data stream recorded in the table entry in a manner of being smaller than the preset time interval as 0, and updating the time of the data stream recorded in the table entry reaching the output port for the latest time as the time of the data stream reaching the output port for the current time.

18. The network switching device of claim 17, wherein the congestion detection sub-module is further configured to:

and when each monitoring period is finished, setting the frequency of occurrence of each data stream recorded in the congestion information table in a time interval smaller than the preset time interval as 0, setting the value of the counter as 1, and resetting the time of the latest arrival of each data stream at the corresponding output port as the current time.

19. The network switching device of any one of claims 15 to 18, wherein the congestion notification sub-module is specifically configured to:

when the output port meets the congestion control condition, generating a congestion notification message according to the data flow scale information causing the congestion of the output port; and sending the congestion notification message to a data flow sending end causing the congestion of the output port, so that the data flow sending end adjusts the sending rate of the data flow sent to the output port based on the data flow scale information.

20. The network switching device of claim 19, wherein the congestion notification sub-module is further configured to: and when a new data packet arrives at the network switching equipment, if the data flow to which the new data packet belongs to the data flow causing the congestion of the output port and the output buffer of the output port reaches a congestion notification threshold value, determining that the output port meets the congestion control condition.

21. The network switching device of any one of claims 15-18, wherein M-K and Mx-1.

22. The network switching device of any of claims 15-18, further comprising: n input ports and a crossbar; the N input ports are interconnected with the M output ports through the cross switch, and N is a positive integer.

23. A host, comprising: the device comprises a communication port, a calculation module and a congestion control module;

the communication port is configured to receive a congestion notification message sent by a network switching device, where the congestion notification message carries data flow scale information and a data flow identifier that cause congestion at an output port of the network switching device;

the calculation module is used for calculating the target sending rate of the data flow causing the output port congestion at the local end according to the data flow scale information and the data flow identification causing the output port congestion;

and the congestion control module is used for adjusting the sending rate of the data stream which causes the congestion of the output port at the local end according to the target sending rate.

24. A network communication system, comprising: a network switching device and a plurality of hosts connected to the network switching device;

the plurality of hosts are used for generating data streams, forwarding the data streams through the network switching equipment, and adjusting the sending rate of the data streams sent to the output port of the network switching equipment according to the number of the data streams causing the congestion of the output port of the network switching equipment under the control of the network switching equipment;

the network switching equipment is used for forwarding the data streams from the plurality of hosts through the output ports of the network switching equipment, counting the quantity of the data streams causing the congestion of the output ports of the network switching equipment, and controlling the hosts causing the congestion of the output ports to adjust the sending rate of the data streams sent to the output ports according to the quantity of the data streams.

Technical Field

The present application relates to the field of communications technologies, and in particular, to a congestion control method, device, and system.

Background

Under the drive of new services and new technologies, a data center deploys more applications and services, such as offline operation, streaming operation, Web servers, databases, and the like, and the internal traffic of the data center increases rapidly, so that the demand of the data center on a very large-scale, ultra-high-bandwidth, low-latency network is continuously increased. Thus, network bandwidth of 100Gb/s or even 400Gb/s is increasingly used in data centers, which makes congestion problems in data center networks worse, and one-dozen-one communication (Incast) is one of the causes of congestion in data center networks.

At present, the method for solving the Incast congestion is mainly as follows: detecting the buffer area state of the output port of the switch, determining whether congestion control is needed according to the buffer area state, randomly selecting a certain sending end when the congestion control is needed, and informing the sending end to adjust the sending rate of the sending end. In the congestion control method, a sending end often needs to perform multiple rate adjustments, the sending rate cannot be quickly reduced in place, and the speed of solving the congestion problem is relatively slow.

Disclosure of Invention

Aspects of the present application provide a method, device, and system for congestion control, which are used to promote a sending end to quickly implement rate convergence, so as to quickly eliminate congestion and improve bandwidth utilization.

An embodiment of the present application provides a congestion control method, including: monitoring the data flow distribution condition of an output port of the network switching equipment to acquire data flow scale information causing the congestion of the output port; and controlling the data flow sending end causing the output port congestion to adjust the sending rate of the data flow sent to the output port according to the data flow scale information causing the output port congestion.

An embodiment of the present application further provides a congestion control method, including: receiving a congestion notification message sent by a network switching device, wherein the congestion notification message carries data flow scale information and a data flow identifier which cause congestion at an output port of the network switching device; calculating the target sending rate of the data flow causing the output port congestion at the local end according to the data flow scale information and the data flow identification causing the output port congestion; and adjusting the sending rate of the data stream causing the congestion of the output port by the local terminal according to the target sending rate.

An embodiment of the present application further provides a network switching device, including: m output ports and K congestion detection modules, wherein M and K are positive integers; the M output ports are used for forwarding the data stream from the data stream sending end; the K congestion detection modules are used for monitoring the data flow distribution conditions of the M output ports so as to acquire data flow scale information causing congestion of each output port; and for each output port, controlling a data flow sending end causing the congestion of the output port to adjust the sending rate of the data flow sent to the output port according to the data flow scale information causing the congestion of the output port.

An embodiment of the present application further provides a host, including: the device comprises a communication port, a calculation module and a congestion control module; the communication port is configured to receive a congestion notification message sent by a network switching device, where the congestion notification message carries data flow scale information and a data flow identifier that cause congestion at an output port of the network switching device; the calculation module is used for calculating the target sending rate of the data flow causing the output port congestion at the local end according to the data flow scale information and the data flow identification causing the output port congestion; and the congestion control module is used for adjusting the sending rate of the data stream which causes the congestion of the output port at the local end according to the target sending rate.

An embodiment of the present application further provides a network communication system, including: a network switching device and a plurality of hosts connected to the network switching device; the host computers are used for generating data flow and forwarding the data flow through the network switching equipment, and adjusting the sending rate of the data flow sent to the output port of the network switching equipment according to the data flow scale information causing the congestion of the output port of the network switching equipment under the control of the network switching equipment; the network switching equipment is used for forwarding the data streams from the plurality of hosts through the output ports thereof, counting the data stream scale information causing the congestion of the output ports thereof, and controlling the hosts causing the congestion of the output ports to adjust the sending rate of the data streams sent to the output ports according to the data stream scale information.

In the embodiment of the application, the network switching equipment monitors the data flow distribution condition of the output port of the network switching equipment, obtains the data flow scale information causing the congestion of the output port, and then controls the data flow sending end causing the congestion of the output port to adjust the sending rate of the data flow sent to the output port according to the obtained data flow scale information; the data flow scale information causing the congestion of the output port can comprehensively reflect the congestion situation on the whole, can promote the data flow sending end to quickly reduce the sending rate in place, quickens the convergence rate of the sending rate, is convenient to quickly eliminate the congestion and improves the bandwidth utilization rate.

Drawings

The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:

fig. 1a is a schematic structural diagram of a network communication system according to an exemplary embodiment of the present application;

fig. 1b is a schematic diagram illustrating a format of a congestion notification message according to an exemplary embodiment of the present application;

fig. 1c is a schematic diagram illustrating another format of a congestion notification message according to an exemplary embodiment of the present application;

fig. 2a is a schematic diagram of a hardware structure of a network switching device according to an exemplary embodiment of the present application;

fig. 2b is a schematic hardware structure diagram of a congestion detection module according to an exemplary embodiment of the present disclosure;

fig. 2c is a schematic diagram of a hardware structure of another network switching device according to an exemplary embodiment of the present application;

FIG. 3 is a diagram illustrating a hardware configuration of a host according to an exemplary embodiment of the present application;

fig. 4a is a flowchart illustrating a congestion control method described in terms of a network switching device according to an exemplary embodiment of the present application;

FIG. 4b is a schematic flow chart diagram illustrating one method of implementing step 401 provided by an exemplary embodiment of the present application;

fig. 5 is a flowchart illustrating a congestion control method from a perspective of a host according to an exemplary embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

In the existing congestion control method, a sending end often needs to perform multiple rate adjustments, the sending rate cannot be quickly reduced in place, and the speed of solving the congestion problem is relatively slow. In some embodiments of the present application, by obtaining the data flow scale information causing the congestion of the output port of the network switching device, and controlling the data flow sending end causing the congestion of the output port to adjust the sending rate of the data flow sent to the output port according to the obtained data flow scale information, the data flow sending end can comprehensively reflect the congestion situation as a whole, so that the data flow sending end can quickly reduce the sending rate to a proper position, accelerate the convergence rate of the sending rate, facilitate the quick elimination of the congestion, and improve the bandwidth utilization rate.

The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.

Fig. 1a is a schematic structural diagram of a network communication system 100 according to an exemplary embodiment of the present application. As shown in fig. 1a, the network communication system 100 includes: a network switching device 101 and a plurality of hosts 102. The network switching device 101 may be one or more. As shown in fig. 1a, hosts 102 are interconnected through a network switching device 101 to complete the communication process. As shown in fig. 1a, if there are a plurality of network switching apparatuses 101, the network switching apparatuses 101 are connected to each other in addition to the host 102. The interconnection mode between the network switching devices 101 and the connection between the network switching devices 101 and the host 102 can be adaptively deployed according to application requirements.

It is noted that the network communication system 100 of the present embodiment may be a local area network, a metropolitan area network, or a wide area network, depending on the interconnection range. In addition, the network communication system 100 of the present embodiment may be applied to various service scenarios, for example, may be applied to a communication network in which a data center is used as a data center, but is not limited thereto.

In this embodiment, the host 102 is mainly used to generate and forward data streams through the network switching device 101, for example, the data streams may be forwarded to other hosts or the next network switching device. A data stream refers to a set of sequential data packets, and generating a data stream mainly refers to a process of sequentially generating each data packet in the data stream. Of course, the host 102 may be responsible for consuming the data stream, besides generating the data stream, where the consuming of the data stream refers to a process of receiving each data packet in the data stream forwarded by the network switching device 101 and processing the received data packet. It should be noted that, depending on the application or service scenario, the host 102 may process the data packet differently, for example, the host 102 may perform various processes such as querying, analyzing, virtualizing, and displaying on the received data packet.

In this embodiment, the main function of the network switching device 101 is to forward data streams from the hosts 102 through its output ports. Alternatively, the network switching device 101 may forward a data stream from one host 102 to another host 102, or may forward a data stream from one host 102 to a next network switching device.

In some traffic scenarios, there may be a many-to-one (many-to-one) communication mode in the network communication system 100. For example, in a cloud computing data center, especially a distributed data processing service implemented by deployment in a hadoop, Mapreduce, HDFS, or other horizontal extension (scale out) manner, a many-to-one communication mode often occurs.

In a many-to-one communication mode, when one host 102 initiates a request to multiple other hosts 102, the multiple other hosts 102 receive the request at the same time and respond at approximately the same time, and the hosts 102 return data streams to the requesting host 102 at approximately the same time, which results in a "micro-burst stream". This situation is reflected in the network switching device 101, that is, an output port of the network switching device 101 needs to forward data streams from multiple hosts 102, which easily causes an output buffer of the output port to overflow, thereby causing packet loss and subsequent retransmission, i.e., a congestion problem of one more packet occurs. If the network communication system 100 employs a Transmission Control Protocol (TCP), this one-to-one congestion problem is generally referred to as an Incast congestion problem.

In this embodiment, the network switching device 101 is responsible for not only forwarding the data flow from the host 102, but also detecting whether the output port is congested, and obtaining the data flow size information causing the output port to be congested, and further, controlling the host 102 causing the output port to be congested according to the data flow size information causing the output port to be congested to adjust the sending rate of the data flow sent to the output port, so as to solve the congestion problem.

It is noted that the network switch apparatus 101 generally has a plurality of output ports, each of which may be congested, and the network switch apparatus 101 may perform congestion control on each of the output ports in the same or similar manner. For convenience of description, congestion control for an output port of the network switching device 101 is described as an example in the following description.

An output port of the network switching device 101 may be responsible for forwarding one or more data streams, where different data streams have different stream information, and the stream information is information that can uniquely identify one data stream. Assuming that the flow information is a five-tuple, i.e., a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol, the five-tuple corresponding to different data flows is not completely the same, and usually the source IP address and the destination IP address are not completely the same. The distribution of different data streams on the output ports of the network switching device 101 will generally be different. Some data flows have large data quantity and long duration, and data packets of the data flows frequently appear on output ports; other data streams have relatively small data volume and short duration, and data packets thereof may appear on the output port in bursts. Optionally, the network switching device 101 may monitor the distribution of data flows at its output port, determine, according to the distribution of each data flow at the output port, a data flow causing congestion at the output port, and obtain the size information of the data flow causing congestion at the output port; then, the host causing the congestion of the output port can be controlled to adjust the sending rate of the data flow sent to the output port according to the data flow scale information causing the congestion of the output port.

In addition to generating and consuming data flows, the host 102 may adjust the sending rate of a data flow to an output port of the network switching device 101 according to the data flow size information, which is acquired by the network switching device 101 and causes the output port to be congested, under the control of the network switching device 101. The data flow size information causing the output port of the network switching device 101 to be congested can reflect the congestion condition of the output port more comprehensively on the whole, and belongs to global congestion Incast information. The host 102 can quickly reduce the sending rate of the corresponding data stream to a proper position according to the global congestion Incast information, so that the number of times of rate adjustment can be reduced, the convergence rate of the sending rate of the corresponding data stream is increased, the congestion can be quickly eliminated, and the bandwidth utilization rate is further improved.

In addition, in the network switching system 100, the network switching device 101 feeds back the global congestion Incast information to the host 102 causing the congestion of the output port, and compared with the feedback from the data stream receiving end, the feedback distance of the global congestion Incast information can be shortened, the feedback time is reduced, the real-time performance of congestion control is improved, and the problem of global congestion synchronization can be solved.

In this embodiment, the content of the "data flow size information causing the congestion of the output port" is not limited, and all information capable of reflecting the congestion condition of the output port more comprehensively on the whole is suitable for the embodiment of the present application. For example, the information on the size of the data flow causing the congestion of the output port may be the number of data flows causing the congestion of the output port, or may be the total data flow causing the congestion of the output port, or of course, may be a combination of the number of data flows causing the congestion of the output port and the data flow accumulated on the output port for each data flow, or the like.

In an actual traffic scenario, most of the data streams end after a certain duration, and generally do not last permanently. Based on this consideration, a monitoring period may be set in advance so as to periodically perform congestion control. The monitoring period may be configurable, and may generally be determined according to the duration of the data stream in the service scenario, for example, the average duration of each data stream in the service scenario may be taken, and the maximum duration in the data stream may also be taken. For the network switching device 101, the data flow distribution condition of the output port of the network switching device may be periodically monitored according to the monitoring period, and further, the data flow scale information causing the congestion of the output port in each monitoring period may be obtained according to the data flow distribution condition monitored in each monitoring period. In short, the data flow size information causing the congestion of the output port is periodically acquired, that is, the data flow size information causing the congestion of the output port is acquired again every time a monitoring period starts.

In each monitoring period, the data flow distribution of the output port can be embodied by various information. For example, in each monitoring period, one or more kinds of information such as the total duration of each data flow on the output port, the total number of each data flow, the occurrence time of each data flow, and the like may be monitored to represent the data flow distribution of the output port. In an alternative embodiment, in each monitoring period, the data flow distribution of the output port can be represented by monitoring the number of times that each data flow on the output port continuously appears in a time interval smaller than the set time interval. The set time interval may be flexibly set according to an actual service scenario, and the value is not limited in this embodiment.

In a monitoring period, if the number of times that a certain data flow appears continuously at a time interval less than a set time interval is larger, it indicates that the larger the number of data packets that the data flow needs to forward through the output port is, the higher the possibility that the data flow causes congestion at the output port is. Based on this, the number of data flows causing the congestion of the output port in the corresponding monitoring period can be obtained as the data flow scale information causing the congestion of the output port according to the number of times that each data flow on the monitored output port in each monitoring period continuously appears in a time interval smaller than the set time interval. The following method, but not limited thereto, may be adopted to determine the number of data flows causing the congestion of the output port in each monitoring period:

mode 1: in each monitoring period, according to the sequence of the number of times that each data flow on the monitored output port continuously appears in a time interval smaller than a set time interval from large to small, the data flows on the output port are sequenced, P data flows which are sequenced most in front are selected as the data flows causing the congestion of the output port, P is the number of the data flows causing the congestion of the output port, and P is a non-negative integer.

Mode 2: a threshold number of times may be preset, based on which it may be determined whether a certain data flow belongs to a data flow causing congestion at the output port. In each monitoring period, comparing the number of times that each monitored data stream on the output port continuously appears in a time interval smaller than a set time interval with the threshold value of the number of times; and if the number of times that a certain data flow appears continuously in a time interval smaller than the set time interval is larger than the set time threshold, determining that the data flow belongs to the data flow causing the congestion of the output port, and taking the number of the data flows of which the number of times that the certain data flow appears continuously in the time interval smaller than the set time interval is larger than the set time threshold as the number of the data flows causing the congestion of the output port.

Further, in mode 2, in each monitoring period, the time when each data stream last arrived at the output port of the network switching device 101 may be recorded. Thus, when a data stream arrives at the output port, the difference value between the time when the data stream arrives at the output port and the time when the data stream arrives at the output port last time can be calculated, and then the difference value is compared with the set time interval; if the difference is smaller than the set time interval, adding 1 to the data stream by the times smaller than the occurrence frequency of the preset time interval; on the contrary, if the difference is greater than or equal to the set time interval, which indicates that the requirement of "continuity" is no longer met, the number of times that the data stream appears in the time interval less than the preset time interval may be set as an initial value, so as to re-count the number of times that the data stream reaches the output port in the time interval less than the set time interval, and at the same time, the time that the data stream last reaches the output port is updated to the time that the data stream reaches the output port this time. And when the number of times of the data flow occurring in the time interval less than the preset time interval is greater than the set number threshold, determining that the data flow belongs to the data flow causing the congestion of the output port, and adding 1 to the data flow scale information causing the congestion of the output port in the monitoring period.

Accordingly, at the end of each monitoring period, the data flows acquired in the monitoring period may be reset by the number of occurrences of the data flows less than the preset time interval, the data flow size information causing congestion of the corresponding output port, and the time when the data flows have arrived at the corresponding output port last time, so as to be counted again in the next monitoring period. The present embodiment does not limit the manner of the reset operation, for example, at the end of the monitoring period, each data flow may be reset to 0 by the number of occurrences less than the preset time interval, the data flow size information causing the congestion of the output port may be reset to 1, and the time when each data flow has last reached the corresponding output port may be reset to the current time.

In this embodiment of the present application, on one hand, the network switching device 101 acquires the data flow size information causing the congestion of its output port, and records it as operation 1; on the other hand, according to the data flow size information causing the congestion of the output port, the host 102 controlling the congestion of the output port adjusts the sending rate of the data flow to the output port, which is denoted as operation 2. However, the execution logic of operation 1 and the execution logic of operation 2 have no necessary relationship, and both may be executed in parallel according to the respective execution logic. That is, the network switching device 101 may perform operation 1 according to the execution logic of operation 1, and in the course of performing operation 1, perform operation 2 according to the execution logic of operation 2.

In an alternative embodiment, the network switching device 101 on the one hand periodically obtains the amount of data flow causing congestion at its output port (equivalent to performing operation 1); on the other hand, whether the output port of the host device meets the congestion control condition is judged, and when the congestion control condition is judged to be met, the host device 102 causing the congestion of the output port is controlled to adjust the sending rate of the data flow sent to the output port according to the quantity of the data flow causing the congestion of the output port, which is obtained in the current monitoring period (corresponding to the execution of the operation 2). The congestion control condition may be flexibly set according to an actual service scenario, which is exemplified as follows:

for example, the network switching device 101 on the one hand periodically acquires the data flow size information causing congestion of its output port; on the other hand, whether a new data packet arrives or not is monitored, and when a new data packet arrives, the output port is determined to meet the congestion control condition; then, the host 102 causing the congestion of the output port is controlled to adjust the sending rate of the data flow to the output port according to the data flow size information causing the congestion of the output port obtained in the current monitoring period.

For another example, the network switching device 101 on one hand periodically obtains the data flow size information causing the congestion of its output port, and on the other hand monitors whether the output buffer of its output port overflows, and if the output buffer of its output port overflows, determines that the output port satisfies the congestion control condition; then, the host 102 causing the congestion of the output port is controlled to adjust the sending rate of the data flow to the output port according to the data flow size information causing the congestion of the output port obtained in the current monitoring period.

For another example, the network switching device 101 on the one hand periodically acquires the data flow size information causing congestion at its output port; on the other hand, whether a new data packet arrives or not is monitored, when a new data packet arrives, whether the data flow to which the new data packet belongs to the data flow causing the congestion of the output port of the data packet can be judged, whether the output buffer area of the output port reaches the congestion notification threshold value or not is judged, and when the two judgment operation results are yes, the output port is determined to meet the congestion control condition; then, according to the data flow size information causing the congestion of the output port obtained in the current monitoring period, the host 102 causing the congestion of the output port is controlled to adjust the sending rate of the data flow sent to the output port.

In this embodiment, the network switching device 101 may adopt various embodiments to achieve the purpose of controlling the host 102 causing the congestion of the output port to adjust the sending rate of the data flow to the output port according to the data flow size information causing the congestion of the output port. Several embodiments are listed below:

in embodiment a, the network switching device 101 may send congestion control instructions to the host 102 causing congestion at its output port; the host 102 sends a data request to the network switching device 101 after receiving the congestion control command to request data flow scale information causing congestion of the output port; the network switching device 101 sends data flow size information causing congestion of an output port to the host 102 according to the received data request; after receiving the traffic size information, which causes congestion at the output port, sent by the network switching device 101, the host 102 adjusts the sending rate of the traffic to the output port according to the traffic size information.

In embodiment B, the network switching device 101 may transmit the data flow size information causing congestion of its output port to the host 102 causing congestion of its output port to control the host 102 to adjust the transmission rate of the data flow to the output port according to the data flow size information; after receiving the traffic size information, which causes congestion at the output port, sent by the network switching device 101, the host 102 adjusts the sending rate of the traffic to the output port according to the traffic size information.

In embodiment C, the network switching device 101 may generate a congestion notification message according to the data flow size information causing the congestion of the output port when the output port satisfies the congestion control condition, and send the congestion notification message to the host 102 causing the congestion of the output port, so that the host 102 can adjust the sending rate of the data flow to the output port based on the data flow size information causing the congestion of the output port.

Alternatively, a dedicated congestion notification message may be used between the network switching device 101 and the host 102, and the format of the dedicated congestion notification message is agreed in advance. Based on this, the network switching device 101 may fill the data flow size information causing congestion at its output port into the dedicated congestion notification message as a load of the dedicated congestion notification message, and send the data flow identification causing congestion at its output port to the host 102 causing congestion at its output port, carried in the dedicated congestion notification message. One format of an individual congestion notification message is shown in fig. 1b, including but not limited to: a source address field (SRC), a destination address field (DST), a Type field (Type), and a message load field (Payload).

Alternatively, the network switching device 101 may also use an existing congestion notification message and expand the existing congestion notification message, so as to send the data flow size information causing the congestion of its output port and the data flow identifier causing the congestion of its output port to the host 102 causing the congestion of its output port through the expanded congestion notification message. It should be noted that the extended congestion notification message may also use congestion feedback information obtained by the existing congestion control mechanism, such as Fb information. An extended congestion notification message format is shown in fig. 1c, including but not limited to: a source address field (SRC), a destination address field (DST), a Type field (Type), an Fb field, and a message load field (Payload).

If the network switching device 101 determines whether the output port of the network switching device satisfies the congestion control condition when a new packet arrives, and generates a congestion notification message according to the data flow size information causing the output port of the network switching device to be congested when the output port of the network switching device satisfies the congestion control condition, the network switching device 101 may extract the packet header of the new packet, exchange the source address information and the destination address information in the packet header, reset the type field in the packet header to the congestion notification type value, use the data flow size information causing the output port of the network switching device to be congested as a message load, and combine the adjusted packet header to form the congestion notification message, regardless of whether the generated dedicated congestion notification message or the extended congestion notification message is generated. In this embodiment, the network switching device 101 directly constructs the congestion notification message on the basis of the header of the new packet, which is relatively simple and easy to implement. Optionally, the source address information in the packet header includes a source IP address and a source port number, and the destination address information includes a destination IP address and a destination port.

In embodiment C, the host 102 may receive a congestion notification message sent by the network switching apparatus 101, where the congestion notification message carries the data flow size information and the data flow identifier, which cause congestion at the output port of the network switching apparatus 101. Alternatively, if the TCP/IP protocol is used in the network communication system 100, the data flow identifier may include, but is not limited to, a source IP address and a destination IP address of the data flow. Then, the host 102 calculates the target sending rate of the data stream causing the output port congestion at the local end according to the data stream scale information and the data stream identification causing the output port congestion; and adjusting the sending rate of the data flow causing the congestion of the output port by the local end according to the target sending rate.

The congestion notification message carries data flow size information causing congestion of the output port, and the data flow size information sharing the network bandwidth of the output port is reflected to a certain extent. Optionally, to avoid congestion, the data flows may halve the network bandwidth of the output port, each occupying the halved bandwidth resource. Based on the above, the bandwidth average number corresponding to the data flow causing the congestion of the output port at the local end can be calculated according to the data flow scale information and the data flow identification causing the congestion of the output port, which are carried in the congestion notification message; then, according to the network bandwidth of the output port and the calculated average bandwidth number corresponding to the current time, calculating the target sending rate of the data flow causing the congestion of the output port at the local end; and further, adjusting the sending rate of the data flow causing the congestion of the output port by the local end according to the target sending rate. For example, the sending rate of the data flow whose local end causes the congestion of the output port may be gradually adjusted to the target sending rate, or the sending rate of the data flow whose local end causes the congestion of the output port may be directly adjusted to the target sending rate.

Further optionally, the host side may record the last corresponding bandwidth share for each data stream. Based on this, in the case that the data flow size information causing the output port congestion is the number of data flows causing the output port congestion, the bandwidth average value corresponding to the data flow causing the output port congestion at the local end at this time can be calculated according to the following formula (1).

In the formula (1), R flowIndicating the previous corresponding bandwidth average number,

Figure BDA0001749045510000122

is a preset weight coefficient and is a configurable parameter; c IncastIndicating the number of data flows causing congestion at the output port, R new-flowIndicating the corresponding bandwidth average at this time.

In an optional embodiment, the Fb field of the congestion notification message carries congestion degree indication information of the output buffer of the output port, where the congestion degree indication information may be obtained by using a congestion control method such as QCN or DCQCN. Based on this, one way to calculate the target sending rate includes: calculating a first sending rate according to congestion degree indication information of an output buffer of an output port carried in the congestion notification message, for example, a rate calculation method f () supported by a congestion control manner such as QCN or DCQCN may be used to calculate the first sending rate, which may be denoted as f (fb); and calculating a second sending rate, which can be expressed as BW/R, according to the network bandwidth BW of the output port and the corresponding bandwidth average number at this time new-flow(ii) a From the first transmission rate and the second transmission rate, a smaller transmission rate is selected as a target transmission rate.

It should be noted that in the above embodiments a-C, the output port may be any output port of the network switching device 101, and the host 102 may be any host causing congestion to the output port.

In this embodiment, in the congestion control process, information of data flow size that causes congestion at an output port of a network switching device is introduced, and the information can reflect the congestion situation of the output port more comprehensively on the whole, and belongs to global congestion Incast information.

In addition, when Incast congestion occurs, the network switching device actively sends a congestion notification message to the host 102 causing the congestion, which is beneficial to shortening the delay of congestion notification and improving the efficiency of congestion resolution. Moreover, for each host causing the output port of the network switching device to be congested, the rate of the corresponding data stream is adjusted according to the global congestion Incast information, so that the sending rate of the corresponding data stream can be quickly reduced to a proper position, and speed regulation is not required to be attempted in a detection mode (for example, the rate may be increased or reduced), so that the situation of speed regulation synchronization caused by speed regulation in a detection mode can be avoided among the hosts, the probability of network thrashing can be reduced, and the probability of overload or underload of the network can be reduced.

For the network switching device, operations of detecting whether an output port of the network switching device is congested, obtaining data flow scale information causing the output port of the network switching device to be congested, feeding back the data flow scale information to a data flow sending end causing the output port of the network switching device to be congested, and the like, may be implemented in a software manner, and of course, may also be implemented in hardware. When the network switching device is implemented in a hardware manner, the embodiment of the present application does not limit a hardware implementation structure of the network switching device, and any hardware structure that can implement the above operations is applicable to the embodiment of the present application. Some exemplary embodiments of the present application provide a network switching device, which implements the above operations in a hardware manner. For the hardware implementation structure of the network switching device, reference may be made to the following embodiments.

As shown in fig. 2a, a hardware structure of a network switching device provided in an embodiment of the present application includes: m output ports and K congestion detection modules, wherein M and K are positive integers. And the M output ports are used for forwarding the data stream from the data stream sending end. The data stream sending end may be a host or an upstream network switching device. The congestion detection modules are used for monitoring the data flow distribution conditions of the M output ports so as to acquire data flow scale information causing congestion of each output port; and for each output port, controlling the data flow sending end causing the congestion of the output port to adjust the sending rate of the data flow sent to the output port according to the data flow scale information causing the congestion of the output port.

In this embodiment, the number of M and K is not limited, and accordingly, the correspondence between the M output ports and the K congestion detection modules is not limited. In fig. 2a, the correspondence between the output port and the congestion detection module is indicated by a "dotted line", and the correspondence is not limited thereto. For example, one congestion detection module may be responsible for performing congestion detection on multiple output ports, one congestion detection module may be responsible for performing congestion detection on one output port, or multiple congestion detection modules may perform congestion detection on one output port together.

No matter how the corresponding relation between the M output ports and the K congestion detection modules is, the implementation structure and the function of each congestion detection module are basically the same. The main difference between different congestion detection modules is that the amount of data of the responsible output port may vary. Therefore, in this embodiment, a single congestion detection module is taken as an example, and the implementation structure of the congestion detection module is described in detail.

In this embodiment, the content of the "data flow size information causing the congestion of the output port" is not limited, and all information capable of reflecting the congestion condition of the output port more comprehensively on the whole is suitable for the embodiment of the present application. For example, the information on the size of the data flow causing the congestion of the output port may be the number of data flows causing the congestion of the output port, or may be the total data flow causing the congestion of the output port, or of course, may be a combination of the number of data flows causing the congestion of the output port and the data flow accumulated on the output port for each data flow, or the like.

As shown in fig. 2b, each congestion detection module comprises: a congestion detection sub-module and a congestion notification sub-module. The congestion detection submodule is configured to periodically monitor, for each output port of the Mx output ports for which the congestion detection submodule belongs, the number of times that each data flow on the output port continuously appears at a time interval smaller than a set time interval, so as to obtain the number of data flows causing the output port to be congested in each monitoring period, where the number of data flows is used as the size information of the data flows causing the output port to be congested. Correspondingly, the congestion notification submodule is used for controlling the data flow sending end causing the congestion of the output port to adjust the sending rate of the data flow sent to the output port according to the quantity of the data flow causing the congestion of the output port aiming at each output port in the Mx output ports. Wherein Mx is a positive integer, Mx is less than or equal to M; in addition, the values of Mx may be the same or different for different congestion detection modules.

Further, as shown in fig. 2b, each congestion detection module further includes: a periodic reset timer, a mapping submodule, a congestion information table and a counter.

The periodic reset timer is used for repeatedly timing the monitoring period. And the counter is used for recording the number of data flows causing the congestion of the output port in each monitoring period for each output port of the Mx output ports. Alternatively, the number of counters may be Mx, such that one counter may count for one output port.

And the congestion information table is used for recording the continuous occurrence times of each data stream on each output port of the Mx output ports at intervals less than the set time interval and the latest arrival time of the data stream on the output port.

Optionally, the implementation style of the congestion information table is not limited in the present application, and any table format capable of storing the above information is applicable to the embodiment of the present application. For example, one format of the congestion information table is shown in fig. 2c, including but not limited to: a Hit field (Hit) for recording whether the data flow hitting the entry belongs to the data flow causing the output port Incast corresponding to the entry; a time stamp field (TS) for recording the time stamp of the last hit of the data stream of the entry; and a Counter field (Counter) for recording the number of times the data stream hitting the entry occurs in less than a preset time interval, i.e. the number of times the entry is hit.

And the mapping submodule is used for determining a corresponding table entry of the data flow in the congestion information table according to the flow information of the data flow reaching the output port when the data flow reaches the output port aiming at each output port in the Mx output ports. Optionally, the mapping sub-module may perform a Hash (Hash) operation on the flow information of the data flow, and determine a corresponding entry of the data flow in the congestion information table according to a Hash result. Based on this, the mapping submodule may also be referred to as a Hash submodule.

Based on the periodic reset timer, the mapping submodule, the congestion information table and the counter, the congestion detection submodule is specifically configured to: for each output port of Mx output ports, in each monitoring period, when a data stream reaches the output port, acquiring the time of the data stream reaching the output port for the last time from a table entry output by a mapping submodule, calculating the difference value between the time of the data stream reaching the output port for the current time and the time of the data stream reaching the output port for the last time, and adding 1 to the number of times of the data stream recorded in the table entry when the difference value is smaller than a set time interval; and when the number of times of occurrence of the data flow in the time interval smaller than the preset time interval is larger than the set number threshold, determining that the data flow belongs to the data flow causing the congestion of the output port, and adding 1 to the value of the counter.

The congestion detection sub-module is further configured to: and resetting the congestion information table when the difference is larger than or equal to the set time interval, namely resetting the data stream recorded in the hit table entry in the congestion information table to 0 by the frequency smaller than the preset time interval, and updating the time when the data stream recorded in the hit table entry reaches the output port for the latest time as the time when the data stream reaches the output port for the current time.

Further, the congestion detection sub-module is further configured to: when the periodic reset timer finishes timing, namely each monitoring period is finished, setting the times of occurrence of each data stream recorded in the congestion information table in a time interval smaller than a preset time interval as 0, setting the value of the counter as 1, and resetting the time of the latest arrival of each data stream at the corresponding output port recorded in the congestion information table as the current time.

In an optional embodiment, the congestion notification sub-module is specifically configured to: when the output port meets the congestion control condition, generating a congestion notification message according to the data flow scale information causing the congestion of the output port; and sending the congestion notification message to a data flow sending end causing the congestion of the output port so that the data flow sending end can adjust the sending rate of the data flow sent to the output port based on the data flow scale information.

The congestion control conditions can be flexibly set according to actual service scenes. Optionally, the congestion notification sub-module is specifically configured to: and when a new data packet arrives at the network switching equipment, if the data flow to which the new data packet belongs to the data flow causing the congestion of the output port and the output buffer of the output port reaches the congestion notification threshold, determining that the output port meets the congestion control condition.

Further, as shown in fig. 2c, the network switching device provided in the embodiment of the present application further includes: n input ports and a crossbar. The N input ports are interconnected with the M output ports through the cross switch, and N is a positive integer. Wherein, M and N can be the same or different; preferably, M ═ N.

The N input ports are mainly used for receiving data packets sent by a data stream sending end connected to the network switching device 101 or other network switching devices, and forwarding the data packets to corresponding output ports through the crossbar.

The crossbar switch is mainly responsible for forwarding data from the input port to the output port, that is, acquiring a data packet from the input port, identifying a data stream to which the data packet belongs, and forwarding the data packet to the output port corresponding to the data stream.

And the M output ports are mainly used for receiving the data packets from the cross bar switch and sending the data packets to a receiving end host or other network switching equipment connected with the network switching equipment.

In an optional embodiment, the number of output ports in the network switching device is the same as the number of congestion detection modules, that is, M is equal to K, and the congestion detection modules correspond to the output ports one to one, that is, one congestion detection module is responsible for performing congestion detection on one output port.

Alternatively, as shown in fig. 2c, the congestion detection module may be disposed on the output port corresponding thereto, such that each output port includes: an output buffer and a congestion control module. The output buffer area is used for caching the data packet forwarded by the crossbar switch; the congestion control module is responsible for acquiring data flow scale information causing congestion of an output port to which the congestion control module belongs, namely global congestion Incast information, recording the global congestion Incast information, generating a congestion notification message according to the global congestion Incast information when an output buffer reaches a congestion control condition, and sending the congestion notification message to a data flow sending end connected with the input port through the input port so as to control the data flow sending end to adjust the sending rate of data flow sent to the output port according to the global congestion Incast information.

Further, the congestion detection module on each output port may include the following hardware modules: the system comprises a periodic reset timer, a Hash submodule, a congestion information table, a counter, a congestion detection submodule and a congestion notification submodule. For simplicity of illustration, the hardware structure of only one congestion detection module is shown in fig. 2 c. The following describes the operation principle of congestion detection performed by the network switching device with reference to the hardware structure of the congestion detection module shown in fig. 2 c:

an output port on the network switching device is denoted as a first output port. The periodic reset timer of the first output port repeatedly clocks the monitoring period T. The monitoring period T is configurable, and may be a fixed value or a dynamic value calculated according to the network status.

During the period that the periodic reset timer times the monitoring period T, the congestion detection submodule monitors whether a data packet reaches an input port of the network switching equipment or not; if the data packet arrival is monitored, the Hash submodule is triggered to carry out Hash mapping on the flow information of the data packet, and the flow information is mapped into an address for inquiring a congestion information table; the congestion detection submodule accesses a corresponding table entry in the congestion information table according to the address output by the Hash submodule, reads the time recorded in the TS field in the table entry, and calculates the difference value between the read time and the time of the data packet arriving at this time; if the difference is smaller than the set time interval, adding 1 to the value of the Counter field in the table entry, updating the time recorded by the TS field in the table entry to the time when the data packet arrives at this time, then judging whether the Hit field in the table entry is invalid or not, and judging whether the value of the Counter field is larger than a set time threshold or not; if the Hit field in the table entry is invalid and the value of the Counter field is greater than the set time threshold, setting the Hit field in the table entry to be valid, and triggering a Counter to add 1; if the difference is greater than or equal to the set time interval, the value of the Counter field in the table entry is reset to 0, and the time recorded in the TS field in the table entry is updated to the time of the arrival of the data packet. Alternatively, the flow information of the packet may be a five-tuple. The Hash algorithm is not limited to be adopted, and the lower the collision probability of the Hash algorithm is, the better the effect is.

When the periodic reset timer finishes timing, the congestion detection submodule is triggered to perform reset operation on the congestion information table and the Counter, for example, the value of the Counter is set to 1, the time recorded in the TS field in each entry in the congestion information table is updated to the current time, the Hit field in each entry is reset to be invalid, and the value of the Counter field in each entry is reset to be 0.

In the working process of each module, the congestion notification submodule of the first output port detects whether the first output port meets the congestion notification condition. For example, the congestion notification sub-module monitors whether a new data packet arrives at the first output port, and when a new data packet arrives at the first output port, on one hand, a Hit field in a table entry corresponding to the new data packet in the congestion information table is queried to determine whether the Hit field is valid, and on the other hand, whether an output buffer of the first output port reaches a congestion notification threshold is queried; if the inquired Hit domain is valid and the output buffer of the first output port reaches the congestion notification threshold, reading the count value of the counter and carrying the count value in a congestion notification message and sending the congestion notification message to the data flow sending end causing the congestion of the first output port through the corresponding input port, so that the data flow sending end limits the speed of the data flow sent to the first output port according to the count value of the counter, namely the global congestion Incast information. The global congestion Incast information can comprehensively reflect the congestion situation on the whole, so that the data flow sending end can be prompted to quickly reduce the sending rate to the right, the convergence rate of the sending rate is increased, the congestion can be conveniently and quickly eliminated, and the bandwidth utilization rate is improved.

In addition to a network communication system and a network switching device, some example embodiments of the present application also provide a host. The host provided by the embodiment of the application has the functions of generating data flow, consuming data flow, receiving and sending the data flow through the network switching equipment and the like, and in addition, the speed of the corresponding data flow can be limited according to the congestion notification message sent by the network switching equipment so as to solve the problem of network congestion. The function of the host for limiting the speed of the corresponding data stream according to the congestion notification message sent by the network switching equipment can be realized in a software mode or a hardware mode. The host provided by the embodiment of the application adopts a hardware mode to realize the functions. For the hardware implementation structure of the host, see the following embodiments.

As shown in fig. 3, the hardware structure of the host provided in the embodiment of the present application includes: a communication port 31, a calculation module 32 and a congestion control module 33.

The communication port 31 is configured to receive a congestion notification message sent by the network switch device, where the congestion notification message carries data flow size information and a data flow identifier that cause congestion at an output port of the network switch device.

And the calculating module 32 is connected to the communication port 31 and configured to calculate a target sending rate of the data flow causing the output port congestion at the local end according to the data flow size information and the data flow identifier, which are received by the communication port 31 and cause the output port congestion.

And the congestion control module 33 is connected to the calculation module 32, and is configured to adjust the sending rate of the data stream whose local end causes the congestion of the output port according to the target sending rate calculated by the calculation module 32.

Further, the calculation module 32 is specifically configured to: calculating the bandwidth average number corresponding to the data flow causing the output port congestion at the local end according to the data flow scale information and the data flow identification causing the output port congestion; and calculating the target sending rate of the target data stream according to the network bandwidth of the output port and the bandwidth average value corresponding to the time.

Furthermore, the host provided in this embodiment may further include a register, where the register is used to record a corresponding bandwidth average value before the data flow causing the output port congestion by the local end. Based on this, when obtaining the bandwidth average value corresponding to this time, the calculating module 32 is specifically configured to: acquiring a bandwidth average corresponding to the data flow which causes the congestion of the output port at the local end according to the data flow identification which causes the congestion of the output port; and updating the previous corresponding bandwidth halving number according to the data flow scale information causing the congestion of the output port to obtain the current corresponding bandwidth halving number.

Alternatively, in the case that the data flow size information causing the output port congestion is the number of data flows causing the output port congestion, the calculation module 32 may obtain the corresponding bandwidth average number before the data flow causing the output port congestion at the local end according to the formula (1). For formula (1), reference is made to the description of the foregoing embodiments, which are not repeated herein.

Further, the congestion control module 33 may be further configured to perform a conventional rate recovery procedure, and when the rate recovers to PR or exceeds the time threshold T', the value in the register is reset to 1, so that the calculating module 32 recalculates the new bandwidth average value, thereby ending the current limiting operation.

The host provided by this embodiment performs rate adjustment on the corresponding data stream according to the global congestion Incast information, so that the sending rate of the corresponding data stream can be quickly reduced to the right, the number of rate adjustment times can be reduced, the convergence rate of the sending rate of the corresponding data stream is increased, congestion can be quickly eliminated, and the bandwidth utilization rate is further improved.

Fig. 4a is a flowchart illustrating a congestion control method described from the perspective of a network switching device according to an exemplary embodiment of the present application. As shown in fig. 4a, the method comprises:

401. the data flow distribution condition of the output port of the network switching equipment is monitored to obtain the data flow scale information causing the congestion of the output port.

402. And controlling the data flow sending end causing the output port congestion to adjust the sending rate of the data flow sent to the output port according to the data flow scale information causing the output port congestion.

In this embodiment, the content of the "data flow size information causing the congestion of the output port" is not limited, and all information capable of reflecting the congestion condition of the output port more comprehensively on the whole is suitable for the embodiment of the present application. For example, the information on the size of the data flow causing the congestion of the output port may be the number of data flows causing the congestion of the output port, or may be the total data flow causing the congestion of the output port, or of course, may be a combination of the number of data flows causing the congestion of the output port and the data flow accumulated on the output port for each data flow, or the like.

In this embodiment, the network switching device monitors the data flow distribution at its output port, obtains the data flow size information causing the output port congestion, that is, the global congestion Incast information, and then controls the data flow sending end causing the output port congestion to adjust the sending rate of the data flow sent to the output port according to the obtained data flow size information. The data flow scale information causing the output port congestion can comprehensively reflect the congestion situation on the whole, so that the data flow sending end can be prompted to quickly reduce the sending rate to the right, the convergence rate of the sending rate is increased, the congestion is conveniently and quickly eliminated, and the bandwidth utilization rate is improved.

In an alternative embodiment, step 401 comprises: and periodically monitoring the number of times that each data flow on the output port continuously appears in a time interval smaller than the set time interval to acquire the number of data flows causing the congestion of the output port in each monitoring period as the data flow scale information causing the congestion of the output port.

In an alternative embodiment, as shown in fig. 4b, the implementation of step 401 includes:

4011. in the current monitoring period, when a data stream arrives at the output port, the difference value between the time when the data stream arrives at the output port and the time when the data stream arrives at the output port last time is calculated.

4012. Judging whether the difference is smaller than a set time interval or not; if yes, go to step 4013; if the determination result is negative, go to step 4016.

4013. The data stream is incremented by 1 less than the preset time interval and proceeds to step 4014.

4014. Judging whether the frequency of the data stream appearing in a time interval smaller than a preset time interval is larger than a set frequency threshold value or not; if yes, go to step 4015; if the determination result is negative, go to step 4017.

4015. It is determined that the data flow belongs to a data flow causing the congestion of the output port, and the number of data flows causing the congestion of the output port in the supervision period is added by 1, and step 4017 is entered.

4016. Setting the number of times that the data stream appears in a time interval smaller than the preset time interval as 0, updating the time that the data stream has arrived at the output port last time as the time that the data stream arrives at the output port this time, and proceeding to step 4017.

4017. Judging whether the current monitoring period is finished or not; if the judgment result is negative, returning to the step 4011; if yes, go to step 4018.

4018. Resetting the number of times of occurrence of each data stream in a time interval smaller than the preset time interval, the number of data streams causing congestion of the corresponding output port, and the time of arrival of each data stream at the corresponding output port last time, entering the next monitoring period, and returning to the step 4011.

Optionally, at the end of each monitoring period, the number of times that each data flow acquired in the monitoring period appears at intervals less than a preset time interval may be set to 0, the number of data flows acquired in the monitoring period that cause congestion of the corresponding output port may be set to 1, and the time when each data flow recorded in the monitoring period has recently reached the corresponding output port may be reset to the current time.

In an alternative embodiment, step 402 includes: when the output port meets the congestion control condition, generating a congestion notification message according to the data flow scale information causing the congestion of the output port; and sending the congestion notification message to a data flow sending end causing the congestion of the output port so that the data flow sending end can adjust the sending rate of the data flow sent to the output port based on the data flow scale information.

Further, in step 402, whenever a new packet arrives, if the data flow to which the new packet belongs to the data flow causing the congestion of the output port, and the output buffer of the output port reaches the congestion notification threshold, it is determined that the output port satisfies the congestion control condition. Accordingly, generating the congestion notification message includes: extracting a packet header of a new data packet, exchanging source address information and destination address information in the packet header, and resetting a type domain in the packet header to a congestion notification type value; and constructing a congestion notification message by combining the packet header with the data flow scale information as a message load.

Fig. 5 is a flowchart illustrating a congestion control method from a perspective of a host according to an exemplary embodiment of the present application. As shown in fig. 5, the method includes:

501. and receiving a congestion notification message sent by the network switching equipment, wherein the congestion notification message carries the data flow scale information and the data flow identification which cause the congestion of an output port of the network switching equipment.

502. And calculating the target sending rate of the data flow causing the output port congestion at the local end according to the data flow scale information and the data flow identification causing the output port congestion.

503. And adjusting the sending rate of the data flow causing the congestion of the output port by the local end according to the target sending rate.

Optionally, one implementation of step 502 includes: calculating the bandwidth average number corresponding to the data flow causing the output port congestion at the local end according to the data flow scale information and the data flow identification causing the output port congestion; and calculating the target sending rate of the data flow causing the output port congestion at the local end according to the network bandwidth of the output port and the bandwidth average value corresponding to the time.

Further optionally, the calculating the bandwidth halving number corresponding to the data flow causing the output port congestion at this time by the local end includes: acquiring a bandwidth average corresponding to the data flow which causes the congestion of the output port at the local end according to the data flow identification which causes the congestion of the output port; and updating the previous corresponding bandwidth halving number according to the data flow scale information causing the congestion of the output port to obtain the current corresponding bandwidth halving number.

Optionally, one implementation of step 503 includes: calculating a first sending rate according to congestion degree indication information of an output buffer area of an output port carried in the congestion notification message; calculating a second sending rate according to the network bandwidth of the output port and the bandwidth average number corresponding to the time; from the first transmission rate and the second transmission rate, a smaller transmission rate is selected as a target transmission rate.

In the embodiment of the application, the rate of the corresponding data flow is adjusted according to the data flow scale information causing the congestion of the output port, namely the global congestion Incast information, so that the sending rate of the corresponding data flow can be quickly reduced to the right, the rate adjustment times can be reduced, the convergence rate of the sending rate of the corresponding data flow is accelerated, the congestion can be quickly eliminated, and the bandwidth utilization rate is further improved.

It should be noted that the execution subjects of the steps of the methods provided in the above embodiments may be the same device, or different devices may be used as the execution subjects of the methods. For example, the execution subjects of steps 401 to 402 may be device a; for another example, the execution subject of step 401 may be device a, and the execution subject of step 402 may be device B; and so on.

In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 401, 402, etc., are merely used to distinguish various operations, and the sequence numbers themselves do not represent any execution order. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.

As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

The memory may include forms of volatile memory in a computer readable medium, 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 a computer-readable medium.

Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.

It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

25页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于时延约束的数据发送方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!