CN118282967A - Network congestion control method, system, device, product and electronic equipment - Google Patents

Network congestion control method, system, device, product and electronic equipment Download PDF

Info

Publication number
CN118282967A
CN118282967A CN202410564977.XA CN202410564977A CN118282967A CN 118282967 A CN118282967 A CN 118282967A CN 202410564977 A CN202410564977 A CN 202410564977A CN 118282967 A CN118282967 A CN 118282967A
Authority
CN
China
Prior art keywords
congestion
message
sender
switch
notification message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410564977.XA
Other languages
Chinese (zh)
Inventor
王子潇
赵继壮
陈映
车碧瑶
田源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Technology Innovation Center
China Telecom Corp Ltd
Original Assignee
China Telecom Technology Innovation Center
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Technology Innovation Center, China Telecom Corp Ltd filed Critical China Telecom Technology Innovation Center
Priority to CN202410564977.XA priority Critical patent/CN118282967A/en
Publication of CN118282967A publication Critical patent/CN118282967A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a network congestion control method, a device, a product and equipment, and relates to the technical field of communication.

Description

Network congestion control method, system, device, product and electronic equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a network congestion control method, a network congestion control system, a network congestion control apparatus, a computer program product, and an electronic device.
Background
Remote direct memory access (Remote Direct Memory Access, RDMA) is a new memory access technology that can transfer data directly from the memory of one computer to the memory of another without the need for a CPU as an intermediary, without any impact on the operating system. Among them, RDMA technology is applied to protocols over ethernet (RDMA over Converged Ethernet, roCE).
To address the network congestion problem in RDMA technology, related art typically uses a congestion control algorithm (e.g., DCQCN) to implement congestion control, and in general, a sender device may reduce the sending rate based on DCQCN after receiving congestion notification multiple times to implement congestion control, but there is hysteresis in this way, and it is often impossible to implement timely congestion control at the first time congestion occurs.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the application and thus may include information that does not form an existing solution that is already known to those of ordinary skill in the art.
Disclosure of Invention
The application aims to provide a network congestion control method, a network congestion control system, a network congestion control device, a computer program product and electronic equipment, which can generate a congestion notification message for assisting a sender to control the sending rate of a message according to an operation code type and a congestion mark value, so that when the congestion notification message reaches the sender, the sender can timely and accurately sense the state of a congestion link, the timeliness of the sender for sensing congestion is improved, and the timeliness of the sender for updating the sending rate is further improved.
Other features and advantages of the application will be apparent from the following detailed description, or may be learned by the practice of the application.
According to an aspect of the present application, there is provided a network congestion control method, the method comprising:
Receiving a target message forwarded by a switch; the target message is sent by a sender;
generating a congestion notification message for assisting a sender to control the message sending rate according to the type of the operation code and the congestion marking value in the target message;
And sending the congestion notification message to the sender.
In an exemplary embodiment of the present application, generating a congestion notification message for assisting a sender to control a sending rate of a message according to an opcode type and a congestion flag value in a target message includes:
Determining the number of the calculated data streams according to the type of the operation code in the target message;
and generating a congestion notification message for assisting the sender to control the message sending rate according to the number of the data flows and the congestion marking value in the target message.
In an exemplary embodiment of the present application, sending a congestion notification message to a sender includes:
And sending the congestion notification message to the switch to trigger the switch to forward the congestion notification message to the sender.
In one exemplary embodiment of the application, wherein:
The switch is used for responding to the target message, acquiring the length of the current output port queue, and forwarding the target message to the receiver if the length of the current output port queue is smaller than or equal to a preset threshold value; if the current output port queue length is greater than the preset threshold value, writing a congestion marking value into the target message according to the current output port queue length, and forwarding the target message to a receiving party.
In an exemplary embodiment of the present application, the switch writes a congestion flag value to a target packet according to a current egress port queue length, including:
And the switch is used for acquiring the functional relation between the length of the outgoing port queue and the congestion marking probability, determining the congestion marking probability corresponding to the current length of the outgoing port queue according to the functional relation, and writing the target message into the congestion marking value based on the congestion marking probability.
In one exemplary embodiment of the application, wherein:
and the sender is used for updating the message sending rate according to the congestion marking value and the number of data streams in the congestion notification message when the updating time interval is larger than the preset interval.
In an exemplary embodiment of the present application, the sender updates the message sending rate according to the congestion flag value and the number of data flows in the congestion notification message, including:
The sender is used for adjusting the congestion notification message counter and the congestion marking counter according to the congestion marking value and the number of data streams; and updating the message sending rate according to the change rate of the switch queue, the total number of data flows in the link, the line speed, the adjusted congestion notification message counter and the congestion mark counter.
In one exemplary embodiment of the application, wherein:
and the sender is used for sending the message to be sent according to the updated message sending rate.
According to an aspect of the present application, there is provided a network congestion control system including a sender, a switch, a receiver, wherein:
the sender is used for sending the target message to the switch;
the exchanger is used for forwarding the target message to the receiver;
The receiver is used for generating a congestion notification message for assisting the sender to control the message sending rate according to the type of the operation code and the congestion marking value in the target message; sending a congestion notification message to a sender;
And the sender is used for receiving the congestion notification message and controlling the message sending rate according to the congestion notification message.
According to an aspect of the present application, there is provided a network congestion control apparatus including:
The target message receiving unit is used for receiving the target message forwarded by the switch; the target message is sent by a sender;
the message generating unit is used for generating a congestion notification message for assisting a sender to control the message sending rate according to the type of the operation code and the congestion marking value in the target message;
And the message sending unit is used for sending the congestion notification message to the sender.
In an exemplary embodiment of the present application, a message generating unit generates a congestion notification message for assisting a sender to control a sending rate of a message according to an operation code type and a congestion flag value in a target message, including:
Determining the number of the calculated data streams according to the type of the operation code in the target message;
and generating a congestion notification message for assisting the sender to control the message sending rate according to the number of the data flows and the congestion marking value in the target message.
In an exemplary embodiment of the present application, a message sending unit sends a congestion notification message to a sender, including:
And sending the congestion notification message to the switch to trigger the switch to forward the congestion notification message to the sender.
In one exemplary embodiment of the application, wherein:
The switch is used for responding to the target message, acquiring the length of the current output port queue, and forwarding the target message to the receiver if the length of the current output port queue is smaller than or equal to a preset threshold value; if the current output port queue length is greater than the preset threshold value, writing a congestion marking value into the target message according to the current output port queue length, and forwarding the target message to a receiving party.
In an exemplary embodiment of the present application, the switch writes a congestion flag value to a target packet according to a current egress port queue length, including:
And the switch is used for acquiring the functional relation between the length of the outgoing port queue and the congestion marking probability, determining the congestion marking probability corresponding to the current length of the outgoing port queue according to the functional relation, and writing the target message into the congestion marking value based on the congestion marking probability.
In one exemplary embodiment of the application, wherein:
and the sender is used for updating the message sending rate according to the congestion marking value and the number of data streams in the congestion notification message when the updating time interval is larger than the preset interval.
In an exemplary embodiment of the present application, the sender updates the message sending rate according to the congestion flag value and the number of data flows in the congestion notification message, including:
The sender is used for adjusting the congestion notification message counter and the congestion marking counter according to the congestion marking value and the number of data streams; and updating the message sending rate according to the change rate of the switch queue, the total number of data flows in the link, the line speed, the adjusted congestion notification message counter and the congestion mark counter.
In one exemplary embodiment of the application, wherein:
and the sender is used for sending the message to be sent according to the updated message sending rate.
According to an aspect of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method according to any of the above.
According to an aspect of the present application, there is provided an electronic apparatus including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of any of the above via execution of executable instructions.
Exemplary embodiments of the present application may have some or all of the following advantages:
In the network congestion control method provided by an example embodiment of the present application, a congestion notification message for assisting a sender to control a sending rate of a message may be generated according to an operation code type and a congestion flag value, so that when the congestion notification message reaches the sender, the sender may timely and accurately sense a state of a congested link, and improve timeliness of the sender in sensing congestion, thereby being beneficial to improving timeliness of updating the sending rate of the sender. In addition, the congestion control scheme defined by the application can improve the congestion control efficiency without modifying the switch, and has stronger deployability.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 schematically shows a flow chart of a network congestion control method according to one embodiment of the application;
FIG. 2 schematically illustrates a functional relationship diagram according to one embodiment of the application;
fig. 3 schematically illustrates an application scenario of a network congestion control method according to an embodiment of the present application;
Figure 4 schematically illustrates a block diagram of a network congestion control system according to one embodiment of the application;
fig. 5 schematically shows a sequence diagram of a network congestion control method according to another embodiment of the application;
Figure 6 schematically shows a block diagram of a network congestion control apparatus in one embodiment according to the application;
Fig. 7 schematically shows a schematic of a computer system suitable for use in implementing an embodiment of the application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the application may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known aspects have not been shown or described in detail to avoid obscuring aspects of the application.
Furthermore, the drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
Referring to fig. 1, fig. 1 schematically shows a flow chart of a network congestion control method according to one embodiment of the application. The network congestion control method can be implemented on any electronic equipment such as a mobile phone, a personal computer, a tablet personal computer, a server and the like. As shown in fig. 1, the network congestion control method may include: step S110 to step S130.
Step S110: receiving a target message forwarded by a switch; wherein, the target message is sent by the sender.
Step S120: and generating a congestion notification message for assisting the sender to control the message sending rate according to the type of the operation code and the congestion marking value in the target message.
Step S130: and sending the congestion notification message to the sender.
By implementing the method shown in fig. 1, a congestion notification message for assisting a sender to control a message sending rate can be generated according to an operation code type and a congestion marking value, so that when the congestion notification message touches the sender, the sender can timely and accurately sense the state of a congestion link, the timeliness of the sender for sensing congestion is improved, and further the timeliness of the sender for updating the sending rate is improved. In addition, the congestion control scheme defined by the application can improve the congestion control efficiency without modifying the switch, and has stronger deployability.
Next, the above steps of the present exemplary embodiment will be described in more detail.
It should be noted that, the embodiment of the present application may be implemented in a system including a sender, a switch, and a receiver. The sender may also be understood as a Responding Party (RP), and is generally configured to calculate a current best sending rate of a message, and perform a sending operation according to the sending rate of the message. The switch may also be understood as a Congestion Point (CP), and is generally configured to display Congestion notification (Explicit Congestion Notification, ECN) on a Congestion marking bit flag of a packet according to a rule, and the ECN may also be understood as a Congestion marking value. The receiving party may also be understood as a notifier (Notification Point, NP), which is typically configured to calculate the current total number of data flows according to rules and generate a congestion notification message (i.e. CNP message).
Assume that the number ratio between the sender and the receiver of the current network topology is 10:1, the sender and the receiver transit through the exchanger, the bandwidth of each link is 100Gbps, and the basic time delay on each hop link is 1us. If 10 senders send out 1 piece of 1GB stream data at the line speed r=100 Gbps at the same time, a wide area network congestion (incast) scene is formed. The switch ingress bandwidth is greater than the egress bandwidth and in the above example the switch egress is prone to congestion, i.e. the egress queue length in the switch increases. In order to enable a sender to sense congestion, the application adds ECN in a message sent by the sender so that a receiver generates CNP based on ECN and stream data quantity, and the sender can sense congestion when receiving the fed back CNP, thereby timely adjusting the message sending rate.
In step S110, receiving a target packet forwarded by the switch; wherein, the target message is sent by the sender.
Specifically, for the receiving end, a target message forwarded by the switch may be received, where the target message refers to any message sent by the sender, for the sender, the switch may be used as a transfer to trigger the message to the receiving end, and the receiving end may also be used as a transfer to trigger the fed back message to the sender.
As an alternative embodiment, wherein:
The switch is used for responding to the target message, acquiring the length of the current output port queue, and forwarding the target message to the receiver if the length of the current output port queue is smaller than or equal to a preset threshold value; if the current output port queue length is greater than the preset threshold value, writing a congestion marking value into the target message according to the current output port queue length, and forwarding the target message to a receiving party.
It can be seen that, by implementing the alternative embodiment, a corresponding forwarding policy can be adopted based on a comparison result of the length of the output port queue and a preset threshold, so that a congestion marking value can be marked in time when the length of the current output port queue is longer, so that a receiver can determine a congestion notification message for guiding the forwarding rate of the message based on the congestion marking value.
Specifically, the length of the current output port queue of the switch can represent the enrichment degree of the message to a certain extent, and the length of the current output port queue can be obtained in real time each time the target message is received. When the length of the output port queue is smaller than or equal to a preset threshold (e.g., 3), the target message can be directly forwarded to the receiver, but when the length of the output port queue is larger than the preset threshold, the congestion mark value needs to be written into the target message, and then the target message written with the congestion mark value is forwarded to the receiver, so that the receiver receiving the target message can know the length of the output port queue. However, the DCQCN algorithm in the related art needs to perform speed regulation by marking the ECN signal by the switch, the Random Early Detection (RED) strategy used by the algorithm starts marking only when the queue reaches above the minimum value (Kmin), and when the switch queue is greater than the maximum value (Kmax), the ECN marking probability jumps to 1, which causes that the sender cannot timely sense the length of the switch queue. Compared with the scheme of comparing the maximum value (Kmax) and the minimum value (Kmin) in the related art, the method and the device only need to be compared with the preset threshold, so that the functional relation between the length of the output port queue and the congestion marking probability can be in a linear relation, and the calculation efficiency of the congestion marking probability is improved.
As an alternative embodiment, the switch writes the congestion flag value to the target packet according to the current output port queue length, including:
And the switch is used for acquiring the functional relation between the length of the outgoing port queue and the congestion marking probability, determining the congestion marking probability corresponding to the current length of the outgoing port queue according to the functional relation, and writing the target message into the congestion marking value based on the congestion marking probability.
Therefore, by implementing the alternative embodiment, the problem that the length of the switch queue is difficult to be perceived by a sender and a receiver can be solved, the representation of the length of the switch queue can be based on the congestion marking value, and congestion control can be conveniently carried out by each party based on the congestion marking value.
Specifically, the congestion flag value may be expressed as 00 (non-ECN capable transport), 01 (ECN enabled transport, ECT (0)), 10 (ECN enabled transport, ECT (1)), 11 (congestion encountered). When both sender and receiver support ECN, they label their packets with ECT (0) or ECT (1).
After the target message is written into the congestion marking value, the receiving end can generate a congestion notification message based on the congestion marking value, the sender can determine the duty ratio of the message with the congestion marking value of 01 in the total message data volume based on the congestion marking values in the congestion notification messages, and can determine the current congestion degree, such as 0.8, based on the duty ratio.
Referring to fig. 2, fig. 2 schematically illustrates a functional relationship diagram according to one embodiment of the present application. As shown in fig. 2, the relationship between the length of the outgoing port queue of the switch and the congestion marking probability of the message can be represented by a functional relationship representation line, when the length of the outgoing port queue is K, the congestion marking probability is 1, that is, it is represented that there is a probability of 1 to write the congestion marking value into the target message; where K may be expressed as a constant.
In step S120, a congestion notification message for assisting the sender to control the sending rate of the message is generated according to the type of the operation code and the congestion flag value in the target message.
Specifically, the congestion notification message may be represented as (Congestion Notification Packets, CNP), where the format of the CNP accords with the organization standard of the CNP (Annex 17.9.3rocev 2), and the CNP includes a reserved bit. In addition, alternatively, the flow_num may be transmitted in other manners, which are not limited to the above manner, and the embodiment of the present application is not specifically limited.
Wherein, alternatively, the format of CNP may be schematically represented as the following table:
14 bytes MAC header
20 Bytes IPv4/IPv6
8 Bytes UDP header
12 Bytes BTH (containing ECN)
16 Bytes flow_num
4 Bytes ICRC
The MAC header is used for storing various addresses, the IPv4/IPv6 indicates supported transmission protocol types, the UDP header is used for providing connectionless-oriented communication service by utilizing IP, the BTH is used for defining a header field of a transmission layer, the flow_num refers to the number of data streams, and the ICRC is used for supporting redundancy detection.
As an alternative embodiment of step S120, generating a congestion notification message for assisting the sender to control the sending rate of the message according to the type of the operation code and the congestion flag value in the target message includes:
Step S1201: determining the number of the calculated data streams according to the type of the operation code in the target message;
Step S1202: and generating a congestion notification message for assisting the sender to control the message sending rate according to the number of the data flows and the congestion marking value in the target message.
It can be seen that by implementing the alternative embodiment, the total flow number of the receiver can be directly returned to the sender, so that the sender can timely sense the state of the congestion link, and the problems of lack of global sensing, slow network convergence and the like existing in the related technology can be solved.
Specifically, the operation code type (Opcode) is used to indicate the status of the data flow, for example, the first packet has been sent, the middle packet has been finished, and according to the operation code type, a message that needs to be counted into the number of data flows can be determined, further, the determined number of data flows and the congestion flag value in the target message can be written into the congestion notification message, and the congestion notification message is returned to the switch, so that the switch forwards the congestion notification message to the sender.
In step S130, a congestion notification message is sent to the sender.
Specifically, the sender is configured to respond to the congestion notification message, and adjust a sending rate of the message, so as to implement congestion control for the switch. The sender specifically may include a congestion state sensing unit and a rate updating unit; the congestion state sensing unit is used for analyzing the CNP to acquire ECN and flow_num in the CNP for statistics, and the rate updating unit is used for updating the message sending rate according to a preset interval T.
As an alternative embodiment of step S130, sending the congestion notification message to the sender includes:
step S1301: and sending the congestion notification message to the switch to trigger the switch to forward the congestion notification message to the sender.
It can be seen that by implementing this alternative embodiment, congestion information acquisition based on the switch can be implemented without modifying the switch, and congestion control for the switch can be implemented based on the congestion flag value and the number of data flows in the congestion notification message.
Specifically, the switch, as a transfer party, can receive not only the message of the sender but also the message of the receiver, and realize forwarding.
As an alternative embodiment, wherein:
and the sender is used for updating the message sending rate according to the congestion marking value and the number of data streams in the congestion notification message when the updating time interval is larger than the preset interval.
It can be seen that implementing this alternative embodiment, a timing update of the sending rate of the message based on the congestion flag value and the number of data flows can be implemented to implement congestion control.
Specifically, the sender may update the message sending rate once every time it detects that the update time interval is greater than the preset interval. After updating the message transmission rate, the timer may be reset, and when the update time interval is detected to be greater than the preset interval again, the operation for updating the message transmission rate is repeatedly performed.
As an alternative embodiment, the sender updates the sending rate of the message according to the congestion marking value and the number of data flows in the congestion notification message, including:
The sender is used for adjusting the congestion notification message counter and the congestion marking counter according to the congestion marking value and the number of data streams; and updating the message sending rate according to the change rate of the switch queue, the total number of data flows in the link, the line speed, the adjusted congestion notification message counter and the congestion mark counter.
Therefore, by implementing the optional embodiment, the accurate control and update of the message sending rate can be realized in time.
Specifically, the sender may adjust the congestion notification message counter (cnp_cnt) and the congestion marking counter (ecn_cnt) according to the congestion marking value (ECN) and the number of data flows (flow_num). Further, according to substituting the preset threshold (K) congestion notification message counter (cnp_cnt) and congestion flag counter (ecn_cnt) into the expression queue_len (T) = (ecn_cnt/cnp_cnt) K, further substituting queue_len (T) and queue_len (T-1) into queue_rate (T) = (queue_len (T) -queue_len (T-1))/T to determine the new message transmission rate queue_rate (T); wherein T represents a preset interval. Further, updating of the sending rate of the message may be implemented based on the expression rate=r/flow_num-max (queue_rate (t), 0).
As an alternative embodiment, wherein:
and the sender is used for sending the message to be sent according to the updated message sending rate.
It can be seen that implementing this alternative embodiment, the message may be sent based on the updated message sending rate, thereby avoiding aggravating the switch congestion.
Specifically, the effective time of the updated message sending rate is within a preset interval T (e.g., 4 us). The granularity of control of the packet sending rate may be a data packet or may be data composed of a plurality of packets, which is not limited in the embodiment of the present application.
Referring to fig. 3, fig. 3 schematically illustrates an application scenario of a network congestion control method according to an embodiment of the present application. As shown in fig. 3, includes a sender (RP) 310, a switch (CP) 320, and a receiver (NP) 330.
Specifically, the sender (RP) 310 may send the target message to the switch (CP) 320 at a line speed R (e.g., 100 Gbps); the line speed refers to a standard of exchange forwarding capability of network equipment, and is the maximum data volume capable of throughput between an interface processor or an interface card of a switch and a data bus. Further, the switch (CP) 320 determines an ENC marking probability based on the output port queue length and on a preset and K (e.g., 2 MB), marks the target message with ENC based on the ENC marking probability, and transmits the target message containing ENC to the receiving party (NP) 330. The receiving side (NP) 330 may determine the number of calculated data streams according to the type of the operation code in the target message, generate CNPs for assisting the transmitting side in controlling the message transmission rate according to ENC and flow_num, and transmit the CNPs including ENC and flow_num to the switch (CP) 320, so that the switch (CP) 320 forwards the CNPs including ENC and flow_num to the transmitting side (RP) 310. Further, the sender (RP) 310 may adjust the congestion notification message counter and the congestion flag counter according to the number of congestion flags and data flows; and updating the message sending rate according to the change rate of the switch queue, the total number of data flows in the link, the line speed, the adjusted congestion notification message counter and the congestion mark counter, and sending the message to be sent according to the updated message sending rate.
Since each sender sends a message at a line speed r=100 Gbps, before the first CNP of the receiver (NP) returns, the queue of the switch (CP) will rise, and the value of the rise per 1us switch queue is: (rate per sender number of senders-forwarding rate) time= (100 Gbps 10-100 Gbps) 1us = 112.5KB. The probability of marking ECN in the forwarded message per 1us CP increases: queue pile-up delta/k=112.5 KB/2 mb=5.6%. The change in ECN marking probability directly reflects the degree of CP-side queue pile-up. The NP typically records the total number of currently active data flows according to the operation code type (Opcode) in the target packet, and when the Opcode is 0, it indicates that the target packet is the first packet of the current flow, and at this time, the flow_num+1 recorded by the NP indicates that there is a new flow joining and transmitting. When the Opcode is 1, this time the received packet is the intermediate packet of the data stream, and the flow_num remains unchanged. When the Opcode is 2, it indicates that the last packet of the data stream is received this time, and at this time, flow_num-1 indicates that the data stream is over.
When the first packet of each sender has arrived at the NP, the flow_num=10 of the NP record. The NP may write the ECN with the CNP and forward to the RP. After receiving the CNP message, the RP calculates the current transmission rate according to the two state machines of the RP in the technical scheme, and transmits the next packet according to the rate.
Referring to fig. 4, fig. 4 schematically illustrates a block diagram of a network congestion control system according to one embodiment of the application. As shown in fig. 4, the network congestion control system 400 includes a sender 401, a switch 402, a receiver 403, wherein:
A sender 401, configured to send a target message to a switch 402;
a switch 402 for forwarding the target message to a receiver 403;
A receiver 403, configured to generate, according to the type of the operation code and the congestion flag value in the target packet, a congestion notification packet for assisting the sender 401 in controlling the sending rate of the packet; sending a congestion notification message to the sender 401;
and the sender 401 is configured to receive the congestion notification message and control a message sending rate according to the congestion notification message.
The network congestion control system 400 can be deployed in Mellanox CX DX and above hardware widely used in data centers, is supported to be realized by a programmable congestion control technology (PCC), and has the advantage of low replacement and upgrading cost.
Therefore, implementing the system shown in fig. 4 can generate a congestion notification message for assisting the sender to control the sending rate of the message according to the type of the operation code and the congestion flag value, so that when the congestion notification message reaches the sender, the sender can timely and accurately sense the state of the congestion link, and the timeliness of the sender in sensing congestion is improved, thereby being beneficial to improving the timeliness of updating the sending rate of the sender. In addition, the congestion control scheme defined by the application can improve the congestion control efficiency without modifying the switch, and has stronger deployability.
Referring to fig. 5, fig. 5 schematically shows a sequence diagram of a network congestion control method according to another embodiment of the present application; as shown in fig. 5, the network congestion control method includes: step S510 to step S580.
Step S510: the sender sends the target message to the switch.
Step S520: and the switch responds to the target message and acquires the length of the current output port queue.
Step S530: if the length of the current output port queue is smaller than or equal to a preset threshold value, the switch forwards the target message to a receiver; if the length of the current output port queue is greater than a preset threshold value, a functional relation between the length of the output port queue and congestion marking probability is obtained, the congestion marking probability corresponding to the length of the current output port queue is determined according to the functional relation, a target message is written into a congestion marking value based on the congestion marking probability, and the target message is forwarded to a receiving party.
Step S540: the receiver determines and calculates the number of data flows according to the type of the operation code in the target message, and generates a congestion notification message for assisting the sender to control the sending rate of the message according to the number of the data flows and the congestion marking value in the target message.
Step S550: and the receiver sends the congestion notification message to the switch.
Step S560: and the switch sends the congestion notification message to the sender.
Step S570: the sender adjusts a congestion notification message counter and a congestion marking counter according to the congestion marking value and the number of data streams; and updating the message sending rate according to the change rate of the switch queue, the total number of data flows in the link, the line speed, the adjusted congestion notification message counter and the congestion mark counter.
Step S580: and the sender sends the message to be sent according to the updated message sending rate.
It should be noted that, steps S510 to S580 correspond to the steps and embodiments shown in fig. 1, and for the specific implementation of steps S510 to S580, reference may be made to the steps and embodiments shown in fig. 1, and details thereof will not be described here.
Therefore, by implementing the method shown in fig. 5, a congestion notification message for assisting the sender to control the sending rate of the message can be generated according to the type of the operation code and the congestion marking value, so that when the congestion notification message reaches the sender, the sender can timely and accurately sense the state of the congestion link, the timeliness of the sender in sensing congestion is improved, and further the timeliness of the sender in updating the sending rate is improved. In addition, the congestion control scheme defined by the application can improve the congestion control efficiency without modifying the switch, and has stronger deployability.
Referring to fig. 6, fig. 6 schematically shows a block diagram of a network congestion control apparatus according to an embodiment of the present application. The network congestion control apparatus 600 corresponds to the method shown in fig. 1, and as shown in fig. 6, the network congestion control apparatus 600 includes:
a target message receiving unit 601, configured to receive a target message forwarded by the switch; the target message is sent by a sender;
A message generating unit 602, configured to generate, according to the type of the operation code and the congestion flag value in the target message, a congestion notification message for assisting the sender to control the sending rate of the message;
A message sending unit 603, configured to send a congestion notification message to a sender.
Therefore, by implementing the device shown in fig. 6, a congestion notification message for assisting the sender to control the sending rate of the message can be generated according to the type of the operation code and the congestion marking value, so that when the congestion notification message reaches the sender, the sender can timely and accurately sense the state of the congestion link, the timeliness of the sender in sensing congestion is improved, and further the timeliness of the sender in updating the sending rate is improved. In addition, the congestion control scheme defined by the application can improve the congestion control efficiency without modifying the switch, and has stronger deployability.
In an exemplary embodiment of the present application, the message generating unit 602 generates, according to the type of the operation code and the congestion flag value in the target message, a congestion notification message for assisting the sender to control the sending rate of the message, including:
Determining the number of the calculated data streams according to the type of the operation code in the target message;
and generating a congestion notification message for assisting the sender to control the message sending rate according to the number of the data flows and the congestion marking value in the target message.
It can be seen that by implementing the alternative embodiment, the total flow number of the receiver can be directly returned to the sender, so that the sender can timely sense the state of the congestion link, and the problems of lack of global sensing, slow network convergence and the like existing in the related technology can be solved.
In an exemplary embodiment of the present application, the message sending unit 603 sends a congestion notification message to a sender, including:
And sending the congestion notification message to the switch to trigger the switch to forward the congestion notification message to the sender.
It can be seen that by implementing this alternative embodiment, congestion information acquisition based on the switch can be implemented without modifying the switch, and congestion control for the switch can be implemented based on the congestion flag value and the number of data flows in the congestion notification message.
In one exemplary embodiment of the application, wherein:
The switch is used for responding to the target message, acquiring the length of the current output port queue, and forwarding the target message to the receiver if the length of the current output port queue is smaller than or equal to a preset threshold value; if the current output port queue length is greater than the preset threshold value, writing a congestion marking value into the target message according to the current output port queue length, and forwarding the target message to a receiving party.
It can be seen that, by implementing the alternative embodiment, a corresponding forwarding policy can be adopted based on a comparison result of the length of the output port queue and a preset threshold, so that a congestion marking value can be marked in time when the length of the current output port queue is longer, so that a receiver can determine a congestion notification message for guiding the forwarding rate of the message based on the congestion marking value.
In an exemplary embodiment of the present application, the switch writes a congestion flag value to a target packet according to a current egress port queue length, including:
And the switch is used for acquiring the functional relation between the length of the outgoing port queue and the congestion marking probability, determining the congestion marking probability corresponding to the current length of the outgoing port queue according to the functional relation, and writing the target message into the congestion marking value based on the congestion marking probability.
Therefore, by implementing the alternative embodiment, the problem that the length of the switch queue is difficult to be perceived by a sender and a receiver can be solved, the representation of the length of the switch queue can be based on the congestion marking value, and congestion control can be conveniently carried out by each party based on the congestion marking value.
In one exemplary embodiment of the application, wherein:
and the sender is used for updating the message sending rate according to the congestion marking value and the number of data streams in the congestion notification message when the updating time interval is larger than the preset interval.
It can be seen that implementing this alternative embodiment, a timing update of the sending rate of the message based on the congestion flag value and the number of data flows can be implemented to implement congestion control.
In an exemplary embodiment of the present application, the sender updates the message sending rate according to the congestion flag value and the number of data flows in the congestion notification message, including:
The sender is used for adjusting the congestion notification message counter and the congestion marking counter according to the congestion marking value and the number of data streams; and updating the message sending rate according to the change rate of the switch queue, the total number of data flows in the link, the line speed, the adjusted congestion notification message counter and the congestion mark counter.
Therefore, by implementing the optional embodiment, the accurate control and update of the message sending rate can be realized in time.
In one exemplary embodiment of the application, wherein:
and the sender is used for sending the message to be sent according to the updated message sending rate.
It can be seen that implementing this alternative embodiment, the message may be sent based on the updated message sending rate, thereby avoiding aggravating the switch congestion.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Since each functional module of the network congestion control apparatus according to the exemplary embodiment of the present application corresponds to a step of the foregoing exemplary embodiment of the network congestion control method, for details not disclosed in the apparatus embodiment of the present application, please refer to the foregoing embodiment of the network congestion control method according to the present application.
Referring to fig. 7, fig. 7 is a schematic diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present application.
It should be noted that, the computer system 700 of the electronic device shown in fig. 7 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the system operation are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 710 as needed, so that a computer program read out therefrom is installed into the storage section 708 as needed.
In particular, according to embodiments of the present application, the process described above with reference to the flowcharts may be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The computer program, when executed by a Central Processing Unit (CPU) 701, performs the various functions defined in the method and apparatus of the present application.
Exemplary embodiments of the present disclosure also provide a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the above-described network congestion control method.
In one embodiment, the computer program product may be a tangible product comprising a computer program, such as a computer readable storage medium having the computer program stored thereon. The readable storage medium may be a storage medium based on signals of electronic, magnetic, optical, electromagnetic, infrared, etc., including but not limited to: random Access Memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid State Disk (SSD), etc. By way of example, the computer program product may be embodied as a non-volatile storage medium, such as read-only memory, nand flash memory (NAND FLASH), or the like, in which the computer program is stored.
In one embodiment, the computer program product may be an intangible product containing a computer program. By way of example, the computer program product may be embodied as a virtual digital product, such as a digital file, an executable file storing a computer program, an installation package, or the like.
The code of the computer program may be written in one or more programming languages. Programming languages such as C language, java, c++, etc. The program code may execute entirely on the user's computing device, or partly on the user's computing device, or as a stand-alone software package, or partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, such as a Local Area Network (LAN), wide Area Network (WAN), etc., or may be connected to an external computing device (e.g., an Internet connection provided by an operator).
The computer program may be carried or transmitted by signals of electronic, magnetic, optical, electromagnetic, infrared, etc. The electronic device may convert a signal carrying the computer program into a digital signal, thereby running the computer program. When the computer program is run on an electronic device, its code is for causing the electronic device to perform (more specifically, may cause a processor of the electronic device to execute) the method steps of the various exemplary embodiments of the present disclosure, as may be performed the above-described network congestion control method, comprising the steps of: receiving a target message forwarded by a switch; the target message is sent by a sender; generating a congestion notification message for assisting a sender to control the message sending rate according to the type of the operation code and the congestion marking value in the target message; and sending the congestion notification message to the sender.
By executing the steps of the method through the computer program, the congestion notification message for assisting the sender to control the sending rate of the message can be generated according to the type of the operation code and the congestion marking value, so that when the congestion notification message reaches the sender, the sender can timely and accurately sense the state of a congestion link, the timeliness of the sender in sensing congestion is improved, and the timeliness of the sender in updating the sending rate is further improved. In addition, the congestion control scheme defined by the application can improve the congestion control efficiency without modifying the switch, and has stronger deployability.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.

