CN116266826A - Distributed machine learning network optimization system, method and electronic equipment - Google Patents

Distributed machine learning network optimization system, method and electronic equipment Download PDF

Info

Publication number
CN116266826A
CN116266826A CN202111556970.6A CN202111556970A CN116266826A CN 116266826 A CN116266826 A CN 116266826A CN 202111556970 A CN202111556970 A CN 202111556970A CN 116266826 A CN116266826 A CN 116266826A
Authority
CN
China
Prior art keywords
congestion
machine learning
distributed machine
control signal
congestion control
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
CN202111556970.6A
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.)
Shenzhen Institute of Advanced Technology of CAS
Original Assignee
Shenzhen Institute of Advanced Technology of CAS
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 Shenzhen Institute of Advanced Technology of CAS filed Critical Shenzhen Institute of Advanced Technology of CAS
Priority to CN202111556970.6A priority Critical patent/CN116266826A/en
Publication of CN116266826A publication Critical patent/CN116266826A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • H04L47/263Rate modification at the source after receiving feedback
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/31Flow control; Congestion control by tagging of packets, e.g. using discard eligibility [DE] bits
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The invention provides a network optimization system, a method, electronic equipment and a storage medium for distributed machine learning, wherein the system comprises a switch and a sending end of distributed machine learning parameters, and the switch is used for detecting the current network communication state; if the length of the queue exceeds a preset congestion threshold value, marking the message; if the length of the queue exceeds a preset packet loss threshold, generating a first type of data packet and sending the first type of data packet to an upstream port; the sending end is used for adjusting the sending rate according to the congestion notification if the congestion notification corresponding to the message is received, so as to perform network optimization on the distributed machine learning; and acquiring a time stamp when the data packet is transmitted, generating a delay signal based on the time stamp, determining a congestion control signal according to the delay signal, and adjusting the transmission rate according to the congestion control signal. By applying the embodiment of the invention, the efficiency and the quality of the distributed machine learning under the current network environment are optimized.

Description

Distributed machine learning network optimization system, method and electronic equipment
Technical Field
The present invention relates to the field of machine learning technologies, and in particular, to a network optimization system, method, electronic device, and storage medium for distributed machine learning.
Background
Current machine learning systems rely on iterative distributed training to address the increasing complexity of models and input data. In these high traffic systems, the iteration time depends on the computation time, the communication time, and the degree of overlap of computation and communication. Compared with other algorithms in the computer field, the machine learning algorithm has the unique features, such as iteration, the updating of the model is not completed once, and the loop iteration is needed for a plurality of times; fault tolerance, even if some errors occur in each cycle, the final convergence of the model is not affected; non-uniformity of parameter convergence, some parameters in the model are not changed after a few cycles, and other parameters need a long time to converge. These features determine that the design of machine learning systems and other computing systems are very different, so that ideally distributed machine learning tasks cannot be linearly boosted with the increase in machines, as a large amount of resources are wasted in communication, waiting and coordination, which may account for a large percentage of the time. Therefore, the reduction of the communication time of the distributed machine learning can reduce the overall training time, thereby achieving the effect of improving the distributed machine learning.
The congestion control of the network has a great influence on the communication time, and because of the application of RDMA (Remote Direct Memory Access, remote direct data access) and the huge data volume of distributed machine learning, the impact on the network is a challenge, when a large number of transmissions suddenly occur, the network may fall into a congestion transition state, not only the data transmission efficiency is reduced, but also packet loss is caused to cause the loss of transmission data, and the congestion range of the network may be further enlarged, so that large-scale resource loss and data loss are caused. Thus in today's distributed machine learning production application environment, there is an urgent need for a good congestion control scheme in this environment to reduce the queuing time of network data transmissions, and thus reduce communication time to achieve a reduction in overall machine learning training time. In addition, sustained degradation of performance due to congestion spreading can be avoided.
While there are techniques to achieve network optimization through congestion control, e.g., rate-based and feedback-based congestion control, current congestion control methods suffer from serious packet loss and time-out problems in a distributed machine-learned network environment.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, provides a network optimization system, a method, electronic equipment and a storage medium for distributed machine learning, and aims to solve the technical problems of serious packet loss and overtime existing in the network environment of the distributed machine learning at present.
The invention is realized in the following way:
in a first aspect, embodiments of the present application provide a network optimization system for distributed machine learning, where the system includes a switch and a sender of distributed machine learning parameters, where
The switch is used for detecting the current network communication state; the current network communication state comprises a queue length; if the length of the queue exceeds a preset congestion threshold value, marking the message; if the length of the queue exceeds a preset packet loss threshold, generating a first type of data packet; transmitting the first type data packet to an upstream port to prevent the upstream port from transmitting data;
the sending end is used for adjusting the sending rate according to the congestion notification if the congestion notification corresponding to the message is received, so as to perform network optimization on the distributed machine learning; acquiring a time stamp of the data packet when the data packet is transmitted, and generating a delay signal based on the time stamp; and determining a congestion control signal according to the generated delay signal, and adjusting a sending rate according to the determined congestion control signal so as to perform network optimization on the distributed machine learning.
Optionally, the sending end adjusts the sending rate according to the congestion notification, specifically:
and calculating a cutting ratio according to the congestion notification, and controlling the data transmission rate of the transmitting end according to the cutting ratio.
Optionally, the delay signal includes a round trip time of the data packet; the sending end determines congestion control signals according to the generated delay signals, specifically:
if the round trip time is within the preset range, the message is used as a congestion control signal:
and if the round trip time is not in the preset range, taking the delay signal as a congestion control signal.
Optionally, the sending end adjusts the sending rate according to the determined congestion control signal, specifically:
calculating a gradient value of the round trip time under the condition that the congestion control signal is the message, and adjusting the sending rate according to the gradient value;
and when the congestion control signal is a delay signal, adjusting the transmission rate according to the round trip time, the transmission rate of the previous generation and the upper limit value of the preset range.
Optionally, the sending end adjusts the sending rate according to the congestion notification, specifically:
and in each period window, the network card of the transmitting end updates the congestion degree parameter according to the congestion notification, and adjusts the transmitting rate according to the congestion degree parameter.
In a second aspect, an embodiment of the present application provides a network optimization method for distributed machine learning, which is applied to a transmitting end of a distributed machine learning parameter, where the method includes:
if congestion notification is received, adjusting a sending rate according to the congestion notification so as to perform network optimization on distributed machine learning;
acquiring a time stamp of the data packet when the data packet is transmitted, and generating a delay signal based on the time stamp; and determining a congestion control signal according to the generated delay signal, and adjusting a sending rate according to the determined congestion control signal so as to perform network optimization on the distributed machine learning.
Optionally, the adjusting the sending rate according to the congestion notification includes:
and calculating a cutting ratio according to the congestion notification, and controlling the data transmission rate of the transmitting end according to the cutting ratio.
Optionally, the delay signal comprises a round trip time of the data packet; the determining a congestion control signal from the generated delay signal comprises:
if the round trip time is within the preset range, the message is used as a congestion control signal:
and if the round trip time is not in the preset range, taking the delay signal as a congestion control signal.
In a third aspect, an embodiment of the present application provides an electronic device, including the foregoing transmitting end of the distributed machine learning parameter, and a memory and a processor;
the memory is connected with the processor and used for storing programs;
the processor is configured to implement the foregoing steps of the network optimization method applied to the distributed machine learning of the transmitting end by running the program stored in the memory.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program, where the computer program causes a computer to execute the steps of the foregoing network optimization method applied to distributed machine learning at a transmitting end.
The invention has the following beneficial effects: the embodiment of the application provides a network optimization system, a method, electronic equipment and a storage medium for distributed machine learning, wherein the system comprises a switch and a sending end of distributed machine learning parameters, and the switch is used for detecting the current network communication state; the current network communication state comprises a queue length; if the length of the queue exceeds a preset congestion threshold value, marking the message; if the length of the queue exceeds a preset packet loss threshold, generating a first type of data packet; transmitting the first type data packet to an upstream port to prevent the upstream port from transmitting data;
The sending end is used for adjusting the sending rate according to the congestion notification if the congestion notification corresponding to the message is received, so as to perform network optimization on the distributed machine learning; acquiring a time stamp of the data packet when the data packet is transmitted, and generating a delay signal based on the time stamp; and determining a congestion control signal according to the generated delay signal, and adjusting a sending rate according to the determined congestion control signal so as to perform network optimization on the distributed machine learning. It can be seen that by applying the embodiment of the invention, the new congestion control scheme is provided by congestion notification or determining the congestion control signal based on the delay signal to adjust the sending rate, so that the queuing time and the packet loss rate due to network congestion in the transmission data are reduced, the parameter communication time of distributed machine learning is reduced, the total training time is reduced, the stability of each generation of parameter update is improved, and the efficiency and the quality of distributed machine learning in the current technical environment are optimized.
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 disclosure of embodiments of the present application.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a distributed machine learning network optimization system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an application scenario of a network optimization system for distributed machine learning according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a network optimization method for distributed machine learning according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
In order to improve network quality and efficiency, the inventor researches in the field of distributed machine learning, and finds that in the research process, the existing distributed machine learning training environment and the transition from traditional TCP/IP to a higher-speed network environment based on RDMA (remote direct memory access) hardware gradually, and RoCEv2 is deployed in a large-scale data center, and the first problem is how to guarantee reliable transmission of RDMA. Reliable transmission is a promise of the transport layer to upper layer applications, which need to worry about the problem of packet loss or retransmission (only need to configure the number of retries and timeout time). The core of reliable transmission is how to cope with network packet loss. When the sending rate of the sending party exceeds the processing capacity of the receiving party, the data packets start to be backlogged in the receiving queue of the receiving party, and if the backlog condition is not relieved until the receiving queue is fully loaded, the receiving party can only select to discard the data packets received later. The receiver here may be the final receiver of the data packet or a switch, router, through which the middle passes. Reliable transmission is a guarantee that the data center applies a stable low delay. Once packet loss occurs, the transport layer typically punishly multiplicatively slows down (multiple-degradation) the sending rate and retransmits the dropped packets, and the user experiences sudden performance degradation. The RDMA retransmission mechanism is realized inside the network card, and the function is simpler.
For cost reasons, the buffers of data center switches are typically not large (a few MB to tens of MB). These buffers are shared by all ports to enable statistically significant multiplexing. Many distributed applications follow this communication mode of Partition/Aggregate. One request may be spread across multiple working nodes for processing, each node processing a portion of the dataset. After the processing is finished, all the working nodes gather the results to the same node almost simultaneously for data integration. This is a typical one-to-many scenario (also known as Incast), where backlog is easily seen on the port where the sink node is located. Multipath load imbalance. When there are multiple reachable paths in the network topology, roCEv2 selects the appropriate route for each Flow through ECMP (Equal-cost multi-path). ECMP has no ability to perceive congestion conditions and Flow may be allocated to paths where the congestion level is already quite severe, causing congestion to be exacerbated and packets to be lost.
In view of the problems of the existing scheme, the inventor finally provides a congestion control scheme in a distributed training network environment through continuous research, and the scheme not only can reduce the packet loss rate of network transmission, but also can reduce the training time of distributed learning and improve the training efficiency.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flow chart of a network optimization system for distributed machine learning according to an embodiment of the present application. The system includes a switch 101 and a sender 102 of distributed machine learning parameters, wherein,
a switch 101, configured to detect a current network communication state; the current network communication state comprises a queue length; if the length of the queue exceeds a preset congestion threshold value, marking the message; if the length of the queue exceeds a preset packet loss threshold, generating a first type of data packet; transmitting the first type data packet to an upstream port to prevent the upstream port from transmitting data;
the sending end 102 is configured to adjust a sending rate according to the congestion notification if the congestion notification corresponding to the message is received, so as to perform network optimization on distributed machine learning; acquiring a time stamp of the data packet when the data packet is transmitted, and generating a delay signal based on the time stamp; and determining a congestion control signal according to the generated delay signal, and adjusting a sending rate according to the determined congestion control signal so as to perform network optimization on the distributed machine learning.
The invention aims at the communication network where the distributed machine learning is located, reduces queuing time and packet loss rate caused by network congestion in transmission data through an improved congestion control scheme, thereby reducing the parameter communication time of the distributed machine learning, reducing the total training time, improving the stability of parameter updating of each generation, and optimizing the efficiency and quality of the distributed machine learning in the current technical environment.
When each independent training server is iteratively updated, the distributed machine with central control learns that the parameters need to be sent to communicate with the central control area, update the parameters, and acquire the training data of the next generation, thereby achieving the updating. In an environment with a large number of calculation server nodes and a large amount of training tasks, the required communication parameters become more, and the calculation time may be different due to the performance of the server and other reasons, so that a large amount of data is generated in a short time, and the network falls into a congestion state. The core of the invention is to introduce a combination of Explicit Congestion Notification (ECN) and Round Trip Time (RTT) congestion signals in an actual trained network environment, wherein the ECN is used as a per-hop signal to more effectively prevent packet loss, and the RTT is used as an end-to-end signal to better control end-to-end queuing delay. The invention combines the advantages of the two to be applied to the training network of the distributed machine learning, thereby achieving better training effect.
The switch can be a common switch or a network device with network communication capability; the transmitting end can be a server with a data analysis processing function and can be a sender of the parameters of the distributed machine learning. It should be noted that, the switch and the sending end may have one or more, and the system may further include a receiving end, that is, a receiver or a requester of the parameters of the distributed machine learning; the switch, the sending end, and the receiving end may together form a distributed server cluster, which is not limited in the embodiment of the present application.
The transmitting end can perform data transmission with other devices, such as another receiving end or a switch, and also can perform independent data analysis and the like. Specifically, the sending end may be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, etc., which is not limited to this, for example, a server may be used, a separate server may be used, a server cluster may be used, which is not limited to this, for example, a receiving end and a switch end may be devices located in the same local area network with the application terminal.
The switch can detect the current network communication state, and the current network congestion condition can be reflected through the network communication state. The current network traffic state may include a queue length, and when the queue length exceeds a preset congestion threshold, the packets may be marked by RED/ECN with a probability proportional to the queue length, and the packets formed by these marked packets may be regarded as signals indicating congestion and forwarded to the next hop.
RED, random Early Drop, is one means for the switch to handle congestion. The switch monitors the current queue depth and when the queue is nearly full, it will begin to drop some packets randomly. The probability of dropping a packet is positively correlated with the current queue depth. Random dropping has the advantage that it appears more fair to different flows, the more packets that are sent, the greater the probability of being dropped. ECN (Explicit Congestion Notification) is the last two bits of the IP header Differentiated Services field to indicate whether congestion has occurred. Deploying ECN functions typically requires the switch to turn on the RED at the same time. If both parties support the ECN (ECN is 01 or 10) function, when congestion occurs, the switch will update the ECN flag of the message to 11 (Congestion Encountered) and forward it to the next hop. The receiver can report congestion conditions to the sender according to the ECN flag bit, and adjust the sending rate. Therefore, when RED and ECN are simultaneously opened, the exchanger does not randomly lose packets any more when congestion occurs, but sets ECN for the message randomly.
The first type of packet may be a packet generated based on PFC (Priority-based Flow Control ). PFC may be used to prevent packet loss.
Theoretically, PFC extends over the basic flow control IEEE 802.3X, allowing 8 virtual channels to be created on one ethernet link, and assigning each virtual channel a corresponding priority, allowing any one of the virtual channels to be individually suspended and restarted, while allowing traffic of the other virtual channels to pass without interruption. PFC, however, causes an unfair allocation problem, essentially because the PFC's Pause mechanism operates at the level of (port + priority), cannot be refined to every Flow, but rather, roughly stops the entire transmit port. If the sending rate of each Flow can be dynamically adjusted, keeping the queue depth of the port relatively stable, then PFC Pause will not be triggered. Thus, flow-based congestion control algorithms have emerged. Congestion control differs significantly from PFC in two ways: congestion control dynamically adjusts the sending rate according to the congestion level, and PFC can stop the sending port completely; congestion control will typically be signalled by the receiver to the actual sender, whereas PFC will only signal the previous hop. The latter means that congestion control can be implemented at the Flow level: when the receiver finds that congestion occurs, the Flow identifier is carried in the congestion notification message and is notified to the sender. The sender can adjust the sending rate of the Flow accordingly. Congestion control is an adaptive adjustment process that relies on a good congestion detection method. Therefore, in order to solve the problem of unfair distribution of PFC, the invention further considers congestion control on the basis of PFC, thereby further optimizing the communication network.
The PFC may include a PFC threshold, and the preset packet loss threshold may be the PFC threshold. If the length of the queue exceeds the PFC threshold, a first type data packet can be generated and can be sent to an upstream port, namely a previous hop port after the first type data packet is generated, so that the previous hop port can stop sending the data packet after receiving the first type data packet, and network packet loss caused by incapability of timely processing is prevented.
It will be appreciated that the sender starts sending data at the highest speed and if there is congestion along the way, the switch can detect and mark the ECN bits of the message to indicate congestion. When the marked message is forwarded to the receiving end, it examines its ECN bits. If a receiver receives a packet with an ECN mark, it sends a Congestion Notification (CNP) to the sender of the data flow and during the next fixed period it will no longer send a CNP for the same data flow. The sender receiving the CNP message can start to slow down. When the sender does not receive the CNP message, the speed can be started and increased.
In order to realize rate adjustment, in one implementation manner, the sending end adjusts the sending rate according to the congestion notification, specifically:
And calculating a cutting ratio according to the congestion notification, and controlling the data transmission rate of the transmitting end according to the cutting ratio.
When the data flow sender receives the congestion notification, it may reduce the traffic or sending rate proportionally, and the specific ratio may be the cut ratio, and the present invention does not limit the calculation manner of the cut ratio, for example, the calculation is similar to DCTCP (data center TCP). When a congestion notification is received, the cut rate increases, decreasing the transmission rate. And when the transmitting end has no congestion notification, the cutting ratio is reduced, and the transmitting rate is increased. The specific process can be completed by the network card of the sender so as to realize the adjustment of the sending rate and avoid congestion.
Packet delay (measured in terms of round trip time of the host) signals are an effective congestion signal. The timestamp of the data packet may be recorded by the sender, specifically may be a software layer record of the sender, and further generates a delay signal based on the cooperation of hardware such as NIC (network interface controller ), where the delay signal may include a Round-Trip Time (RTT) of the data packet. Delay variation can be captured by a first order differential variation of RTT: when RTT increases, congestion is shown to be more severe; conversely, congestion is being relieved.
The congestion control signal may be a message, which may be regarded as an ECN signal, or a delayed signal, supporting the selection of two mainstream congestion signaling mechanisms. It can be seen that the network optimization system for distributed machine learning provided by the invention determines congestion control signals according to the current network state, comprehensively considers RTT signals and ECN signals, and combines respective processing advantages to determine congestion control signals.
In yet another implementation, the delay signal includes a round trip time of a data packet; the sending end determines the congestion control signal according to the generated delay signal, which can be specifically:
if the round trip time is within the preset range, the message is used as a congestion control signal:
and if the round trip time is not in the preset range, taking the delay signal as a congestion control signal.
The round trip time RTT is the time interval between when the transmitting end transmits the data packet and when the receiving end receives the acknowledgement packet of the opposite end. The RTT can reflect end-to-end network delay, and if congestion occurs, a data packet will be queued in a receiving queue, and the RTT will be correspondingly higher. ECN can only reflect the number of packets exceeding the queue threshold and cannot accurately quantify the delay. RTT may choose to make statistics at the software layer or the hardware layer. After the general network card receives the data packet, the upper layer is notified through the interrupt, and the operating system schedules the interrupt to process the packet receiving event. Both interrupts and scheduling will introduce some errors. Therefore, more accurate statistics is preferably performed by hardware, when the network card receives a packet, the network card replies an ACK packet immediately, and the sender can calculate RTT according to its arrival time. Note that the RTT calculation may deviate if the ACK reply packet encounters congestion due to other traffic effects. Higher priority may be set for ACK reply packets. Or ensuring that clocks of network cards at the receiving and transmitting ends are basically synchronous, and adding time stamp information to the reply packet. In addition, switching of network paths may also introduce some delay variations.
In order to improve the calculation accuracy of round trip time RTT, the invention provides an RTT calculation method, which comprises the following steps:
RTT=Tcompletion–Tsend-segsize/NIC line rate
the tcomplification represents a completed timestamp, which is an ACK timestamp (NIC and generated by hardware) returned by the sending end to the receiving end network card. Tsend represents a time stamp of when the data packet was transmitted; segsize represents the maximum segment size, and NIC line rate represents the NIC line rate;
the invention considers that one big data packet can be split into a plurality of data packets, and the data packet is transmitted from the network card with transmission delay, so that the time segsize/NIC line rate of the data packet is subtracted, thereby improving the accuracy of RTT calculation.
The preset range may be a preset reasonable time range, for example, at the terminal server (specifically, may be the transmitting end), a reasonable range interval (Tlow, th) is preset for RTT as the preset range. If the round trip time is not within the preset range, that is, if the round trip time is lower than Tlow or higher than the value of the congestion control signal, the RTT signal may be mainly used as the congestion control signal to control the transmission rate, which may be specifically: and if the calculated RTT is lower than Tlow, detecting the available bandwidth by adopting the harmony growth, and improving the sending rate. If the new RTT is higher than the Thigh, the transmission rate is reduced.
If the round trip time is within the preset range, a message (ECN signal) can be used as the congestion control signal. In this case, the following advantages are considered with respect to the ECN signal: congestion needs to be prevented if RTT is continuously maintained at a high level Tn (Tlow < Tn < th), but the gradient is hardly changed. At this time, ECN is adopted as a main congestion control signal, because ECN marks are adopted to only reflect the propagation delay along with the increase of the queue, but RTT signals contain the queue delay and the propagation delay, and when the RTT signals are between Tn and the huge, the ECN can display the propagation delay more stably, and at this time, the ECN is adopted as a main congestion control signal, so that the network congestion problem can be more reasonably solved.
It can be seen that, by applying the embodiment of the present invention, the congestion control algorithm selects RTT signals and/or ECN signals as congestion control signals according to the situation, so that not only can the ECN signals be used to control packet loss and timeout, but also the RTT signals can be used to limit packet round trip time, and the advantages thereof are combined, thereby achieving better network performance.
In another implementation manner, the sending end adjusts the sending rate according to the determined congestion control signal, which may specifically be:
Calculating a gradient value of the round trip time under the condition that the congestion control signal is the message, and adjusting the sending rate according to the gradient value;
and when the congestion control signal is a delay signal, adjusting the transmission rate according to the round trip time, the transmission rate of the previous generation and the upper limit value of the preset range.
Specifically, referring to fig. 2, the system rate adjustment procedure is as follows: rttn is the newly calculated RTT time, V is the adjusted transmission rate, and Vo is the transmission rate of the previous generation.
1) Rttn < Tlow
V=Vo+α;
It can be seen that when the newly calculated RTT is less than Tlow, a harmony growth strategy is adopted, i.e. the adjusted transmission rate is the sum of the transmission rate of the previous generation and the parameter α.
2) Rttn > Thigh
V=Vo·(1–β(1-Thigh/Rttn)),
3) When Tlow < Rttn < Tn
Gradient of Gr as RTT
①Gr<0
V=Vo+α·n
It can be seen that when the newly calculated RTT is greater than Tlow and less than Tn, if the RTT gradient is negative, a additive growth strategy is adopted, and the growth value is different from the growth value when Rttn < Tlow, specifically α·n, and the adjusted transmission rate is the sum of the transmission rate of the previous generation and the parameter α·n.
②Gr>0
Vn=Vo·(1-β·m)
It can be seen that when the newly calculated RTT is greater than Tlow and less than Tn, if the RTT gradient is positive, a multiplicative increase strategy is adopted, that is, the adjusted transmission rate is the product of the transmission rate of the previous generation and the parameter (1- β·m).
The α, β, m, and n are all set according to the actual environment, and the specific numerical values are not limited in the present invention.
4)Tn<Rttn<Thigh
γ=g*old_γ+(1-g)*CNP_arrived
Vn=Vo*(1-γ/2)
When the newly calculated RTT is greater than Tn and less than Thigh, the ECN signal is used as the dominant congestion control signal, the adjusted transmission rate is the product of the transmission rate of the previous generation and the parameter (1- γ/2), and γ parameter is the proportion of the time gap where CNP arrives.
It will be appreciated that in this case, the time is split into configurable time slots. Each time slot indicates whether there is a CNP arriving within the time slot. The gamma parameter is an average value that varies continuously and reflects the proportion of time slots in which CNPs arrive. At the end of each time slot, γ is updated by the above equation. g is a constant parameter between 0 and 1, cnp_estimated is a field of bits indicating whether CNP has arrived in the last time slot, and these parameters are all calculated after transmission.
In one implementation manner, the sending end adjusts the sending rate according to the congestion notification, specifically:
and in each period window, the network card of the transmitting end updates the congestion degree parameter according to the congestion notification, and adjusts the transmitting rate according to the congestion degree parameter.
In each period window, the sender network card can update the congestion degree parameter according to the following update basis: if congestion notification is received, adding a congestion parameter; otherwise, gradually reducing the congestion parameter, and then adjusting the sending rate according to the congestion degree parameter. Specifically, if congestion notification is received, the rate is reduced: otherwise, the quick recovery is performed.
It can be seen that the network optimization procedure based on congestion control proposed by the present invention may comprise three parts: congestion measurement, congestion control, rate control.
Congestion measurement: the switch checks the current network communication state, when the queue length exceeds the preset congestion threshold value, the message is marked by RED/ECN, and the data packet formed by the marked message can be regarded as a signal for displaying congestion and then forwarded to the next hop. When the queue length exceeds the PFC threshold, PFC packets will be sent to the upstream port to prevent the upstream port from sending data.
Congestion control: at the server of the terminal (which may be regarded as the sender), the timestamp of the packet transmission is recorded by the sender software layer, and the RTT is generated by means of hardware such as NIC. Capturing the delay variation by first order differential variation of RTT: when RTT increases, congestion is shown to be more severe; conversely, congestion is being relieved. Two mainstream congestion signaling mechanisms are available.
Rate control: when the traffic sender receives the CNP, it can scale down the traffic. Specifically, when CNP is received, the cut rate increases and the rate decreases. And when CNP is not received, the cut ratio decreases and the rate increases.
The iterative updating efficiency of distributed machine learning is improved by the network congestion control scheme, and the training quality is improved due to the reduction of the packet loss rate.
The key point of the invention is that for the optimization of the distributed machine learning nowadays, the invention is realized by optimizing the communication time and reducing the packet loss rate, and the invention can specifically determine the congestion control signal according to the delay signal and adjust the sending rate according to the determined congestion control signal so as to perform network optimization on the distributed machine learning.
The congestion control signal of the present invention may include RTT and ECN, where the ECN signal is used as the dominant signal for rate control when the network traffic is approaching saturation, and the RTT signal is used as the dominant signal for rate control in other cases.
The invention can apply congestion control to realize optimization of the training network by utilizing the training network of high-speed distributed machine learning, which is expressed in that the optimization is performed on training quality and training time. The invention considers two signals to realize congestion control, can utilize ECN signals to control packet loss and overtime, can utilize RTT signals to limit packet round trip time, and combines the advantages of the signals to achieve better network performance.
Corresponding to the above embodiment of the personnel management system, the embodiment of the present invention provides a network optimization method for distributed machine learning, refer to fig. 3, and fig. 3 is a flowchart of a network optimization method for distributed machine learning according to another embodiment of the present application, where the network optimization method is applied to a transmitting end of the above-mentioned distributed machine learning parameters.
As shown in fig. 3, the network optimization method of distributed machine learning of the present embodiment includes steps S310 to S340.
S310, if congestion notification is received, adjusting a sending rate according to the congestion notification so as to perform network optimization on distributed machine learning;
s320, acquiring a time stamp of the data packet when the data packet is transmitted, and generating a delay signal based on the time stamp;
s330, determining a congestion control signal according to the generated delay signal;
and S340, adjusting the sending rate according to the determined congestion control signal so as to perform network optimization on the distributed machine learning.
Therefore, by applying the technical scheme provided by the embodiment of the invention, the new congestion control scheme is provided by congestion notification or determining the congestion control signal based on the delay signal to adjust the sending rate, so that the queuing time and the packet loss rate due to network congestion in the transmission data are reduced, the parameter communication time of distributed machine learning is reduced, the total training time is reduced, the stability of each generation of parameter updating is improved, and the efficiency and the quality of distributed machine learning in the current technical environment are optimized.
Optionally, the adjusting the sending rate according to the congestion notification includes:
and calculating a cutting ratio according to the congestion notification, and controlling the data transmission rate of the transmitting end according to the cutting ratio.
Optionally, the delay signal comprises a round trip time of the data packet; the determining a congestion control signal from the generated delay signal comprises:
if the round trip time is within the preset range, the message is used as a congestion control signal:
and if the round trip time is not in the preset range, taking the delay signal as a congestion control signal.
Optionally, the sending end adjusts the sending rate according to the determined congestion control signal, specifically:
in the case that the congestion control signal is the message, the round trip time is the round trip time of the message; calculating a gradient value of the round trip time, and adjusting a sending rate according to the gradient value;
and when the congestion control signal is a delay signal, adjusting the transmission rate according to the round trip time, the transmission rate of the previous generation and the upper limit value of the preset range.
Optionally, the sending end adjusts the sending rate according to the congestion notification, specifically:
And in each period window, the network card of the transmitting end updates the congestion degree parameter according to the congestion notification, and adjusts the transmitting rate according to the congestion degree parameter.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the method embodiments, since they are substantially similar to the system embodiments, the description is relatively simple, with reference to the partial description of the system embodiments being relevant.
The embodiment of the application further provides an electronic device, referring to fig. 4, which shows a schematic structural diagram of the electronic device, where the electronic device may include: at least one processor 301, at least one communication interface 302, at least one memory 303, and at least one communication bus 304;
in the embodiment of the present application, the number of the processor 301, the communication interface 302, the memory 303, and the communication bus 304 is at least one, and the processor 301, the communication interface 302, and the memory 303 complete communication with each other through the communication bus 304;
processor 301 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention, etc.;
The memory 303 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory), etc., such as at least one magnetic disk memory;
wherein the memory stores a program, the processor may invoke the program stored in the memory, the program being used in the above-described network optimization method for distributed machine learning, the method comprising: if congestion notification is received, adjusting a sending rate according to the congestion notification so as to perform network optimization on distributed machine learning; acquiring a time stamp of the data packet when the data packet is transmitted, and generating a delay signal based on the time stamp; and determining a congestion control signal according to the generated delay signal, and adjusting a sending rate according to the determined congestion control signal so as to perform network optimization on the distributed machine learning.
By applying the embodiment of the invention, the technical scheme provided by the embodiment of the invention is used for adjusting the sending rate by the congestion notification or determining the congestion control signal based on the delay signal, thereby providing a new congestion control scheme, reducing the queuing time and the packet loss rate due to network congestion in the transmission data, reducing the parameter communication time of distributed machine learning, reducing the total training time, improving the stability of each generation of parameter update, and optimizing the efficiency and the quality of the distributed machine learning in the current network environment.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
The present application further provides a computer readable storage medium storing a computer program, where the computer program when executed by a processor causes the processor to implement the network optimization step applied to the distributed machine learning of the transmitting end provided in the foregoing embodiment.
The computer readable storage medium may be an internal storage unit of the data analysis terminal according to any one of the foregoing embodiments, for example, a hard disk or a memory of the data analysis terminal. The computer readable storage medium may also be an external storage device of the data analysis terminal, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the data analysis terminal.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
It is to be understood that the term "and/or" as used in this application and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A network optimization system for distributed machine learning, the system comprising a switch and a sender of distributed machine learning parameters, wherein
The switch is used for detecting the current network communication state; the current network communication state comprises a queue length; if the length of the queue exceeds a preset congestion threshold value, marking the message; if the length of the queue exceeds a preset packet loss threshold, generating a first type of data packet; transmitting the first type data packet to an upstream port to prevent the upstream port from transmitting data;
the sending end is used for adjusting the sending rate according to the congestion notification if the congestion notification corresponding to the message is received, so as to perform network optimization on the distributed machine learning; acquiring a time stamp of the data packet when the data packet is transmitted, and generating a delay signal based on the time stamp; and determining a congestion control signal according to the generated delay signal, and adjusting a sending rate according to the determined congestion control signal so as to perform network optimization on the distributed machine learning.
2. The network optimization system according to claim 1, wherein the sending end adjusts a sending rate according to the congestion notification, specifically:
And calculating a cutting ratio according to the congestion notification, and controlling the data transmission rate of the transmitting end according to the cutting ratio.
3. The network optimization system of claim 1, wherein the delay signal comprises a round trip time of a data packet; the sending end determines congestion control signals according to the generated delay signals, specifically:
if the round trip time is within the preset range, the message is used as a congestion control signal:
and if the round trip time is not in the preset range, taking the delay signal as a congestion control signal.
4. The network optimization system according to claim 3, wherein the sending end adjusts the sending rate according to the determined congestion control signal, specifically:
calculating a gradient value of the round trip time under the condition that the congestion control signal is the message, and adjusting the sending rate according to the gradient value;
and when the congestion control signal is a delay signal, adjusting the transmission rate according to the round trip time, the transmission rate of the previous generation and the upper limit value of the preset range.
5. The network optimization system according to claim 1, wherein the sending end adjusts a sending rate according to the congestion notification, specifically:
And in each period window, the network card of the transmitting end updates the congestion degree parameter according to the congestion notification, and adjusts the transmitting rate according to the congestion degree parameter.
6. A network optimization method for distributed machine learning, applied to a transmitting end of distributed machine learning parameters, the method comprising:
if congestion notification is received, adjusting a sending rate according to the congestion notification so as to perform network optimization on distributed machine learning;
acquiring a time stamp of the data packet when the data packet is transmitted, and generating a delay signal based on the time stamp; and determining a congestion control signal according to the generated delay signal, and adjusting a sending rate according to the determined congestion control signal so as to perform network optimization on the distributed machine learning.
7. The method of claim 6, wherein adjusting the sending rate based on the congestion notification comprises:
and calculating a cutting ratio according to the congestion notification, and controlling the data transmission rate of the transmitting end according to the cutting ratio.
8. The method of claim 6, wherein the delay signal comprises a round trip time of a data packet; the determining a congestion control signal from the generated delay signal comprises:
If the round trip time is within the preset range, the message is used as a congestion control signal:
and if the round trip time is not in the preset range, taking the delay signal as a congestion control signal.
9. An electronic device comprising a memory and a processor;
the memory is connected with the processor and used for storing programs;
the processor is configured to implement the steps of the distributed machine learning network optimization method according to any one of claims 6-8 by running a program stored in the memory.
10. A computer readable storage medium storing a computer program, wherein the computer program causes a computer to perform the distributed machine learning network optimization of any one of claims 6-8.
CN202111556970.6A 2021-12-18 2021-12-18 Distributed machine learning network optimization system, method and electronic equipment Pending CN116266826A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111556970.6A CN116266826A (en) 2021-12-18 2021-12-18 Distributed machine learning network optimization system, method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111556970.6A CN116266826A (en) 2021-12-18 2021-12-18 Distributed machine learning network optimization system, method and electronic equipment

Publications (1)

Publication Number Publication Date
CN116266826A true CN116266826A (en) 2023-06-20

Family

ID=86743984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111556970.6A Pending CN116266826A (en) 2021-12-18 2021-12-18 Distributed machine learning network optimization system, method and electronic equipment

Country Status (1)

Country Link
CN (1) CN116266826A (en)

Similar Documents

Publication Publication Date Title
US11316795B2 (en) Network flow control method and network device
Al-Saadi et al. A survey of delay-based and hybrid TCP congestion control algorithms
Le Boudec Rate adaptation, congestion control and fairness: A tutorial
US7908393B2 (en) Network bandwidth detection, distribution and traffic prioritization
US8638686B2 (en) Buffer sizing for multi-hop networks
Hwang et al. Deadline and incast aware TCP for cloud data center networks
CN103916329A (en) Named data network transmission control method and system
Lu SED: An SDN-based explicit-deadline-aware TCP for cloud Data Center Networks
CN104092625A (en) Adaptive request batch scheduling method used in DCN
Xu et al. Throughput optimization of TCP incast congestion control in large-scale datacenter networks
Weigle et al. Delay-based early congestion detection and adaptation in TCP: impact on web performance
Qazi et al. Congestion control with multipacket feedback
Sup et al. Explicit non-congestion notification: A new AQM approach for TCP networks
Kozačinski et al. Configuration of quality of service parameters in communication networks
CN116266826A (en) Distributed machine learning network optimization system, method and electronic equipment
Wang et al. Adaptive congestion control framework and a simple implementation on high bandwidth-delay product networks
CA2940077A1 (en) Buffer bloat control
Gosai et al. Evolution of Congestion Control Mechanisms for TCP and Non TCP Protocols
Ling et al. Blocking time-based mptcp scheduler for heterogeneous networks
Marbach et al. Active queue management and scheduling for wireless networks: The single-cell case
Shi et al. PABO: Congestion mitigation via packet bounce
Yaakob et al. Distributed collision control with the integration of packet size for congestion control in wireless sensor networks
Kassing et al. New primitives for bounded degradation in network service
Ishani et al. Comparative Study on Various Congestion Control Protocols: TCP, XCP and RCP
Tajima et al. Priority control using multi-buffer for DTN

Legal Events

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