CN114710426A - Method, device, system and related equipment for determining round-trip delay of read operation - Google Patents

Method, device, system and related equipment for determining round-trip delay of read operation Download PDF

Info

Publication number
CN114710426A
CN114710426A CN202210353133.1A CN202210353133A CN114710426A CN 114710426 A CN114710426 A CN 114710426A CN 202210353133 A CN202210353133 A CN 202210353133A CN 114710426 A CN114710426 A CN 114710426A
Authority
CN
China
Prior art keywords
read
round
read request
data
sending
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
CN202210353133.1A
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.)
Zhuhai Xingyun Zhilian Technology Co Ltd
Original Assignee
Zhuhai Xingyun Zhilian 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 Zhuhai Xingyun Zhilian Technology Co Ltd filed Critical Zhuhai Xingyun Zhilian Technology Co Ltd
Priority to CN202210353133.1A priority Critical patent/CN114710426A/en
Publication of CN114710426A publication Critical patent/CN114710426A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • 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/30Flow control; Congestion control in combination with information about buffer occupancy at either end or at transit nodes
    • 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/36Flow control; Congestion control by determining packet size, e.g. maximum transfer unit [MTU]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a method, a device, a system and related equipment for determining round trip delay of read operation. The method for acquiring round-trip time (RTT) of the read operation comprises the following steps: the sending end generates one or more read requests according to the size of the storage space occupied by the target data and the size of the maximum transmission unit, sends the one or more read requests to the response end, and records the sending time of each read request. And then, receiving one or more read data messages, and recording the receiving time of each read data message, wherein each read data message corresponds to a read request. And finally, determining one or more round-trip delays according to the sending time of each read request and the receiving time of the corresponding read data message. According to the method for acquiring the RTT of the reading operation, each reading request sent by the sending end has the corresponding reading data message, each reading operation is a complete closed loop, and one or more RTTs can be timely and accurately calculated.

Description