Claims (12)

1. A network congestion control method, comprising:
Receiving a target message forwarded by a switch; the target message is sent by a sender;
generating a congestion notification message for assisting the sender to control the message sending rate according to the operation code type and the congestion marking value in the target message;
And sending the congestion notification message to the sender.
2. The method of claim 1, wherein generating a congestion notification message for assisting the sender in controlling the sending rate of the message according to the opcode type and the congestion flag value in the target message comprises:
Determining the number of the calculated data streams according to the type of the operation code in the target message;
And generating a congestion notification message for assisting the sender to control the message sending rate according to the number of the data flows and the congestion marking value in the target message.
3. The method of claim 1, wherein sending the congestion notification message to the sender comprises:
And sending the congestion notification message to the switch to trigger the switch to forward the congestion notification message to the sender.
4. The method according to claim 1, wherein:
The switch is configured to obtain a current output port queue length in response to the target packet, and if the current output port queue length is less than or equal to a preset threshold, forward the target packet to a receiver; and if the length of the current output port queue is greater than the preset threshold, writing a congestion mark value into the target message according to the length of the current output port queue, and forwarding the target message to a receiver.
5. The method of claim 4, wherein the switch writing the congestion flag value to the target message according to the current egress port queue length comprises:
the switch is configured to obtain a functional relationship between a length of an outgoing port queue and a congestion marking probability, determine the congestion marking probability corresponding to the current outgoing port queue length according to the functional relationship, and write the target packet into a congestion marking value based on the congestion marking probability.
6. The method according to claim 1, wherein:
And the sender is used for updating the message sending rate according to the congestion marking value and the number of the data streams in the congestion notification message when the updating time interval is larger than a preset interval.
7. The method of claim 6, wherein the sender updating the message sending rate based on the congestion flag value and the number of data flows in the congestion notification message comprises:
The sender is configured to adjust a congestion notification message counter and a congestion flag counter according to the congestion flag value and the number of data flows; and updating the message sending rate according to the change rate of the switch queue, the total number of data flows in the link, the line speed, the adjusted congestion notification message counter and the congestion mark counter.
8. The method according to claim 6, wherein:
the sender is configured to send a message to be sent according to the updated message sending rate.
9. A network congestion control system, comprising a sender, a switch, and a receiver, wherein:
The sender is configured to send a target packet to the switch;
The switch is used for forwarding the target message to the receiver;
The receiver is configured to generate, according to the type of the operation code and the congestion flag value in the target packet, a congestion notification packet for assisting the sender to control the sending rate of the packet; sending the congestion notification message to the sender;
The sender is configured to receive the congestion notification message and control a message sending rate according to the congestion notification message.
10. A network congestion control apparatus, comprising:
The target message receiving unit is used for receiving the target message forwarded by the switch; the target message is sent by a sender;
A message generating unit, configured to generate, according to the type of the operation code and the congestion flag value in the target message, a congestion notification message for assisting the sender to control the sending rate of the message;
and the message sending unit is used for sending the congestion notification message to the sender.
11. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any one of claims 1 to 8.
12. An electronic device, comprising:
A processor; and
A memory for storing executable instructions of the processor;
Wherein the processor is configured to perform the method of any of claims 1-8 via execution of the executable instructions.
CN202410564977.XA 2024-05-08 2024-05-08 Network congestion control method, system, device, product and electronic equipment Pending CN118282967A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410564977.XA CN118282967A (en) 2024-05-08 2024-05-08 Network congestion control method, system, device, product and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410564977.XA CN118282967A (en) 2024-05-08 2024-05-08 Network congestion control method, system, device, product and electronic equipment

