Network congestion control method, device and computer-readable storage medium
By obtaining and managing congestion control messages in the switch, the network failure problem caused by the source device's inability to respond to congestion control messages is solved, and the effective management of data messages is achieved, network congestion is alleviated and the forwarding performance of the switch is improved. .
Patent Information
- Application Number
- CN202010598352.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-28
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2040-06-28
AI Technical Summary
In a data center switch, when the source device cannot respond in time or cannot respond to congestion control messages, it will cause serious failures in network services and a large number of congestion control messages cannot be processed in time, affecting the forwarding performance of the switch.
The switch obtains congestion control packets from the destination device and sends them to the source device, obtains data packets from the source device, and determines whether the source device responds to congestion control packets based on the message rate, and performs targeted management to avoid Network congestion and forwarding performance attenuation.
By judging the response status of the source device, the switch can effectively manage data packets, alleviate network congestion, avoid attenuation of switch forwarding performance, and improve network stability and robustness.
Smart Images

Figure CN113852558B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to, but are not limited to, the field of network technology, and in particular to a network congestion control method, a switch, a congestion control device, and a computer-readable storage medium. Background Art
[0002] In the application scenarios of high-performance computing, distributed storage, and artificial intelligence, data center switches face high concurrency and high burst traffic, which places higher and higher requirements on the performance of switches. Switches need to achieve zero packet loss in complex networking to ensure business sustainability. If the source does not respond in time or cannot respond during congestion processing, it will cause serious failures in network services.
[0003] However, in the related technology, the scenario where the source device cannot respond or cannot respond to the congestion control message in time is not considered. Once the source device cannot respond or cannot respond to the congestion control message in time for some reason, the destination device will continue to send congestion control messages. In a complex network, a large number of congestion control messages cannot be processed in time, which will directly affect the forwarding performance of the intermediate switches and other network devices. Summary of the invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] In a first aspect, an embodiment of the present invention provides a network congestion control method, a switch, a congestion control device, and a computer-readable storage medium, which can determine a situation where a congestion control message sent by a destination device does not receive a response from a corresponding source device, so that the switch can perform congestion control management on a data message obtained from the source device, thereby alleviating network congestion and avoiding degradation of the switch forwarding performance.
[0006] In a second aspect, an embodiment of the present invention provides a network congestion control method, which is applied to a switch, and the method includes:
[0007] Obtain congestion control messages from the destination device;
[0008] Sending the congestion control message to the corresponding source device, and obtaining the first data message from the source device;
[0009] It is determined that the source device has not responded to the congestion control message according to the message rate of obtaining the first data message, and congestion control management is performed on the first data message obtained from the source device.
[0010] In a third aspect, an embodiment of the present invention provides a switch, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the network congestion control method as described in the second aspect above is implemented.
[0011] In a fourth aspect, an embodiment of the present invention provides a network congestion control device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the network congestion control method as described in the second aspect above is implemented.
[0012] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the network congestion control method as described above.
[0013] The embodiment of the present invention includes: the switch obtains a congestion control message from a destination device, then sends the congestion control message to a corresponding source device, obtains a first data message from the source device, determines that the source device does not respond to the congestion control message according to the message rate of obtaining the first data message, and performs congestion control management on the first data message obtained from the source device. Therefore, the solution provided by this embodiment can determine the situation where the congestion control message sent by the destination device does not receive a response from the corresponding source device, so that the switch can perform congestion control management on the data message obtained from the source device, thereby reducing network congestion and avoiding the attenuation of the switch forwarding performance.
[0014] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.
[0016] Figure 1 is a flow chart of a network congestion control method provided by an embodiment of the present invention;
[0017] Figure 2 It is a schematic diagram of the overall structure of a switch provided by an embodiment of the present invention connected to a source-end device and a destination-end device respectively;
[0018] Figure 3It is a schematic diagram of the structure of a switch provided by an embodiment of the present invention;
[0019] Figure 4 It is a schematic diagram of the structure of a network congestion control device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0021] It should be understood that in the description of the embodiments of the present invention, the meaning of multiple (or multiple) is more than two, greater than, less than, and exceeding are understood to exclude the number itself, and above, below, and within are understood to include the number itself. If there is a description of "first", "second", etc., it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0022] In the application scenarios of high-performance computing, distributed storage, and artificial intelligence, data center switches face high concurrency and high burst traffic, which places higher and higher requirements on the performance of switches. Switches need to achieve zero packet loss in complex networking to ensure business sustainability. If the source does not respond in time or cannot respond during congestion processing, it will cause serious failures in network services.
[0023] However, in the related technology, the scenario where the source device cannot respond or cannot respond to the congestion control message in time is not considered. Once the source device cannot respond or cannot respond to the congestion control message in time for some reason, the destination device will continue to send congestion control messages. In a complex network, a large number of congestion control messages cannot be processed in time, which will directly affect the forwarding performance of the intermediate switches and other network devices.
[0024] The embodiment of the present invention provides a network congestion control method, a congestion control device, a switch and a computer-readable storage medium, wherein a congestion control message is obtained from a destination device through a switch, and then the congestion control message is sent to a corresponding source device, and a first data message is obtained from the source device, and the source device is determined to have not responded to the congestion control message according to the message rate of obtaining the first data message, and congestion control management is performed on the first data message obtained from the source device. Therefore, the solution provided by this embodiment can determine the situation where the congestion control message sent by the destination device cannot be responded to by the corresponding source device, so that the switch can perform congestion control management on the data message obtained from the source device, thereby alleviating network congestion and avoiding the attenuation of the switch forwarding performance.
[0025] like Figure 1 As shown, Figure 1 The flowchart of a network congestion control method provided by an embodiment of the present invention is as follows. The network congestion control method is applied to a switch, and includes but is not limited to the following steps:
[0026] Step 101: Obtain a congestion control message from a destination device.
[0027] Step 102: Send a congestion control message to a corresponding source device, and obtain a first data message from the source device.
[0028] Step 103: determine that the source device does not respond to the congestion control message according to the message rate of obtaining the first data message, and perform congestion control management on the first data message obtained from the source device.
[0029] In one embodiment, when congestion occurs at the destination port of the switch connected to the destination device, the switch will obtain a congestion control message from the destination device, and then send the congestion control message to the corresponding source device. In order to determine whether the source device responds to the congestion control message, the switch obtains a first data message from the source device. The switch determines that the source device does not respond to the congestion control message according to the message rate of obtaining the first data message, and performs congestion control management on the first data message obtained from the source device, so as to actively perform targeted processing on the first data message, so that the switch does not have congestion packet loss. Therefore, by sampling the congestion control message and the corresponding first data message, it is possible to determine the situation where the congestion control message sent by the destination device does not receive a response from the corresponding source device, so that the switch can perform congestion control management on the data message obtained from the source device, thereby alleviating network congestion and avoiding the attenuation of the switch forwarding performance. It should be pointed out that the first data message refers to the data message obtained by the switch from the source device when the destination device continues to send the same congestion control message to the corresponding source device.
[0030] In one embodiment, step 103 may include but is not limited to the following sub-steps:
[0031] When the message rate of the first data message obtained from the source device is not lower than the first threshold, it is determined that the source device does not respond to the congestion control message.
[0032] In this embodiment, when the message rate of the first data message obtained from the source device is not lower than the first threshold, it means that the message rate of the first data message sent by the source device to the switch has not been reduced, so it can be determined that the source device has not responded to the congestion control message. The switch actively identifies that the congestion control message cannot take effect on the source device, thereby avoiding the situation where the source device cannot respond to the congestion control message in time or cannot respond to the congestion control message in time.
[0033] It should be noted that the first threshold is a normal value of the message rate of the data message obtained by the switch from the source device when there is no port congestion on the switch, which is used for reference comparison with the message rate of the first data message to measure whether the message rate of the first data message sent by the source device to the switch has dropped. Therefore, there is no specific restriction on the first threshold.
[0034] In one embodiment, step 103 may include but is not limited to the following sub-steps:
[0035] A first data packet is sent to a destination device, and no congestion mark is made for the first data packet.
[0036] It should be noted that under the original congestion detection mechanism, when the destination port of the switch connected to the destination device is congested, the data packets sent by the switch to the destination device will be marked as congested.
[0037] In this embodiment, when it is determined that the source device does not respond to the congestion control message, the switch will send the first data message to the destination device, and will not mark the first data message as congestion. In this embodiment, since the switch recognizes that the congestion control message cannot take effect on the source device, after a large number of repeated and useless congestion control messages are generated in the network, the switch will actively stop meaningless congestion notifications. Therefore, the switch does not mark the first data message sent to the destination device as congestion, so that the destination device no longer continuously sends congestion control messages to the source device, so as to avoid actively stopping useless congestion control messages to affect the forwarding performance of the switch.
[0038] In one embodiment, step 103 may include but is not limited to the following sub-steps:
[0039] Control the first data message obtained from the source device.
[0040] In this embodiment, the switch controls the first data message obtained from the source device, that is, the switch can actively perform targeted processing on the first data message sent by the source device to prevent congestion and packet loss in the switch.
[0041] In one embodiment, controlling the first data message obtained from the source device may include any one of the following:
[0042] Limiting the speed of the first data message obtained from the source device;
[0043] discarding the first data message obtained from the source device;
[0044] Randomly process the first data message obtained from the source device.
[0045] In this embodiment, when it is determined that the source device does not respond to the congestion control message, the switch can actively perform targeted processing on the first data message sent by the source device, for example, the first data message obtained from the source device can be limited in speed; or, the first data message obtained from the source device can be discarded; or, the first data message obtained from the source device can be randomly processed. Through any of the above processing methods, the switch is prevented from experiencing congestion packet loss, ensuring that after the congestion control message notification mechanism fails, the switch does not experience port congestion, thereby improving the stability and robustness of the network.
[0046] In one embodiment, the following steps are also included:
[0047] A prompt message is sent to the external device, where the prompt message is used to prompt that the source device has not responded to the congestion control message.
[0048] In this embodiment, when it is determined that the source device does not respond to the congestion control message, the switch can send a prompt message to the external device, where the prompt message is used to prompt the source device to not respond to the congestion control message, so as to prompt the user to handle it in time.
[0049] In one embodiment, the following steps are also included:
[0050] If it is determined that the message rate of the first data message obtained from the source device is lower than the first threshold, congestion marking of the first data message sent to the destination device is restored.
[0051] In this embodiment, the switch performs traffic statistics on the source port connected to the source device. When it is determined that the message rate of the first data message obtained from the source device is lower than the first threshold, it is judged that the source device has slowed down, which means that the source device has restored the function of responding to congestion control messages. The congestion detection mechanism of the switch can be restored, and the first data message sent to the destination device can be re-marked as congested, thereby ensuring that the congestion detection can be automatically restored and the normal operation of the switch device can be ensured.
[0052] The following uses a specific configuration scenario as an example to further introduce the network congestion control method provided by the embodiment of the present invention.
[0053] like Figure 2 As shown, Figure 2 The present invention is a schematic diagram of an overall structure in which a switch provided by an embodiment of the present invention is connected to a source-end device and a destination-end device respectively.
[0054] The switch is connected to source device 1 through source port 1, source port 2 through source device 2, source port 3 through source device 3, and destination port 4 through destination device 4. Among them, source device 1, source device 2, source device 3, and destination device 4 are all server devices that support the RDMA (Remote Direct Memory Access) standard by default, and the switch enables congestion detection and congestion control functions by default.
[0055] Source device 1, source device 2, and source device 3 simultaneously send line-speed traffic to destination device 4. When the destination port 4 connected to the switch is congested, the switch marks the data message sent from the destination port 4 as congested, indicating that the port is congested. After receiving the data message marked as congested, the destination device 4 will actively encapsulate the congestion control message according to the source information of the message to respond to the source device. After receiving the corresponding congestion control message, the switch sends the corresponding congestion control message to source device 1, source device 2, and source device 3 through source port 1, source port 2, and source port 3 respectively.
[0056] It is assumed here that source device 1, source device 2, and source device 3 are unable to respond to the congestion control message in time after receiving the congestion control message for some reason, resulting in failure to achieve speed reduction.
[0057] At this time, the switch obtains the first data packets respectively from source device 1, source device 2 and source device 3 at a message rate not lower than the first threshold, which means that the message rates of the first data packets respectively sent to the switch by source device 1, source device 2 and source device 3 are not reduced, so it can be determined that source device 1, source device 2 and source device 3 do not respond to the congestion control message.
[0058] Based on the switch's recognition that the congestion control message cannot be effective for source device 1, source device 2, and source device 3, after a large number of repeated and useless congestion control messages are generated in the network, the switch will actively stop meaningless congestion notifications. Therefore, the switch does not mark the first data message sent to the destination device 4 as congestion, that is, turns off the switch's congestion detection mechanism, so that the destination device 4 no longer continues to send congestion control messages to the source device 1, source device 2, and source device 3, so as to avoid actively stopping useless congestion control messages and affecting the switch's forwarding performance.
[0059] On the other hand, the switch can actively perform targeted processing on the first data packets sent by source device 1, source device 2, and source device 3. For example, the first data packets obtained from source device 1, source device 2, and source device 3 can be speed-limited; or, the first data packets obtained from source device 1, source device 2, and source device 3 can be discarded; or, the first data packets obtained from source device 1, source device 2, and source device 3 can be randomly processed. Through any of the above processing methods, the switch can be prevented from congestion packet loss, and it is ensured that the switch does not have port congestion after the congestion control message notification mechanism fails, thereby improving the stability and robustness of the network. In addition, the switch can send prompt information to the external device, and the prompt information is used to prompt the source device 1, source device 2, and source device 3 that they have not responded to the congestion control message, so as to prompt the user to handle it in time.
[0060] At the same time, the switch performs traffic statistics at source port 1, source port 2, and source port 3 respectively. When it is determined that the message rate of the first data message obtained from source device 1, source device 2, and source device 3 is lower than the first threshold, it is judged that source device 1, source device 2, and source device 3 have slowed down, which means that source device 1, source device 2, and source device 3 have restored the function of responding to congestion control messages. Then, the congestion detection mechanism of the switch can be restored, and the first data message sent to the destination device 4 can be re-marked as congested, so as to ensure that the congestion detection can be automatically restored and the normal operation of the switch device can be ensured. Based on this, when it is determined that source device 1, source device 2, and source device 3 have not responded to the congestion control message, the switch can automatically adjust the congestion detection mechanism to realize automatic network management, automatic operation and maintenance, and automatic repair.
[0061] like Figure 3 As shown, an embodiment of the present invention further provides a switch.
[0062] Specifically, the switch includes: one or more processors and a memory, Figure 3 A processor and a memory are taken as an example. The processor and the memory can be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.
[0063] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs, such as the network congestion control method in the above-mentioned embodiment of the present invention. The processor implements the network congestion control method in the above-mentioned embodiment of the present invention by running the non-transitory software programs and programs stored in the memory.
[0064] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data required to execute the network congestion control method in the above-mentioned embodiment of the present invention, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0065] The non-transient software program and program required to implement the network congestion control method in the above embodiment of the present invention are stored in the memory, and when executed by one or more processors, the network congestion control method in the above embodiment of the present invention is executed, for example, the above described Figure 1 In the method steps 101 to 103, the switch obtains a congestion control message from the destination device, then sends the congestion control message to the corresponding source device, obtains a first data message from the source device, determines that the source device does not respond to the congestion control message based on the message rate of obtaining the first data message, and performs congestion control management on the first data message obtained from the source device. Therefore, the solution provided in this embodiment can determine the situation where the congestion control message sent by the destination device does not receive a response from the corresponding source device, so that the switch can perform congestion control management on the data message obtained from the source device, thereby reducing network congestion and avoiding the attenuation of the switch forwarding performance.
[0066] like Figure 4 As shown, an embodiment of the present invention also provides a network congestion control device.
[0067] Specifically, the network congestion control device includes: one or more processors and memory, Figure 4 A processor and a memory are taken as an example. The processor and the memory can be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0068] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs, such as the network congestion control method in the above-mentioned embodiment of the present invention. The processor implements the network congestion control method in the above-mentioned embodiment of the present invention by running the non-transitory software programs and programs stored in the memory.
[0069] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data required to execute the network congestion control method in the above-mentioned embodiment of the present invention, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0070] The non-transient software program and program required to implement the network congestion control method in the above embodiment of the present invention are stored in the memory, and when executed by one or more processors, the network congestion control method in the above embodiment of the present invention is executed, for example, the above described Figure 1 In the method steps 101 to 103, the switch obtains a congestion control message from the destination device, then sends the congestion control message to the corresponding source device, obtains a first data message from the source device, determines that the source device does not respond to the congestion control message according to the message rate of obtaining the first data message, and performs congestion control management on the first data message obtained from the source device. Therefore, the solution provided in this embodiment can determine the situation where the congestion control message sent by the destination device does not receive a response from the corresponding source device, so that the switch can perform congestion control management on the data message obtained from the source device, thereby reducing network congestion and avoiding the attenuation of the switch forwarding performance.
[0071] In addition, an embodiment of the present invention further provides a computer-readable storage medium, the computer-readable storage medium storing a computer-executable program, the computer-executable program being executed by one or more control processors, for example, Figure 4 The one or more processors may execute the network congestion control method in the above embodiment of the present invention, for example, executing the above described Figure 1 In the method steps 101 to 103, the switch obtains a congestion control message from the destination device, then sends the congestion control message to the corresponding source device, obtains a first data message from the source device, determines that the source device does not respond to the congestion control message according to the message rate of obtaining the first data message, and performs congestion control management on the first data message obtained from the source device. Therefore, the solution provided in this embodiment can determine the situation where the congestion control message sent by the destination device does not receive a response from the corresponding source device, so that the switch can perform congestion control management on the data message obtained from the source device, thereby reducing network congestion and avoiding the attenuation of the switch forwarding performance.
[0072] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as a computer-readable program, a data structure, a program module or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media generally contain computer-readable programs, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0073] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions under the shared conditions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A network congestion control method, applied to a switch, the method comprising: Obtain congestion control messages from the destination device; Sending the congestion control message to the corresponding source device, and obtaining the first data message from the source device; It is determined that the source device has not responded to the congestion control message according to the message rate of obtaining the first data message, and congestion control management is performed on the first data message obtained from the source device.
2. The method according to claim 1, characterized in that The determining, according to the message rate of acquiring the first data message, that the source device does not respond to the congestion control message includes: When the message rate of the first data message obtained from the source device is not lower than the first threshold, it is determined that the source device does not respond to the congestion control message.
3. The method according to claim 2, characterized in that The performing congestion control management on the first data message obtained from the source device includes: A first data packet is sent to a destination device, and no congestion mark is made for the first data packet.
4. The method according to claim 2 or 3, characterized in that: The performing congestion control management on the first data message obtained from the source device includes: Control the first data message obtained from the source device.
5. The method according to claim 4, characterized in that The controlling of the first data message obtained from the source device includes any one of the following: Limiting the speed of the first data message obtained from the source device; discarding the first data message obtained from the source device; Randomly process the first data message obtained from the source device.
6. The method according to claim 5, characterized in that Also includes: Sending a prompt message to the external device, wherein the prompt message is used to prompt that the source device has not responded to the congestion control message.
7. The method according to claim 3, characterized in that Also includes: If it is determined that the message rate of the first data message obtained from the source device is lower than the first threshold, the congestion marking of the first data message sent to the destination device is restored.
8. A switch, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the network congestion control method as claimed in any one of claims 1 to 7 when executing the computer program.
9. A network congestion control device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the network congestion control method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the network congestion control method according to any one of claims 1 to 7.