Method, device, system and related equipment for determining round trip delay of read operation
Technical Field
The present invention relates to the field of data communications, and in particular, to a method, an apparatus, a system, and a related device for determining round trip delay of a read operation.
Background
The round-trip delay can reflect the end-to-end network delay in the network, is an important performance index in the computer network, and is also an important parameter of a plurality of congestion algorithms. When a sending end and a response end transmit data based on a Remote Direct Memory Access (RDMA) protocol, the congestion control can be better performed by accurately measuring the round-trip delay, so how to quickly determine the accurate round-trip delay is a problem to be solved.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a system, and a related device for determining a round trip delay of a read operation, and the method can solve a problem that an accurate round trip delay cannot be obtained quickly at present.
In a first aspect, an embodiment of the present invention provides a system for determining a round trip delay of a read operation, where the system includes a sending end and an answering end.
The sending end is configured to generate one or more read requests according to a size of a storage space occupied by the target data and a size of a Maximum Transmission Unit (MTU), where the one or more read requests are used to obtain the target data from the responding end.
The sending end is further configured to send the generated one or more read requests to the responding end, and record the sending time of each read request.
The response end is used for finding one or more corresponding data according to the received one or more read requests, packaging the one or more data to obtain one or more read data messages, and sending the generated one or more read data messages to the sending end, wherein each read data message corresponds to one read request.
The sending end is also used for receiving one or more read data messages sent by the response end, recording the receiving time of each read data message, calculating a difference value according to the sending time of each read request and the receiving time of each read data message, and determining one or more round-trip delays.
The sending end is used for generating a read request under the condition that the storage space occupied by the target data is smaller than or equal to the size of the MTU. Or the sending end is configured to generate a plurality of read requests when the storage space occupied by the target data is larger than the size of the MTU, where the storage space occupied by the data acquired corresponding to each read request is smaller than or equal to the MTU. Each of the one or more read requests generated by the transmitting end includes a corresponding packet sequence number PSN.
Each read data message in one or more read data messages obtained by the encapsulation of the response end comprises a corresponding sequence number, and the sequence number of each read data message is the same as the PSN of the corresponding read request.
And under the condition that the sending end generates a read request, the sending end is used for determining a round-trip delay and outputting the round-trip delay according to the sending time of the read request and the receiving time of a read data message. Or, in the case that the sending end generates multiple read requests, the sending end is configured to determine a corresponding read data packet according to the PSN of each read request, determine multiple round-trip delays according to the sending time of each read request and the receiving time of the corresponding read data packet, and output the multiple round-trip delays, or output a maximum round-trip delay value of the multiple round-trip delays, a minimum round-trip delay value of the multiple round-trip delays, or a round-trip delay average value of the multiple round-trip delays. The sending end and the answering end comprise network cards supporting RDMA protocols, and data reading and writing can be achieved between the two ends through RDMA technology.
The sending end and the answering end can be servers, computing nodes in a cloud computing system, storage nodes in a distributed storage system and other electronic equipment supporting RDMA protocol network cards. Specifically, the sender may be a physical server, such as an X86 server, an ARM server, or the like; or a Virtual Machine (VM) implemented based on a general physical server and a Network Function Virtualization (NFV) technology, where the VM refers to a complete computer system that has a complete hardware system function and runs in a completely isolated environment, such as a virtual device in cloud computing, a mobile phone, a mobile computer, and the like.
The sending end and the answering end are connected through a network, the network can be the Internet, a local area network, a wide area network, a storage area network and the like, communication between the sending end and the answering end can be achieved, and reading operation based on an RDMA protocol can be achieved.
In a second aspect, an embodiment of the present invention provides a method for determining a round trip delay of a read operation, where the method may be applied to the system for determining a round trip delay of a read operation provided in the first aspect. The method comprises the following steps: the sending end generates one or more read requests according to the size of the storage space occupied by the target data and the size of the maximum transmission unit, wherein the one or more read requests are used for acquiring the target data from the response end. The sending end sends the generated one or more read requests to the response end and obtains the sending time of each read request. Then, the sending end receives one or more read data messages sent by the response end and obtains the receiving time of each read data message, wherein each read data message corresponds to a read request. And finally, the sending end determines one or more round-trip delays according to the sending time of each read request and the receiving time of the corresponding read data message.
The maximum transmission unit is the maximum size of the data unit that can be received by the response end, and is also the maximum size of data that can be received by the sending end.
In one possible implementation of the second aspect, a read request is generated in case the storage space occupied by the target data is less than or equal to the MTU. For example, the size of the MTU is 1500 bytes, and in the case that the size of the memory occupied by the target data is 1000 bytes, the sender determines that the memory occupied by the target data is smaller than the MTU, and therefore, the sender only generates one read request.
In another possible implementation manner of the second aspect, in a case that the storage space occupied by the target data is larger than the MTU, a plurality of read requests are generated, where the storage space occupied by the corresponding data that each read request needs to acquire is smaller than or equal to the size of the MTU. Under the condition that the MTU is M bytes, the storage space occupied by the target data is N bytes, and N is greater than M, the sending end generates L read requests, wherein L equals ceil (N/M).
For example, the size of the MTU is 1500 bytes, and if the size of the storage space occupied by the target data is 30000 bytes, it is determined that the size of the MTU is smaller than the size of the storage space occupied by the target data, and therefore, the specific number of generated read requests may be calculated by the formula L-ceil (30000/1500) according to the size of the storage space occupied by the MTU and the target data, and L-20 is obtained. Therefore, the sending end may generate 20 read requests, where each read request needs to obtain the corresponding data, and the size of the occupied storage space is 1500 bytes.
If the size of the storage space occupied by the target data is 31000 bytes, the specific number of the generated read requests is calculated by a formula L-ceil (31000/1500), and it is determined that the sending end can generate 21 read requests, where the size of the storage space occupied by the corresponding data that needs to be acquired by each of the first twenty read requests is 1500 bytes, and the size of the storage space occupied by the corresponding data that needs to be acquired by the last read request is 1000 bytes.
In a possible implementation manner, after the sending end generates one or more read requests, the sending end sequentially sends the generated one or more read requests to the responding end, and obtains the sending time of each read request. The sending end can obtain the sending time of each read request according to a hardware clock included by the sending end or by using a primitive of RDMA and the like.
In a possible implementation manner, after the sending end sends the read request to the answering end, the answering end may obtain corresponding data according to the received one or more read requests, and encapsulate the data to obtain one or more read data packets. And then, sequentially sending the read data messages to the sending end. The sending end receives one or more read data messages and records the receiving time of each read data message, wherein each data message corresponds to a read request. Each read request in the one or more read requests comprises a corresponding Packet Sequence Number (PSN), each read data packet in the one or more read data packets comprises a corresponding sequence number, and the sequence number of each read data packet is the same as the PSN of the corresponding read request.
For example, the sending end sends three generated read requests to the answering end, where the three read requests are a read request a, a read request B, and a read request C, respectively, where PSN of the read request a is 0, PSN of the read request B is 1, and PSN of the read request C is 2. The answering end can respectively acquire corresponding data according to the three reading requests. Firstly, the response end encapsulates the data corresponding to the read request a to obtain a first read data packet, and since the PSN of the read request a is 0, the sequence number of the first read data packet corresponding to the read request a is also 0. And then, the response end encapsulates the data corresponding to the read request B to obtain a second read data message, and since the PSN of the read request B is 1, the sequence number of the second read data message corresponding to the read request B is also 1. And finally, the response end encapsulates the data corresponding to the read request C to obtain a third read data message, and since the PSN of the read request C is 2, the sequence number of the third read data message corresponding to the read request C is also 2.
In a possible implementation manner, in the case that the sending end generates only one read request, the sending end may determine and output a round-trip delay according to the sending time of one read request and the receiving time of one read data packet. Or, when the sending end generates a plurality of read requests, determining a corresponding read data message according to the PSN of each read request, and determining and outputting a plurality of round-trip delays according to the sending time of each read request and the receiving time of the corresponding read data message, or outputting a maximum round-trip delay value of the plurality of round-trip delays, a minimum round-trip delay value of the plurality of round-trip delays, or an average round-trip delay value of the plurality of round-trip delays.
For example, a sending end generates a read request, the time for sending the read request is t, the receiving time of the corresponding read data message is t ', and a round-trip delay can be determined and output by calculating a difference value according to t and t'. Under the condition that a sending end generates and sends three read requests, namely a read request A, a read request B and a read request C, to a response end, the sending time of the read request A is recorded as taThe sending time of the read request B is tbThe sending time of the read request C is tc. The answering terminal obtains three readings after receiving the three reading requestsAnd sending the data messages to a sending end, wherein the first data reading message corresponds to a reading request A, the second data reading message corresponds to a reading request B, and the third data reading message corresponds to a reading request C. The sending end receives the three read data messages and records the receiving time of each of the three read data messages, and the receiving time of the first read data message is t1The receiving time of the second read data packet is t2The receiving time of the third read data packet is t3And calculating a difference value according to the sending time of each read request and the receiving time of the corresponding read data message, so as to obtain and output three round-trip delays. When three RTTs are calculated, the three RTTs may be collectively output. Generally, the three RTTs have different sizes, and the maximum RTT, the minimum RTT, or the average value of the RTTs may be selected as parameters for estimating the data transmission speed. In a third aspect, an embodiment of the present invention provides an apparatus for determining a round trip delay of a read operation, where the apparatus may be applied to a sending end in the system for determining a round trip delay of a read operation mentioned in the first aspect. The apparatus for determining a round trip delay of a read operation includes a generating unit, a transmitting unit, a receiving unit, and a processing unit. And the generating unit is used for generating one or more read requests according to the size of the storage space occupied by the target data and the size of the maximum transmission unit MTU, wherein the one or more read requests are used for acquiring the target data from the response end, and each generated read request comprises a corresponding PSN.
The generating unit is configured to generate one read request when the storage space occupied by the obtained target data is less than or equal to the maximum transmission unit, or the generating unit may be configured to generate a plurality of read requests when the storage space occupied by the obtained target data is greater than the maximum transmission unit, where the number of the generated read requests may be calculated by a formula L-ceil (N/M). Wherein, N is the size of the storage space occupied by the target data, M is the size of MTU, and ceil is rounding-up. And the storage space occupied by the target data corresponding to each generated read request is less than or equal to the maximum transmission unit.
For example, when the size of the MTU is 1500 bytes and the size of the storage space occupied by the target data is 31000 bytes, 21 is calculated according to the formula L-ceil (31000/1500), and the generating unit is configured to generate 21 read requests, where the storage space occupied by the target data corresponding to 20 read requests is 1500 bytes, which is equal to the MTU, and the storage space occupied by the target data corresponding to the last read request is 1000 bytes, which is smaller than the MTU.
And the sending unit is used for sequentially sending the generated one or more read requests to the response end. After receiving a read request sent by the sending unit, the response end finds corresponding data according to the read request, and encapsulates the data to obtain a read data message. Or after receiving the multiple read requests sent by the sending unit, the response end finds corresponding multiple data according to the multiple read requests, and encapsulates the data respectively to obtain multiple read data messages. And the response end sends the obtained one or more read data messages to the sending end. Each read data message in one or more read data messages obtained by the response end comprises a corresponding serial number, and each read data message corresponds to a read request. Because each read request comprises a corresponding PSN, the serial number of the corresponding read data message obtained by the response end according to each read request is set to be the same as the PSN of the read request.
And the receiving unit is used for receiving one or more read data messages sent by the response end.
And the processing unit is used for recording the sending time of each read request and the receiving time of each read data message and determining one or more round-trip delays according to the sending time of each read request and the receiving time of each read data message.
The processing unit is used for calculating a difference value according to the sending time of the read request and the receiving time of the corresponding read data message and determining one or more round-trip delays. The processing unit may be configured to record a sending time of each read request and a receiving time of each read data packet by using a hardware clock or an RDMA primitive, for example.
The processing unit is specifically configured to determine a round-trip delay and output the round-trip delay according to a sending time of a read request and a receiving time of a read data packet when the generating unit generates the read request. Or, when the generating unit generates a plurality of read requests, determining a corresponding read data packet according to the PSN of each read request, and determining and outputting a plurality of round-trip delays according to the transmission time of each read request and the receiving time of the corresponding read data packet, or outputting a maximum round-trip delay value of the plurality of round-trip delays, a minimum round-trip delay value of the plurality of round-trip delays, or an average round-trip delay value of the plurality of round-trip delays.
In a fourth aspect, an embodiment of the present invention provides a computing device, which includes a processor, a memory, a communication interface, and a bus. The processor, the memory and the communication interface may be connected to each other through an internal bus, or may realize communication through other means such as wireless transmission. The communication interface may include a network card supporting the RDMA protocol, and the read operation may be implemented via RDMA technology. The memory may store computer instructions, and the processor is configured to execute any possible implementation manner of the second aspect or the third aspect to implement the functions of the respective modules.
In a fifth aspect, the present invention provides a computer-readable storage medium, where instructions are stored, and the instructions run on the computing device, so that the computing device executes the method according to the above aspects.
The present application can further combine to provide more implementations on the basis of the implementations provided by the above aspects.
In summary, the present application provides a method for determining a round trip delay of a read operation. The method comprises the steps of firstly generating one or more read requests according to the size of a storage space occupied by target data and the size of an MTU (maximum transmission unit), ensuring that the storage space occupied by corresponding data required to be acquired by each read request is smaller than or equal to the MTU, ensuring that only one corresponding read data message exists in each read request, forming a complete closed loop by read operation, and timely and accurately calculating RTT (round trip time). In the process of calculating RTT, the sending end obtains one or more round-trip delays according to the sending time of each read request and the receiving time of the corresponding read data message, and does not need to send a confirmation message to the response end after receiving the read data message. In addition, RTT calculation of RDMA under the conditions of reading operation and writing operation is executed by the sending end, which is beneficial to uniformly realizing a congestion control algorithm, simplifying operation steps and improving the accuracy of round-trip delay calculation.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below.
Fig. 1 is a schematic structural diagram of a system for determining a round trip delay of a read operation according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for determining round trip delay of a read operation according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for determining a round trip delay of a read operation according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computing device according to an embodiment of the present invention.
Detailed Description
The present application provides a method for determining read round trip delay, which can be applied to the system for determining read round trip delay shown in fig. 1.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a system for determining a round trip delay of a read operation according to the present application. The system for determining read operation round trip delay may include: a transmitting end 100, a responding end 200 and a network 300. Wherein the transmitting end 100 and the answering end 200 can establish a communication connection through the network 300.
The transmitting end 100 includes an application 110, an Operating System (OS) 120, and a network card 130. The application 110 corresponds to a storage section, that is, a buffer, and the buffer is used for storing data of the application 110. The network card 130 includes a processor 131 and a buffer 132, and the buffer 132 is used for storing data transmitted and received by the network card 130. The answering end 200 includes an application 210, an operating system 220 and a network card 230. The application 210 corresponds to a segment of buffer area, and is used to store data of the application 210, the network card 230 includes a processor 231 and a buffer area 232, and the buffer area 232 is used to store data sent and received by the network card 230.
It should be understood that fig. 1 is only one possible division manner of the system for determining the read round-trip delay provided by the embodiment of the present application, and in practical applications, the system for determining the read round-trip delay may further include more or less components, which is not limited herein.
The sending end 100 and the replying end 200 may be servers, computing nodes in a cloud computing system, storage nodes in a distributed storage system, and other electronic devices supporting an RDMA protocol network card. For example, the sender 100 may be a physical server, such as an X86 server, an ARM server, etc.; or a Virtual Machine (VM) implemented based on a general physical server and a Network Function Virtualization (NFV) technology, where the VM refers to a complete computer system that has a complete hardware system function and runs in a completely isolated environment, such as a virtual device in cloud computing, a mobile phone, a mobile computer, and the like, and the application is not limited thereto.
The sending end 100 and the answering end 200 can be connected through a network 300, and the network 300 can be the internet, a local area network, a wide area network storage area network, and the like, which is not limited in this application. The network connection may enable communication between the sender 100 and the responder 200 and complete RDMA protocol-based read operations.
In the process that the network card 130 of the sending end 100 reads a piece of data in the answering end 200, the network card 130 may send a read request generated by the sending end 100 to the network card 230 of the answering end 200 through the network 300 by using the RDMA technology, the answering end 200 finds corresponding target data according to the read request, encapsulates the obtained target data into a read data message, and the processor 231 of the network card 230 sends the read data message to the network card 130 through the network 300. The sending end 100 records the time when the network card 130 sends the read request and the time when the network card 130 receives the read data packet in the above process, and calculates a difference value according to the sending time of the read request and the receiving time of the read data packet, so as to obtain an accurate RTT. In order to quickly obtain accurate read operation RTT, the present application also provides a method for determining read operation round trip delay, which can be applied to the system for determining read operation round trip delay shown in fig. 1, and can calculate accurate RTT in time through simplified steps.
Fig. 2 is a flowchart of a method for determining a read round trip delay provided by the present application, where the method may include the following steps.
S210: the sending end generates one or more read requests according to the size of the storage space occupied by the target data and the size of the maximum transmission unit MTU.
The target data is data which is needed to be acquired by the sending terminal and is located at the answering terminal, and one or more read requests are used for acquiring the target data from the answering terminal. In the case where a plurality of read requests are generated, corresponding data that each read request needs to acquire is a part of target data, and the sum of the data corresponding to each of the plurality of read requests is the target data. Each generated read request includes a corresponding Packet Sequence Number (PSN).
For example, the sending end generates three read requests, which are a read request a, a read request B, and a read request C, respectively, where PSN included in the read request a is 0, PSN included in the read request B is 1, and PSN included in the read request C is 2.
In one possible embodiment, the sender generates a read request when the storage space occupied by the target data is less than or equal to the MTU. For example: the size of the MTU is 1500 bytes, and under the condition that the size of the storage space occupied by the target data is 1000 bytes, the sending end determines that the storage space occupied by the target data is smaller than the MTU, so that the sending end only generates one read request. In the case of generating only one read request, the read request includes the address of the corresponding target data to be acquired at the response end and the number of bytes of the storage space occupied by the target data.
In another possible implementation manner, in a case that a storage space occupied by target data is greater than an MTU, a sending end generates a plurality of read requests, where the storage space occupied by corresponding data that each read request needs to acquire is less than or equal to the MTU. The specific number of read requests can be obtained by a formula L ═ ceil (N/M), where N is a storage space occupied by the target data, and M is a size of the MTU. In the case of generating a plurality of read requests, each read request includes a start address of corresponding data to be acquired at a response end, and the number of bytes of a storage space occupied by each data.
For example, when the size of the MTU obtained by the sender is 1500 bytes and the size of the storage space occupied by the target data is 30000 bytes, it is determined that the size of the MTU is smaller than the size of the storage space occupied by the target data, and therefore, the specific number of generated read requests may be calculated by the formula L-ceil (30000/1500) according to the sizes of the MTU and the storage space occupied by the target data, and L-20 is obtained. Therefore, the sender may generate 20 read requests, where each read request needs to obtain data occupying 1500 bytes of storage space. At this time, it is only necessary to obtain the start address of the corresponding data at the response end, which needs to be obtained by each read request. In the case where the virtual address of the target data in the responder is 0 to 29999, it may be determined that the first read request includes a start address of 0, and the second read request includes a start address of 1500 since the number of bytes of the storage space occupied by the corresponding data is 1500. Since the number of bytes of the storage space occupied by the data corresponding to the second read request is not changed and is still 1500 bytes, the starting addresses included in the third read request to the twentieth read request can be obtained by analogy, which is not repeated herein.
For example, when the size of the MTU acquired by the sender is 1500 bytes, and the size of the storage space occupied by the target data is 31000 bytes, the specific number of the generated read requests is calculated by using a formula L-ceil (31000/1500), and it is determined that the sender can generate 21 read requests, where the size of the storage space occupied by the corresponding data that needs to be acquired by each of the first twenty read requests is 1500 bytes, and the size of the storage space occupied by the corresponding data that needs to be acquired by the last read request is 1000 bytes. Similarly, at this time, only the start address of the corresponding data to be acquired included in each read request at the response end needs to be acquired. Under the condition that the virtual address of the target data in the response end is 0-30999, it can be determined that the start address included in the first read request is 0, and according to the number of bytes of the storage space occupied by the data corresponding to each read request, it can be determined that the difference between the start address of each read request and the start address of the previous read request is 1500, the start address included in the twenty-first read request is 30000, and the size of the storage space occupied by the corresponding data to be acquired is 1000 bytes.
The read request may further include contents such as a memory key, besides the start address of the data and the size of the storage space occupied by the data, where the memory key is a right for the sending end to access the responding end to obtain the data.
S220: the sending terminal sends one or more read requests to the response terminal and records the sending time of each read request.
The sending end sends the generated one or more read requests to the answering end, and records the sending time of each read request. The sender may obtain the sending time of each read request by using a hardware clock included in the sender or by using RDMA primitives, etc.
S230: the sending end receives one or more read data messages sent by the response end and records the receiving time of each read data message. Wherein each read data packet corresponds to a read request.
Under the condition that the sending end generates a read request, the response end acquires corresponding data according to the received read request, encapsulates the data, obtains a read data message and sends the read data message to the sending end. Or, under the condition that the sending end generates a plurality of read requests, the response end reads a plurality of corresponding data according to the received plurality of read requests, respectively encapsulates the data to obtain a plurality of read data messages, and sequentially sends the plurality of read data messages to the sending end. The sending end can receive one or more read data messages sent by the answering end and record the receiving time of each read data message.
Each read data message in the one or more read data messages obtained by the response end comprises a corresponding sequence number, and the sequence number of each read data message is the same as the PSN of the corresponding read request. For example, a sending end generates three read requests, namely a read request a, a read request B and a read request C, wherein the PSN included in the read request a is 0, the PSN included in the read request B is 1, and the PSN included in the read request C is 2. The response end reads corresponding data according to the read request A, and encapsulates the data to obtain a first read data message, wherein the PSN of the read request A is 0, the serial number of the first read data message is set to be 0, and the first read data message corresponds to the read request A. Similarly, the response end reads corresponding data according to the read request B, encapsulates the data to obtain a second read data message, and sets the sequence number of the second read data message corresponding to the read request B to be 1 because the PSN of the read request B is 1. And the response end reads corresponding data according to the read request C, encapsulates the data to obtain a third read data message, and sets the sequence number of the third read data message corresponding to the read request C to be 2 as the PSN of the read request C is 2.
The sending end receives one or more read data messages and records the receiving time of each read data message, and the sending end can obtain the receiving time of each read data message by using a hardware clock of the sending end or by using a primitive of RDMA (remote direct memory access) and the like, which is not particularly limited in the present application.
S240: and the sending end determines one or more round-trip delays according to the sending time of each read request and the receiving time of each read data message.
Under the condition that the PSN of a read request is the same as the serial number of a read data message, the read request corresponds to the read data message, so that a round-trip delay can be calculated according to the sending time of the read request and the receiving time of the read data message. Under the condition that a plurality of RTTs need to be calculated, the calculation process is the same, and details are not repeated in this embodiment.
In a specific embodiment, the size of the maximum transmission unit obtained by the sender is 1200 bytes, and the size of the storage space corresponding to the target data is 3400 bytes, where the storage space occupied by the target data is larger, and therefore, the size of the MTU and the size of the target are comparedSubstituting the size of the storage space occupied by the data into a formula: in L ═ ceil (N/M), L ═ 3 was calculated. The three read requests generated by the sending end are respectively a read request A, a read request B and a read request C, wherein the storage space occupied by the corresponding data required to be acquired by the read request A and the read request B is 1200 bytes, the storage space occupied by the corresponding data required to be acquired by the read request C is 1000 bytes, the PSN of the read request A is 0, the PSN of the read request B is 1, and the PSN of the read request C is 2. Since the address of the target data at the responder is 2000 to 5399, it can be determined that the start address included in the read request a is 2000, the start address included in the read request B is 3200, and the start address included in the read request C is 4400 according to the storage space occupied by the data of each of the three read requests. The sending end sends the three reading requests to the answering end in sequence and records the sending time t of the reading request AaTime t of sending of read request BbAnd the transmission time t of the read request Cc. The response end finds corresponding data according to the read request a, encapsulates the data to obtain a read data packet a1, and since the PSN of the read request a is 0, the sequence number included in the read data packet a1 is the same as the PSN of the read request a and is 0. In the same way, the response end can obtain the read data packet B1 corresponding to the read request B and the read data packet C1 corresponding to the read request C. The sequence number of the read data packet B1 is the same as the PSN of the read request B, and is 1, and the sequence number of the read data packet C1 is the same as the PSN of the read request C, and is 2. And the response end sequentially sends the obtained three read data messages to the sending end, and the sending end receives the three read data messages and records the receiving time of each read data message. When the read data packet C1 arrives at the sending end earlier than the read data packet B1, the sending end determines that the read data packet corresponds to the read request C according to the sequence number 2 included in the read data packet C1, and the sending end performs difference calculation according to the sending time of the read request C and the receiving time of the read data packet C1 to obtain an RTT. Then, the sending end calculates two RTTs according to the sending time of the read request a and the receiving time of the read data message a1, and according to the sending time of the read request B and the receiving time of the read data message B1.
The method for determining the round trip delay of the read operation can be further applied to projects such as a smart city, a distributed storage system and a cloud computing system which are formed by a plurality of devices exist in the smart city, a plurality of services in the smart city have high requirements on real-time characteristics, and the transmission time of data in a network is required to be reduced, so that accurate RTT needs to be calculated in time, the transmission speed of the data can be better monitored, and congestion control is carried out.
In summary, according to the method for determining the round-trip delay of the read operation provided by the present application, one or more read requests are generated according to the size of the storage space occupied by the target data and the size of the maximum transmission unit MTU, the generated one or more read requests are sent, and the sending time of each read request is recorded. And then, receiving one or more read data messages, and recording the receiving time of each read data message, wherein each read data message corresponds to a read request. And finally, obtaining one or more round-trip delays according to the sending time of each read request and the receiving time of the corresponding read data message. The method for determining the round trip delay of the read operation enables each read request sent by the sending end to have only one corresponding read data message to form a complete closed loop, and one or more RTTs can be timely and accurately calculated.
Fig. 3 is a schematic structural diagram of an apparatus for determining a round trip delay of a read operation according to the present application, which may also be applied to the system shown in fig. 1. The means 30 for determining the round trip delay of a read operation comprises: a generating unit 310, a transmitting unit 320, a receiving unit 330 and a processing unit 340.
The generating unit 310 is configured to generate one or more read requests according to the size of the storage space occupied by the target data and the size of the maximum transmission unit MTU. The target data is data which is needed to be acquired by the sending terminal and is located at the answering terminal, and one or more read requests are used for acquiring the target data from the answering terminal. In the case of generating a plurality of read requests, the corresponding data that each read request needs to acquire is only a part of the target data, and the sum of the corresponding data is the target data. Each read request generated includes a corresponding PSN.
The generating unit 310 is configured to generate a read request when the storage space occupied by the acquired target data is less than or equal to the maximum transmission unit. Or, the generating unit 310 may be configured to generate a plurality of read requests when the storage space occupied by the obtained target data is greater than the maximum transmission unit, and the number of the generated read requests may be calculated by a formula L ═ ceil (N/M), where N is the size of the storage space occupied by the target data, M is the size of the MTU, and ceil is rounding up. And the storage space occupied by the target data corresponding to each generated read request is less than or equal to the maximum transmission unit.
A sending unit 320, configured to send the generated one or more read requests to the response end in sequence.
After receiving a read request sent by the sending unit 320, the response end finds corresponding data according to the read request, and encapsulates the data to obtain a read data packet. Or after receiving the multiple read requests sent by the sending unit 320, the response end finds corresponding multiple data according to the multiple read requests, and encapsulates the data to obtain multiple read data messages. And the response end sends the obtained one or more read data messages to the sending end.
Each read data message in the one or more read data messages obtained by the response end comprises a corresponding serial number, and each read data message corresponds to a read request. Because each read request comprises a corresponding PSN, the serial number of the corresponding read data message obtained by the response end according to each read request is set to be the same as the PSN of the read request. The receiving unit 330 is configured to receive one or more read data packets sent by the response end.
The processing unit 340 is configured to record the sending time of each read request and the receiving time of each read data packet, and determine one or more round-trip delays according to the sending time of each read request and the receiving time of each read data packet.
The processing unit is used for calculating a difference value according to the sending time of the read request and the receiving time of the corresponding read data message and determining one or more round-trip delays. The processing unit may be configured to record a sending time of each read request and a receiving time of each read data packet by using a hardware clock or an RDMA primitive, for example.
The processing unit is specifically configured to determine a round-trip delay and output the round-trip delay according to a sending time of a read request and a receiving time of a read data packet when the generating unit generates the read request. Or, in the case that the generating unit generates a plurality of read requests, determining a corresponding read data packet according to the PSN of each read request, and determining and outputting a plurality of round-trip delays according to the transmission time of each read request and the receiving time of the corresponding read data packet, or outputting a maximum round-trip delay value of the plurality of round-trip delays, a minimum round-trip delay value of the plurality of round-trip delays, or an average round-trip delay value of the plurality of round-trip delays.
Fig. 4 is a schematic structural diagram of a computing device provided in the present application, which may perform all the steps in the embodiments of fig. 1 to 3. As shown in fig. 4, computing device 400 includes: a processor 410, a memory 420, a communication interface 430, and a bus 440. The processor 410, the memory 420 and the communication interface 430 may be connected to each other through a bus 440, or may communicate through other means such as wireless transmission. The communication interface 430 includes a network card supporting RDMA protocol, may be a wired interface (e.g., ethernet interface), and the like, and is used for communicating with other devices or modules, and may implement read operation by RDMA technology.
The processor 410 may be formed of at least one general-purpose processor, such as a Central Processing Unit (CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof. Processor 410 is operative to execute various types of digital storage instructions.
The memory 420 is used for storing program codes and is controlled to be executed by the processor 410 to execute all the steps included in any embodiment of the method, the device and the like. The program code may include one or more software modules, where the software modules may be a generating unit, a sending unit, a receiving unit, and a processing unit in the embodiment of fig. 3, and the specific implementation manner may refer to the method embodiment of fig. 3, and the accurate RTT is obtained through fast calculation, which is not described herein again.
Memory 420 may include both read-only memory and random-access memory, and provides instructions and data to processor 410. Memory 420 may also include non-volatile random access memory. For example, memory 420 may also store device type information.
The memory 420 may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct bus RAM (DR RAM). The hard disk may be a Hard Disk Drive (HDD), a Solid State Disk (SSD), a mechanical hard disk (HDD), or the like, and the application is not limited in particular.
The bus 440 may be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a unified bus (UBs or UBs), a computer Express link (CXL), a cache coherent Interconnect protocol (CCIX) bus, or the like. The bus 440 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is used to indicate a bus in FIG. 4, but this does not indicate that there is only one bus or only one type of bus.
It should be noted that fig. 4 is only one possible implementation manner of the embodiment of the present application, and in practical applications, the computing device 400 may further include more or less components, and is not limited in particular.
There is also provided a computer readable storage medium having instructions stored thereon, which when executed on a processor, implement the method flow illustrated in fig. 2.
Embodiments of the present application also provide a computer program product, and when the computer program product runs on a processor, the method flow shown in fig. 2 is implemented.
The procedures or functions according to the embodiments of the invention are wholly or partly generated when the computer program instructions are loaded or executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device.
The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage node, such as a server, a data center, or the like, that contains at least one collection of available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a Digital Video Disk (DVD), or a semiconductor medium).
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for determining a read round trip delay, comprising:
the sending end generates one or more read requests according to the size of a storage space occupied by the target data and the size of the maximum transmission unit MTU, wherein the one or more read requests are used for acquiring the target data from the response end;
the sending end sends the one or more reading requests to the answering end, and records the sending time of each reading request;
the sending end receives one or more read data messages sent by the response end and records the receiving time of each read data message, wherein each read data message corresponds to a read request;
and the sending end determines one or more round-trip delays according to the sending time of each read request and the receiving time of each read data message.
2. The method of claim 1, wherein generating one or more read requests according to the size of the storage space occupied by the target data and the size of the MTU (maximum transmission unit) comprises:
generating a read request under the condition that the storage space occupied by the target data is smaller than or equal to the size of the MTU; or,
and under the condition that the storage space occupied by the target data is larger than the MTU, generating a plurality of read requests, wherein the storage space occupied by the data acquired by each read request is smaller than or equal to the MTU.
3. The method according to claim 1 or 2, wherein the one or more read data packets are obtained by the response terminal acquiring corresponding data according to each read request and encapsulating the acquired data;
each of the one or more read requests includes a corresponding packet sequence number, PSN;
each read data packet in the one or more read data packets includes a corresponding sequence number, and the sequence number of each read data packet is the same as the PSN of the corresponding read request.
4. The method of claim 3, wherein determining one or more round trip delays based on the transmission time of each read request and the reception time of each read data packet comprises:
under the condition that the sending end generates a read request, determining a round-trip delay and outputting the round-trip delay according to the sending time of the read request and the receiving time of a read data message; or,
and under the condition that the sending end generates a plurality of read requests, determining a corresponding read data message according to the PSN of each read request, determining a plurality of round-trip delays according to the sending time of each read request and the receiving time of the corresponding read data message, and outputting the round-trip delays, or outputting the maximum round-trip delay value of the round-trip delays, the minimum round-trip delay value of the round-trip delays or the average round-trip delay value of the round-trip delays.
5. An apparatus for determining round trip delay of a read operation, the apparatus being at a transmitting end, the apparatus comprising:
the generating unit is used for generating one or more read requests according to the size of a storage space occupied by target data and the size of a Maximum Transmission Unit (MTU), wherein the one or more read requests are used for acquiring the target data from a response end;
a sending unit, configured to send the one or more read requests to the response side;
a receiving unit, configured to receive one or more read data packets sent by the response end, where each read data packet corresponds to a read request;
and the processing unit is used for recording the sending time of each read request and the receiving time of each read data message and determining one or more round-trip delays according to the sending time of each read request and the receiving time of each read data message.
6. The apparatus according to claim 5, wherein the generating unit is specifically configured to:
generating a read request under the condition that the storage space occupied by the target data is smaller than or equal to the size of the MTU; or,
and generating a plurality of read requests under the condition that the storage space occupied by the target data is larger than the MTU, wherein the storage space occupied by the data acquired by each read request is smaller than or equal to the MTU.
7. The apparatus according to claim 6, wherein the one or more read data packets are obtained by the response end obtaining corresponding data according to each read request according to the received one or more read requests, and encapsulating the obtained data;
each of the one or more read requests comprises a corresponding data packet sequence number, PSN;
each read data packet in the one or more read data packets includes a corresponding sequence number, and the sequence number of each read data packet is the same as the PSN of the corresponding read request.
8. The apparatus according to claim 7, wherein the processing unit is specifically configured to:
under the condition that the generating unit generates a read request, determining a round-trip delay and outputting the round-trip delay according to the sending time of the read request and the receiving time of a read data message; or,
and under the condition that the generating unit generates a plurality of read requests, determining a corresponding read data message according to the PSN of each read request, determining a plurality of round-trip delays according to the sending time of each read request and the receiving time of the corresponding read data message, and outputting the round-trip delays, or outputting the maximum round-trip delay value of the round-trip delays, the minimum round-trip delay value of the round-trip delays or the average round-trip delay value of the round-trip delays.
9. A computing device comprising a processor and a memory, the memory storing a computer program, the processor executing the computer program to cause the computing device to perform the method of any of claims 1 to 4.
10. A computer-readable storage medium, in which a program is stored which, when run on a computing device, causes the computing device to carry out the method according to any one of claims 1 to 4.
CN202210353133.1A 2022-04-02 2022-04-02 Method, device, system and related equipment for determining round-trip delay of read operation Pending CN114710426A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210353133.1A CN114710426A (en) 2022-04-02 2022-04-02 Method, device, system and related equipment for determining round-trip delay of read operation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210353133.1A CN114710426A (en) 2022-04-02 2022-04-02 Method, device, system and related equipment for determining round-trip delay of read operation

Publications (1)

Publication Number Publication Date
CN114710426A true CN114710426A (en) 2022-07-05

Family

ID=82171850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210353133.1A Pending CN114710426A (en) 2022-04-02 2022-04-02 Method, device, system and related equipment for determining round-trip delay of read operation

Country Status (1)

Country Link
CN (1) CN114710426A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022420A (en) * 2022-07-06 2022-09-06 拓尔思天行网安信息技术有限责任公司 Unidirectional data transmission system, method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190044861A1 (en) * 2018-09-26 2019-02-07 Intel Corporation Technologies for congestion control for ip-routable rdma over converged ethernet
CN112653634A (en) * 2020-12-10 2021-04-13 苏州浪潮智能科技有限公司 Flow control method, device, equipment and readable storage medium
CN112787877A (en) * 2019-11-07 2021-05-11 华为技术有限公司 Network delay detection method and related equipment
CN113076280A (en) * 2019-12-18 2021-07-06 华为技术有限公司 Data transmission method and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190044861A1 (en) * 2018-09-26 2019-02-07 Intel Corporation Technologies for congestion control for ip-routable rdma over converged ethernet
CN112787877A (en) * 2019-11-07 2021-05-11 华为技术有限公司 Network delay detection method and related equipment
CN113076280A (en) * 2019-12-18 2021-07-06 华为技术有限公司 Data transmission method and related equipment
CN112653634A (en) * 2020-12-10 2021-04-13 苏州浪潮智能科技有限公司 Flow control method, device, equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022420A (en) * 2022-07-06 2022-09-06 拓尔思天行网安信息技术有限责任公司 Unidirectional data transmission system, method and device

Similar Documents

Publication Publication Date Title
CN106850402B (en) Message transmission method and device
CN108028833B (en) NAS data access method, system and related equipment
CN109936514B (en) Message processing method and device
CN111107017A (en) Method, equipment and storage medium for processing switch message congestion
CN113746782B (en) Message processing method, device and related equipment
CN114201421B (en) Data stream processing method, storage control node and readable storage medium
US10817460B2 (en) RDMA data sending and receiving methods, electronic device, and readable storage medium
CN111641566B (en) Data processing method, network card and server
CN111026324B (en) Updating method and device of forwarding table entry
US20210096939A1 (en) Fault Tolerance Processing Method, Apparatus, and Server
CN113472900A (en) Message processing method, device, storage medium and computer program product
CN110519388B (en) Processing method and device for block chain request, electronic equipment and readable storage medium
CN114710426A (en) Method, device, system and related equipment for determining round-trip delay of read operation
CN116049085A (en) Data processing system and method
CN113986969A (en) Data processing method and device, electronic equipment and storage medium
CN116226027B (en) Data transmission system, method, device, communication equipment and storage medium
WO2021036189A1 (en) Rdma data sending and receiving methods, electronic device and readable storage medium
CN116340246B (en) Data pre-reading method and medium for direct memory access read operation
CN115550442A (en) Data packet transmission method and device, electronic equipment and storage medium
CN113422792B (en) Data transmission method, device, electronic equipment and computer storage medium
US9882751B2 (en) Communication system, communication controller, communication control method, and medium
CN110602211A (en) Out-of-order RDMA method and device with asynchronous notification
CN112132583A (en) Transaction processing method and device of block chain, electronic equipment and readable storage medium
CN114422970B (en) Short message tracing method, device and equipment
US9379993B1 (en) Network control protocol

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