Publications (1)

Publication Number Publication Date
CN118282967A true CN118282967A (en) 2024-07-02

Family

ID=91648250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410564977.XA Pending CN118282967A (en) 2024-05-08 2024-05-08 Network congestion control method, system, device, product and electronic equipment

Country Status (1)

Country Link
CN (1) CN118282967A (en)

Similar Documents

Publication Publication Date Title
US11558302B2 (en) Data transmission method and apparatus
WO2018210117A1 (en) Congestion control method, network device, and network interface controller thereof
US20200358886A1 (en) Data Transmission Method, Apparatus, And System
WO2021008473A1 (en) System, method, and apparatus for evaluating round-trip time
US11838208B2 (en) Congestion control method and apparatus, device, and storage medium
WO2019148563A1 (en) Data sending method and apparatus, and data receiving method and apparatus
US20070226375A1 (en) Plug-in architecture for a network stack in an operating system
KR20210028722A (en) Congestion control method and network device
US20220286402A1 (en) Method and apparatus for controlling data packet sending, model training method and apparatus, and system
CN113141314B (en) Congestion control method and equipment
WO2020192397A1 (en) Adjustment method for transmitting apparatus and communication device
US20230156523A1 (en) Message interaction method and apparatus, and device and storage medium
WO2020063299A1 (en) Method and system for collecting statistics about the number of active flows, and network device
WO2024012065A1 (en) Data transmission control method and apparatus, computer-readable storage medium, computer device, and computer program product
CN112737940A (en) Data transmission method and device
JPWO2007015482A1 (en) Transmitting apparatus and transmission rate control method
JP5087595B2 (en) Edge node, window size control method and program
CN118282967A (en) Network congestion control method, system, device, product and electronic equipment
WO2022222693A1 (en) Message processing method and apparatus, electronic device, and computer-readable storage medium
WO2023246203A1 (en) Network data processing method and apparatus, and computer readable storage medium
CN116743660A (en) Congestion control method and device for wide area network
JP5087594B2 (en) Edge node, window size control method and program
JP4797033B2 (en) Flow rate control method and edge node in TCP flow rate control edge node
CN116032853A (en) Flow control method, device, electronic equipment and storage medium
CN114884884A (en) Congestion control method and device

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination