CN110750486A - RDMA data stream control method, system, electronic device and readable storage medium - Google Patents

RDMA data stream control method, system, electronic device and readable storage medium Download PDF

Info

Publication number
CN110750486A
CN110750486A CN201910902964.8A CN201910902964A CN110750486A CN 110750486 A CN110750486 A CN 110750486A CN 201910902964 A CN201910902964 A CN 201910902964A CN 110750486 A CN110750486 A CN 110750486A
Authority
CN
China
Prior art keywords
credit
receiving
data
rdma
receiving end
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
CN201910902964.8A
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN201910902964.8A priority Critical patent/CN110750486A/en
Publication of CN110750486A publication Critical patent/CN110750486A/en
Priority to PCT/CN2020/093885 priority patent/WO2021057068A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • G06F15/17306Intercommunication techniques
    • G06F15/17331Distributed shared memory [DSM], e.g. remote direct memory access [RDMA]

Abstract

The embodiment of the specification discloses a RDMA data stream control method, which is applied to a sending end, wherein the sending end is provided with RDMA equipment of the sending end, and the RDMA equipment of the sending end acquires a data receiving credit sent by a receiving end, wherein the data receiving credit is used for representing the data receiving quantity of the RDMA equipment of the receiving end; the RDMA equipment at the sending end determines N data packets to be sent according to the data receiving credit, wherein the target credit of the N data packets to be sent is less than the data receiving credit; and the RDMA equipment at the sending end transmits the N data packets to be sent to a receiving end.

Description

RDMA data stream control method, system, electronic device and readable storage medium
Technical Field
The embodiment of the specification relates to the technical field of data processing, in particular to a method, a system, an electronic device and a readable storage medium for RDMA data stream control.
Background
RDMA technology is receiving increasing attention in modern enterprise-level data centers as it is able to address server-side data processing delays in network transport, while being used by more and more applications. RDMA is a high-throughput, low-latency network communication, particularly suitable for use in massively parallel computer clusters. However, RDMA itself lacks a flow control mechanism, which causes congestion and causes the buffer of the receiving end to be exhausted, and therefore, a new method for improving the RDMA transmission performance is urgently needed.
Disclosure of Invention
The embodiment of the specification provides an RDMA data sending and stream control method, an electronic device and a readable storage medium, which can effectively improve the transmission performance of RDMA.
A first aspect of an embodiment of the present specification provides an RDMA data stream control method, which is applied to a sending end, where the sending end is provided with a sending end RDMA device, and the method includes:
the method comprises the steps that data receiving credit sent by a receiving end is obtained by the RDMA equipment of the sending end, wherein the data receiving credit is used for representing data receiving quantity of the RDMA equipment of the receiving end;
the RDMA equipment at the sending end determines N data packets to be sent according to the data receiving credit, wherein the target credit of the N data packets to be sent is less than the data receiving credit, and N is a positive integer;
and the RDMA equipment at the sending end transmits the N data packets to be sent to a receiving end.
A second aspect of the present embodiment provides an RDMA data stream control method, which is applied to a receiving end, where the receiving end is provided with an RDMA device, and the method includes:
the RDMA equipment of the receiving end determines a data receiving credit according to the data receiving amount of the RDMA equipment and sends the data receiving credit to the sending end;
the receiving end RDMA equipment receives N data packets to be sent by the sending end, wherein the N data packets to be sent are determined by the sending end according to the data receiving credit, the target credit of the N data packets to be sent is less than the data receiving credit, and N is a positive integer;
and the RDMA equipment of the receiving end stores the N data packets to be sent into the storage equipment of the receiving end.
The third aspect of the embodiments of the present specification further provides a sender, where an RDMA device of the sender is disposed in the sender, and the RDMA device includes:
a credit receiving unit, configured to obtain a data reception credit sent by a receiving end by the sending end RDMA device, where the data reception credit is used to characterize a data reception amount of the receiving end RDMA device of the receiving end;
a data packet determining unit, configured to determine, by the RDMA device at the sending end, N data packets to be sent according to the data reception credit, where target credits of the N data packets to be sent are smaller than the data reception credit, and N is a positive integer;
and the data transmission unit is used for transmitting the N data packets to be transmitted to a receiving end by the RDMA equipment at the transmitting end.
The fourth aspect of the embodiments of the present specification further provides a receiving end, where an RDMA device of the receiving end is disposed in the receiving end, and the receiving end includes:
the data receiving credit determination any is used for determining the data receiving credit by the RDMA equipment of the receiving end according to the data receiving amount of the RDMA equipment of the receiving end and sending the data receiving credit to the sending end;
a data receiving unit, configured to receive, by the receiving end RDMA device, N to-be-sent data packets sent by the sending end, where the N to-be-sent data packets are determined by the sending end according to the data reception credit, and target credits of the N to-be-sent data packets are smaller than the data reception credit;
and the data storage unit is used for storing the N data packets to be sent into the storage device of the receiving end by the RDMA device of the receiving end.
The fifth aspect of the present embodiment further provides an RDMA data stream control system, including a receiving end and a sending end, including:
the receiving end is used for determining a data receiving credit by the RDMA equipment of the receiving end according to the data receiving quantity of the RDMA equipment of the receiving end and sending the data receiving credit to the sending end, wherein the data receiving credit is used for representing the data receiving quantity of the RDMA equipment of the receiving end;
the sending end is used for receiving the data receiving credit by the RDMA equipment of the sending end and determining N data packets to be sent according to the data receiving credit, wherein the target credit of the N data packets to be sent is less than the data receiving credit, and N is a positive integer; transmitting the N data packets to be transmitted to the receiving end;
the receiving end is configured to receive the N data packets to be sent by the RDMA device of the receiving end, and store the N data packets to be sent in a storage device of the receiving end.
The sixth aspect of the embodiments of the present specification further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the RDMA data stream control method described above when executing the program.
The seventh aspect of the present embodiment further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the RDMA data stream control method.
The beneficial effects of the embodiment of the specification are as follows:
based on the above technical solution, the RDMA device at the sending end determines N data packets to be sent according to the received data reception credit, and sends the N data packets to the receiving end, at this time, since the target credit of the N data packets to be sent is less than the data reception credit, since the credit corresponds to the data amount, the larger the credit is, the larger the corresponding data amount is, that is, when it is determined that the target credit is less than the data reception credit, the data amount of the N data packets to be sent is also less than the data reception amount, so that the N data packets to be sent are within the reception performance range of the RDMA device at the receiving end, thereby ensuring that the RDMA device at the receiving end can receive 100% of the N data packets to be sent, effectively reducing the probability of discarding the data packets, and reducing the probability of network retransmitting the data packets under the condition that the probability of discarding the data packets is reduced, and further, the transmission performance of RDMA can be effectively improved.
Drawings
FIG. 1 is a system architecture diagram of an RDMA data stream control system in an embodiment of the present disclosure;
fig. 2 is a flowchart of a method applied to RDMA data stream control on a sending end in an embodiment of the present specification;
FIG. 3 is a flowchart of a method applied to RDMA data stream control at a receiving end in an embodiment of the present specification;
fig. 4 is a schematic structural diagram of a transmitting end in an embodiment of the present specification;
fig. 5 is a schematic structural diagram of a receiving end in the embodiment of the present specification;
fig. 6 is a schematic structural diagram of an electronic device in an embodiment of this specification.
Detailed Description
In order to better understand the technical solutions, the technical solutions of the embodiments of the present specification are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features of the embodiments and embodiments of the present specification are detailed descriptions of the technical solutions of the embodiments of the present specification, and are not limitations of the technical solutions of the present specification, and the technical features of the embodiments and embodiments of the present specification may be combined with each other without conflict.
In the embodiment of the present specification, Remote Direct Memory Access (RDMA for short) is generated to solve a delay of server-side data processing in network transmission; RDMA transfers data directly to a computer's storage area over a network, quickly moving data from one system to a remote system memory without any impact on the operating system, thus eliminating the need for as many computer processing functions as are needed. It eliminates the overhead of external memory copy and context switch, thus freeing up memory bandwidth and CPU cycles for improved application system performance.
In a first aspect, as shown in fig. 1, an embodiment of the present specification provides an RDMA data stream control system, including a sending end 100 and a receiving end 200, including:
the receiving end 200 is configured to determine a data receiving credit according to a data receiving amount of the receiving end RDMA device 201, and send the data receiving credit to the sending end 100, where the data receiving credit is used to characterize the data receiving amount of the receiving end RDMA device 201;
a sending end 100, configured to receive the data reception credit by an RDMA device 101 of the sending end, and determine N data packets to be sent according to the data reception credit, where target credits of the N data packets to be sent are smaller than the data reception credit, and N is a positive integer; transmitting the N data packets to be transmitted to the receiving end 200;
the receiving end 200 is configured to receive the N data packets to be sent by the receiving end RDMA device 201, and store the N data packets to be sent in the storage device of the receiving end 200.
In the embodiments of the present specification, N is a positive integer, and N may be, for example, 1, 2, or 4.
In the embodiment of the present specification, the transmitting end 100 and the receiving end 200 may be electronic devices such as a notebook computer, a desktop computer, a smart phone, a smart watch, an all-in-one machine, and a tablet computer; further, the sending end RDMA device 101 is arranged in the sending end 100, and the receiving end RDMA device 201 is arranged in the receiving end 200, wherein both the sending end RDMA device 101 and the receiving end RDMA device 201 can be RDMA network cards, RDMA chips, and the like.
In this embodiment, before the receiving RDMA device 201 sends the data reception credit to the sending end 100, the receiving end 200 and the sending end 100 first need to establish a connection, and then the receiving RDMA device 201 sends the data reception credit to the sending end RDMA device 101.
In this embodiment, the receiving RDMA device 201 first obtains its own data receiving amount, determines a data receiving credit according to the data receiving amount, and then sends the data receiving credit to the sending RDMA device 101.
Specifically, in the process of determining the data receiving credit according to the data receiving quantity, because RDMA is generally transmitted by messages of 4K/8K/16K and the like in length level in transmission, even if an upper layer service needs to transmit 100M data blocks, the RDMA layer is divided into messages of 4K/8K/16K and the like for transmission, and therefore the data receiving credit is determined according to the data receiving quantity and the maximum data quantity contained in the messages adopted in RDMA; if the data receiving amount is represented by S, the maximum data amount included in the message is represented by D, and the data receiving credit is represented by X, X is S/D, for example, if S is 100M and D is 8K, X is 100M/8K is 12800; of course, X may be S/(100 × D) 128, or the like.
Of course, the data receiving credit may also be determined according to the data receiving amount and an average data amount included in a packet used in RDMA, which is not limited in this specification.
In this embodiment, after the receiving end RDMA device 201 sends the data reception credit to the sending end RDMA device 101, the sending end RDMA device 101 receives the data reception credit, at this time, since the data reception credit represents a data reception amount of the receiving end RDMA device 201, N data packets to be sent are determined according to the data reception credit, so that target credits of the N data packets to be sent are smaller than the data reception credit, since credits correspond to data amounts, the corresponding data amounts are larger as credits are larger, that is, when it is determined that the target credits are smaller than the data reception usage, the data amounts of the N data packets to be sent are also smaller than the data reception amount, so that the N data packets to be sent are within a reception performance range of the receiving end RDMA device 201, thereby ensuring that the receiving end RDMA device 201 can receive 100% of the N data packets to be sent, the probability of discarding the data packet is reduced, and the probability of retransmitting the data packet by the network is reduced under the condition of reducing the probability of discarding the data packet, so that the transmission performance of RDMA can be effectively improved.
In this embodiment, after the receiving RDMA device 201 sends the data reception credit to the sending end 100, the receiving RDMA device 201 adjusts the credit value of its own data reception credit to a set credit value, where the set credit value may be equal to 0 or 1 or 2, and when the credit value of the data reception credit is the set credit value, the current data reception amount of the receiving RDMA device 201 is 0.
In this way, the receiving end RDMA device 201 adjusts the credit value of its own data reception credit to the set credit value, and then adjusts the current data reception amount of the receiving end RDMA device 201 to 0 by the set credit value, thereby improving the accuracy of subsequently adjusting the data reception credit of the receiving end RDMA device 201.
In this embodiment of the present specification, after the sending-end RDMA device 101 transmits the N data packets to be sent to the receiving end, the sending-end RDMA device 101 may determine target credits of the N data packets to be sent; then, determining the current receiving credit of the receiving end 200 according to the data receiving credit and the target credit; at this time, the current reception credit of the receiving end 200 is the difference between the data reception credit and the target credit.
For example, if the data reception credit is represented by a1, the target credit is represented by a2, and the current reception credit is represented by A3, then A3 is a1-a2, for example, a1 is 100, and a2 is 40, then A3 is 60, that is, it is determined that the current reception credit of the receiving end 200 is 60, that is, if the number of packets corresponding to the current reception credit is 120, the number of packets that can be processed at one time by the receiving end RDMA device 201 is not more than 120, so that the number of packets sent next time by the sending end RDMA device 101 is not more than 120, and the receiving end RDMA device 201 can process all packets sent by the sending end RDMA device 101 at one time, thereby reducing the probability of occurrence of a packet discarding situation.
Thus, after the sending end RDMA device 101 issues the N data packets to be sent, the current receiving credit of the receiving end 200 is determined according to the data receiving credit and the target credit, so that the current receiving credit of the receiving end 200 can be updated in real time, the number of the data packets sent next by the sending end RDMA device 101 is still within the receiving capability range of the receiving end 200, the receiving end RDMA device 201 can further receive 100% of all the data packets sent next, the probability that the data packets sent next are discarded is reduced, the probability that the network retransmits the data packets is also reduced under the condition that the probability of the data packets sent next is reduced, and the transmission performance of RDMA can be further improved.
In this embodiment, after the receiving RDMA device 201 stores the N data packets to be sent in the storage device of the receiving end, the receiving RDMA device 201 may further increase the data reception credit of the receiving RDMA device 201 according to the target credit and the set credit value, where the increased data reception credit of the receiving RDMA device 201 is the sum of the credit value of the target credit and the set credit value.
Thus, after the receiving end RDMA device 201 stores the N data packets to be sent in the receiving end storage device, the current data receiving amount of the receiving end RDMA device 201 is recovered, and further the data receiving credit of the receiving end RDMA device 201 needs to be increased, and the increased data receiving credit of the receiving end RDMA device 201 is the sum of the credit value of the target credit and the set credit value, so that it is ensured that the credit value of the data receiving credit of the receiving end RDMA device 201 is increased after the receiving end RDMA device 201 completes processing the N data packets to be sent, and the increased credit value is the same as the credit value of the target credit, so that the data receiving credit of the receiving end RDMA device 201 is updated in real time according to the situation of processing data, and the accuracy of the data receiving credit of the receiving end RDMA device 201 is improved.
In this embodiment of the present description, after the receiving end RDMA device 201 increases the data reception credit of the receiving end RDMA device 201, the receiving end RDMA device 201 determines whether the new credit satisfies the synchronization condition, where the new credit is the data reception credit that is added after the receiving end RDMA device 201 stores the N data packets to be sent; the receiving end RDMA device 201 determines that the new credit satisfies the synchronization condition, synchronizes the new credit to the sending end 100, and the receiving end RDMA device 201 adjusts the credit value of its own data receiving credit to a set credit value; and if the receiving end RDMA device 201 judges that the newly added credit does not meet the synchronization condition, the synchronization operation is not performed.
Specifically, the synchronization condition may be that the newly added credit is greater than a preset threshold, and if the newly added credit is greater than the preset threshold, the synchronization condition is satisfied, otherwise, the synchronization condition is not satisfied; the synchronization condition may also be that the time interval of the newly added credit exceeds a preset time length, if the time interval of the newly added credit exceeds the preset time length, the synchronization condition is satisfied, otherwise, the synchronization condition is not satisfied.
In this embodiment of the present specification, after the sending-end RDMA device 101 transmits the N data packets to be sent to the receiving end, the sending-end RDMA device 101 may further obtain the newly added credit for synchronization sent by the receiving end 200; and the RDMA equipment 101 at the sending end updates the current receiving credit of the receiving end according to the new credit.
For example, as shown in fig. 1, the RDMA network card 101 is installed in the sending end 100, the RDMA network card 201 is installed in the receiving end 200, the RDMA network card 201 first establishes a connection with the RDMA network card 101, and the RDMA network card 201 sends its credit a1 to the RDMA network card 101 and clears its credit 0.
After the RDMA network card 101 receives a1, determining 20 data packets to be sent according to a1, wherein if a1 is 100 and the credit of the 20 data packets to be sent is < 100; and sending 20 data packets to be sent to the RDMA network card 201, and at this time, determining that the current data receiving credit of the RDMA network card 201 is a 1-20-100-20-80 according to a1 and 20 credits of the data to be sent being 20.
After receiving 20 data packets to be sent, the RDMA network card 201 stores the 20 data packets to be sent into the storage device of the receiving end 200, at this time, the credit 20 of 0+20 data packets to be sent is added to the RDMA network card 201, the RDMA network card 201 synchronizes its credit to the RDMA network card 101 every 2 seconds, and at this time, the current time is less than 2 seconds from the time of issuing a1, so that synchronization is not needed.
Further, after 20 to-be-sent data packets are transmitted for the first time, when data transmission is performed again, according to the determination that the current data reception credit of the RDMA network card 201 is 80, 40 to-be-sent data packets are determined, and the 40 to-be-sent data packets are sent to the RDMA network card 201, wherein the credit of the 40 to-be-sent data packets is 40, and since 40 is <80, it is then determined that the credit of the current data reception credit of the RDMA network card 201 is 80-40 to-be-sent data is 40.
Further, after receiving 40 to-be-sent data packets, the RDMA network card 201 stores the 40 to-be-sent data packets into the storage device of the receiving end 200, at this time, if the credit of the 40 to-be-sent data packets is 40, it is determined that the RDMA network card 401 increases its credit of 40+20 to 60, at this time, the RDMA network card 201 detects that the time interval between the current time and the time of sending a1 is 2 seconds, and then 60 is synchronized to the RDMA network card 101.
At this time, after receiving the synchronized data 60, the RDMA network card 101 updates the credit of the RDMA network card 201 to 60+40 to 100 according to the data 60 and the current data receiving credit 40 determined for the second time; and the steps are circulated until all data transmission is finished.
In this way, after the receiving end RDMA device 201 detects that the new credit satisfies the synchronization condition, the new credit is synchronized to the sending end 100, and the credit value of its own data receiving credit is adjusted to the set credit value; so that the sending end 100 updates the current receiving credit of the receiving end 200 according to the new credit after receiving the new credit, determining a plurality of data packets to be sent according to the updated current receiving rate, thereby enabling the change of the receiving capability of the receiving end RDMA device 201 to be completed through the streaming of the new credit, continuously updating the receiving capability of the receiving end RDMA device 201 and synchronizing to the sending end 100, thereby ensuring that the sending end 100 can send the data packet without exceeding the receiving performance of the receiving end RDMA device 201 to the receiving end DMA device 201 for processing, effectively relieving the RDMA network congestion problem, meanwhile, the probability of data packet discarding and network retransmission caused by the buffer exhaustion of the RDMA equipment 201 at the receiving end can be reduced, and the data transmission performance, stability and expansibility of RDMA can be effectively improved.
And the sending end RDMA device determines N data packets to be sent according to the received data receiving credit, and sends the N data packets to the receiving end, at this time, because the target credit of the N data packets to be sent is less than the data receiving credit, and because the credit corresponds to the data volume, the larger the credit is, the larger the corresponding data volume is, namely when the target credit is determined to be less than the data receiving use, the data volume of the N data packets to be sent is also less than the data receiving volume, so that the N data packets to be sent are in the receiving performance range of the receiving end RDMA device, thereby ensuring that the receiving end RDMA device can receive the N data packets to be sent 100%, effectively reducing the discarding probability of the data packets, and reducing the probability of network retransmission of the data packets under the condition that the discarding probability of the data packets is reduced, and further, the transmission performance of RDMA can be effectively improved.
In a second aspect, based on the same inventive concept as that of the first aspect, an embodiment of the present specification provides an RDMA data stream control method, which is applied to a sending end, where the sending end is provided with a sending end RDMA device, and as shown in fig. 2, the method includes:
step S202, the RDMA equipment at the sending end acquires a data receiving credit sent by a receiving end, wherein the data receiving credit is used for representing the data receiving quantity of the RDMA equipment at the receiving end of the receiving end;
step S204, the RDMA equipment at the sending end determines N data packets to be sent according to the data receiving credit, wherein the target credit of the N data packets to be sent is less than the data receiving credit, and N is a positive integer;
step S206, the RDMA equipment of the sending end transmits the N data packets to be sent to a receiving end.
In an optional implementation, after the transmitting RDMA device transmits the N data packets to be transmitted to the receiving end, the method includes:
and the RDMA equipment of the sending end determines the current receiving credit of the receiving end according to the data receiving credit and the target credit.
In an optional implementation, after the transmitting RDMA device transmits the N data packets to be transmitted to the receiving end, the method includes:
the RDMA equipment at the sending end acquires new credit for synchronization sent by the receiving end, wherein the new credit is data receiving credit added after the RDMA equipment at the receiving end stores the N data packets to be sent;
and the RDMA equipment of the sending end updates the current receiving credit of the receiving end according to the new credit.
In a third aspect, based on the same inventive concept as that of the first aspect, an embodiment of the present specification provides an RDMA data stream control method, which is applied to a receiving end, where the receiving end is provided with a receiving end RDMA device, as shown in fig. 3, including:
step S302, the RDMA equipment of the receiving end determines a data receiving credit according to the data receiving amount of the RDMA equipment and sends the data receiving credit to the sending end;
step S304, the receiving end RDMA device receives N data packets to be sent from the sending end, wherein the N data packets to be sent are determined by the sending end according to the data receiving credit, the target credit of the N data packets to be sent is less than the data receiving credit, and N is a positive integer;
step S306, the RDMA equipment of the receiving end stores the N data packets to be sent into the storage equipment of the receiving end.
In an optional embodiment, after the receiving RDMA device sends the data reception credit to a sender, the method further comprises:
and the receiving end RDMA equipment adjusts the credit value of the data receiving credit of the receiving end RDMA equipment to be the set credit value.
In an optional embodiment, after the receiver RDMA device stores the N data packets to be sent in the storage device of the receiver, the method further comprises:
and the receiving end RDMA equipment increases the data receiving credit of the receiving end RDMA equipment according to the target credit and the set credit value.
In an optional embodiment, after the receiving RDMA device increases the data reception credit of the receiving RDMA device, the method further comprises:
the receiving end RDMA equipment judges whether a newly added credit meets a synchronization condition, wherein the newly added credit is a data receiving credit added after the receiving end RDMA equipment stores the N data packets to be sent;
and the RDMA equipment at the receiving end judges that the newly added credit meets the synchronization condition, synchronizes the newly added credit to the sending end, and adjusts the credit value of the data receiving credit of the RDMA equipment to the set credit value.
In a fourth aspect, based on the same inventive concept as that of the second aspect, an embodiment of the present specification provides a sending end, where a sending end RDMA device is disposed, and as shown in fig. 4, the sending end includes:
a credit receiving unit 401, configured to obtain a data receiving credit sent by a receiving end by the sending end RDMA device, where the data receiving credit is used to characterize a data receiving amount of the receiving end RDMA device of the receiving end;
a data packet determining unit 402, configured to determine, by the RDMA device at the sending end, N data packets to be sent according to the data reception credit, where target credits of the N data packets to be sent are smaller than the data reception credit, and N is a positive integer;
a data transmission unit 403, configured to transmit the N to-be-transmitted data packets to a receiving end by the RDMA device on the transmitting end.
In an optional implementation manner, the sending end further includes:
and the current credit determining unit is used for determining the current receiving credit of the receiving end according to the data receiving credit and the target credit after the RDMA equipment at the sending end transmits the N data packets to be sent to the receiving end.
In an optional implementation manner, the sending end further includes:
a newly added credit acquisition unit, configured to acquire a newly added credit for synchronization sent by a receiving end after the sending end RDMA device transmits the N data packets to be sent to the receiving end, where the newly added credit is a data reception credit added after the receiving end RDMA device stores the N data packets to be sent;
and the current credit updating unit is used for updating the current receiving credit of the receiving end by the RDMA equipment of the sending end according to the newly added credit.
In a fifth aspect, based on the same inventive concept as that of the third aspect, an embodiment of the present specification provides a receiving end, where a receiving end RDMA device is disposed in the receiving end, and as shown in fig. 5, the receiving end includes:
a data receiving credit determining unit 501, configured to determine a data receiving credit according to a data receiving amount of the RDMA device at the receiving end, and send the data receiving credit to the sending end;
a data receiving unit 502, configured to receive, by the receiving end RDMA device, N to-be-sent data packets sent by the sending end, where the N to-be-sent data packets are determined by the sending end according to the data receiving credit, target credits of the N to-be-sent data packets are smaller than the data receiving credit, and N is a positive integer;
a data storage unit 503, configured to store the N data packets to be sent to the storage device of the receiving end by the receiving end RDMA device.
In an optional implementation manner, the receiving end further includes:
and the credit adjusting unit is used for adjusting the credit value of the data receiving credit of the receiving end RDMA device to be the set credit value after the receiving end RDMA device sends the data receiving credit to the sending end.
In an optional implementation manner, the receiving end further includes:
and the credit increasing unit is used for increasing the data receiving credit of the receiving end RDMA device according to the target credit and the set credit value.
In an optional implementation manner, the receiving end further includes:
a synchronization condition determining unit, configured to determine, after the receiving-end RDMA device increases a data reception credit of the receiving-end RDMA device, whether a newly added credit meets a synchronization condition, where the newly added credit is the data reception credit added after the receiving-end RDMA device stores the N data packets to be sent;
and the synchronization unit is used for the RDMA equipment at the receiving end to judge that the newly added credit meets the synchronization condition, synchronize the newly added credit to the sending end and adjust the credit value of the data receiving credit of the receiving end to the set credit value.
In a sixth aspect, based on the same inventive concept as the RDMA data stream control method in the foregoing embodiment, an embodiment of the present specification further provides an electronic device, as shown in fig. 6, including a memory 604, a processor 602, and a computer program stored in the memory 604 and executable on the processor 602, where the processor 602, when executing the program, implements the steps of any one of the foregoing RDMA data stream control methods.
Where in fig. 6 a bus architecture (represented by bus 600) is shown, bus 600 may include any number of interconnected buses and bridges, and bus 600 links together various circuits including one or N processors, represented by processor 602, and memory, represented by memory 604. The bus 600 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 605 provides an interface between the bus 600 and the receiver 601 and transmitter 603. The receiver 601 and the transmitter 603 may be the same element, i.e., a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 602 is responsible for managing the bus 600 and general processing, and the memory 604 may be used for storing data used by the processor 602 in performing operations.
In a seventh aspect, based on the inventive concept of the RDMA data stream control method in the foregoing embodiments, this specification embodiment further provides a computer-readable storage medium on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any one of the RDMA data stream control methods described above.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present specification have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all changes and modifications that fall within the scope of the specification.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present specification without departing from the spirit and scope of the specification. Thus, if such modifications and variations of the present specification fall within the scope of the claims of the present specification and their equivalents, the specification is intended to include such modifications and variations.

Claims (17)

1. A RDMA data stream control method is applied to a sending end, wherein the sending end is provided with RDMA equipment of the sending end, and the RDMA data stream control method comprises the following steps:
the method comprises the steps that data receiving credit sent by a receiving end is obtained by the RDMA equipment of the sending end, wherein the data receiving credit is used for representing data receiving quantity of the RDMA equipment of the receiving end;
the RDMA equipment at the sending end determines N data packets to be sent according to the data receiving credit, wherein the target credit of the N data packets to be sent is less than the data receiving credit, and N is a positive integer;
and the RDMA equipment at the sending end transmits the N data packets to be sent to a receiving end.
2. The stream control method of claim 1, after the transmitting RDMA device transmits the N data packets to be transmitted to a receiving end, comprising:
and the RDMA equipment of the sending end determines the current receiving credit of the receiving end according to the data receiving credit and the target credit.
3. The stream control method of claim 1, after the transmitting RDMA device transmits the N data packets to be transmitted to a receiving end, comprising:
the RDMA equipment at the sending end acquires new credit for synchronization sent by the receiving end, wherein the new credit is data receiving credit added after the RDMA equipment at the receiving end stores the N data packets to be sent;
and the RDMA equipment of the sending end updates the current receiving credit of the receiving end according to the new credit.
4. A RDMA data stream control method is applied to a receiving end, wherein the receiving end is provided with a receiving end RDMA device, and the method comprises the following steps:
the RDMA equipment of the receiving end determines a data receiving credit according to the data receiving amount of the RDMA equipment and sends the data receiving credit to the sending end;
the receiving end RDMA equipment receives N data packets to be sent by the sending end, wherein the N data packets to be sent are determined by the sending end according to the data receiving credit, the target credit of the N data packets to be sent is less than the data receiving credit, and N is a positive integer;
and the RDMA equipment of the receiving end stores the N data packets to be sent into the storage equipment of the receiving end.
5. The stream control method of claim 4, after the receiving RDMA device sends the data receive credit to a sender, the method further comprising:
and the receiving end RDMA equipment adjusts the credit value of the data receiving credit of the receiving end RDMA equipment to be the set credit value.
6. The stream control method of claim 5, after the receiving RDMA device stores the N data packets to be sent in the storage device of the receiving end, the method further comprising:
and the receiving end RDMA equipment increases the data receiving credit of the receiving end RDMA equipment according to the target credit and the set credit value.
7. The streaming method of claim 6, after the receiving RDMA device increases data reception credits of the receiving RDMA device, the method further comprising:
the receiving end RDMA equipment judges whether a newly added credit meets a synchronization condition, wherein the newly added credit is a data receiving credit added after the receiving end RDMA equipment stores the N data packets to be sent;
and the RDMA equipment at the receiving end judges that the newly added credit meets the synchronization condition, synchronizes the newly added credit to the sending end, and adjusts the credit value of the data receiving credit of the RDMA equipment to the set credit value.
8. A sender having sender RDMA devices disposed therein, comprising:
a credit receiving unit, configured to obtain a data reception credit sent by a receiving end by the sending end RDMA device, where the data reception credit is used to characterize a data reception amount of the receiving end RDMA device of the receiving end;
a data packet determining unit, configured to determine, by the RDMA device at the sending end, N data packets to be sent according to the data reception credit, where target credits of the N data packets to be sent are smaller than the data reception credit;
and the data transmission unit is used for transmitting the N data packets to be transmitted to a receiving end by the RDMA equipment at the transmitting end, wherein N is a positive integer.
9. The transmitting end according to claim 8, further comprising:
and the current credit determining unit is used for determining the current receiving credit of the receiving end according to the data receiving credit and the target credit after the RDMA equipment at the sending end transmits the N data packets to be sent to the receiving end.
10. The transmitting end according to claim 8, further comprising:
a newly added credit acquisition unit, configured to acquire a newly added credit for synchronization sent by a receiving end after the sending end RDMA device transmits the N data packets to be sent to the receiving end, where the newly added credit is a data reception credit added after the receiving end RDMA device stores the N data packets to be sent;
and the current credit updating unit is used for updating the current receiving credit of the receiving end by the RDMA equipment of the sending end according to the newly added credit.
11. A receiver in which a receiver RDMA device is disposed, comprising:
the data receiving credit determining unit is used for determining the data receiving credit by the RDMA equipment of the receiving end according to the data receiving amount of the RDMA equipment of the receiving end and sending the data receiving credit to the sending end;
a data receiving unit, configured to receive, by the RDMA device at the receiving end, N to-be-sent data packets sent by the sending end, where the N to-be-sent data packets are determined by the sending end according to the data reception credit, target credits of the N to-be-sent data packets are less than the data reception credit, and N is a positive integer;
and the data storage unit is used for storing the N data packets to be sent into the storage device of the receiving end by the RDMA device of the receiving end.
12. The receiving end of claim 11, further comprising:
and the credit adjusting unit is used for adjusting the credit value of the data receiving credit of the receiving end RDMA device to be the set credit value after the receiving end RDMA device sends the data receiving credit to the sending end.
13. The receiving end of claim 12, further comprising:
and the credit increasing unit is used for increasing the data receiving credit of the receiving end RDMA device according to the target credit and the set credit value.
14. The receiving end of claim 13, further comprising:
a synchronization condition determining unit, configured to determine, after the receiving-end RDMA device increases a data reception credit of the receiving-end RDMA device, whether a newly added credit meets a synchronization condition, where the newly added credit is the data reception credit added after the receiving-end RDMA device stores the N data packets to be sent;
and the synchronization unit is used for the RDMA equipment at the receiving end to judge that the newly added credit meets the synchronization condition, synchronize the newly added credit to the sending end and adjust the credit value of the data receiving credit of the receiving end to the set credit value.
15. An RDMA data stream control system, comprising a receiving end and a transmitting end, comprising:
the receiving end is used for determining a data receiving credit by the RDMA equipment of the receiving end according to the data receiving quantity of the RDMA equipment of the receiving end and sending the data receiving credit to the sending end, wherein the data receiving credit is used for representing the data receiving quantity of the RDMA equipment of the receiving end;
the sending end is used for receiving the data receiving credit by the RDMA equipment of the sending end and determining N data packets to be sent according to the data receiving credit, wherein the target credit of the N data packets to be sent is less than the data receiving credit, and N is a positive integer; transmitting the N data packets to be transmitted to the receiving end;
the receiving end is configured to receive the N data packets to be sent by the RDMA device of the receiving end, and store the N data packets to be sent in a storage device of the receiving end.
16. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of claims 1-7 when executing the program.
17. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201910902964.8A 2019-09-24 2019-09-24 RDMA data stream control method, system, electronic device and readable storage medium Pending CN110750486A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910902964.8A CN110750486A (en) 2019-09-24 2019-09-24 RDMA data stream control method, system, electronic device and readable storage medium
PCT/CN2020/093885 WO2021057068A1 (en) 2019-09-24 2020-06-02 Rdma data flow control method and system, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910902964.8A CN110750486A (en) 2019-09-24 2019-09-24 RDMA data stream control method, system, electronic device and readable storage medium

Publications (1)

Publication Number Publication Date
CN110750486A true CN110750486A (en) 2020-02-04

Family

ID=69276908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910902964.8A Pending CN110750486A (en) 2019-09-24 2019-09-24 RDMA data stream control method, system, electronic device and readable storage medium

Country Status (2)

Country Link
CN (1) CN110750486A (en)
WO (1) WO2021057068A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021057068A1 (en) * 2019-09-24 2021-04-01 支付宝(杭州)信息技术有限公司 Rdma data flow control method and system, electronic device and readable storage medium
CN113890852A (en) * 2021-08-24 2022-01-04 北京旷视科技有限公司 Data transmission method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000041365A1 (en) * 1998-12-31 2000-07-13 Microsoft Corporation Method and system for credit-based data flow control
CN101115053A (en) * 2007-08-24 2008-01-30 中国科学院计算技术研究所 Credit flow control method
CN101115008A (en) * 2007-08-24 2008-01-30 中国科学院计算技术研究所 Credit based flow control system, apparatus and method
CN101534173A (en) * 2009-04-20 2009-09-16 福建星网锐捷网络有限公司 Method and system for controlling data flow
US20120224482A1 (en) * 2011-03-03 2012-09-06 Microsoft Corporation Credit feedback system for parallel data flow control
US20140269274A1 (en) * 2013-03-14 2014-09-18 International Business Machines Corporation Credit-based flow control in lossless ethernet networks

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005055546A1 (en) * 2003-12-03 2005-06-16 Nec Corporation Session relay device, session relay method, and session relay program
JP2012205140A (en) * 2011-03-25 2012-10-22 Nec Corp Communication device, communication method and communication program
CN103647722B (en) * 2013-11-19 2018-05-04 中国科学院计算技术研究所 A kind of Link Congestion Control Method based on prestige
CN106664290B (en) * 2015-05-26 2019-12-06 华为技术有限公司 data transmission method and device of photoelectric hybrid network
US9996498B2 (en) * 2015-09-08 2018-06-12 Mellanox Technologies, Ltd. Network memory
CN110750486A (en) * 2019-09-24 2020-02-04 支付宝(杭州)信息技术有限公司 RDMA data stream control method, system, electronic device and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000041365A1 (en) * 1998-12-31 2000-07-13 Microsoft Corporation Method and system for credit-based data flow control
CN101115053A (en) * 2007-08-24 2008-01-30 中国科学院计算技术研究所 Credit flow control method
CN101115008A (en) * 2007-08-24 2008-01-30 中国科学院计算技术研究所 Credit based flow control system, apparatus and method
CN101534173A (en) * 2009-04-20 2009-09-16 福建星网锐捷网络有限公司 Method and system for controlling data flow
US20120224482A1 (en) * 2011-03-03 2012-09-06 Microsoft Corporation Credit feedback system for parallel data flow control
US20140269274A1 (en) * 2013-03-14 2014-09-18 International Business Machines Corporation Credit-based flow control in lossless ethernet networks

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021057068A1 (en) * 2019-09-24 2021-04-01 支付宝(杭州)信息技术有限公司 Rdma data flow control method and system, electronic device and readable storage medium
CN113890852A (en) * 2021-08-24 2022-01-04 北京旷视科技有限公司 Data transmission method, device, equipment and medium

Also Published As

Publication number Publication date
WO2021057068A1 (en) 2021-04-01

Similar Documents

Publication Publication Date Title
US20220394316A1 (en) Message sending method and device, readable medium and electronic device
CN108494676B (en) Data transmission method, data transmission device, data transceiving equipment, data transceiving system and storage medium
CN110445722B (en) Congestion control method, device, equipment and storage medium
CN110875915B (en) Data transmission method and device
CN105376173B (en) Sending window flow control method and terminal
CN109245959B (en) Method, network equipment and system for counting number of active streams
US10986204B2 (en) Terminal device, edge server, data delivery system, and delivery control method
CN109756536A (en) A kind of method, apparatus and system of data transmission
CN112104562B (en) Congestion control method and device, communication network and computer storage medium
CN101917472A (en) Method, device and equipment for recombining multi-link messages
CN109587732B (en) Transmission method and device for service quality flow
WO2019105317A1 (en) Method for sending service packet, network device, and system
CN104734985A (en) Data receiving flow control method and system
CN112887217B (en) Control data packet sending method, model training method, device and system
WO2021057068A1 (en) Rdma data flow control method and system, electronic device and readable storage medium
CN102780621B (en) A kind of upstream data packet transmission method, device and the network equipment
CN107294830B (en) A kind of data transmission method and system
US8824319B2 (en) Transmitting apparatus, transmitting and receiving apparatus, communication system, and communication method
CN108900433A (en) A kind of method, terminal and server for transmitting lora message
CN103796179B (en) Message method and device
CN116868553A (en) Dynamic network receiver driven data scheduling on a data center network for managing endpoint resources and congestion relief
JP2017092692A (en) Data transmission control system and method, and data transmission control program
CN102802200A (en) Data message sending method and equipment
CN117676695A (en) TCP transmission method, device and system
US10869229B2 (en) Data transmission method and related device

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40023006

Country of ref document: HK

RJ01 Rejection of invention patent application after publication

Application publication date: 20200204

RJ01 Rejection of invention patent application after publication