Method and device for reducing RDMA network overhead based on connection management
By flexibly establishing the association relationship between the idle queue pair and the shared receive queue based on the number of messages to be transmitted in RDMA technology, the memory waste problem caused by QP connection is solved, and more efficient and secure data transmission is achieved.
Patent Information
- Application Number
- CN202211464206.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-22
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-11-22
AI Technical Summary
In RDMA technology, the one-to-one QP connection in the prior art causes the work queue elements of the receiving queue to be not used, resulting in memory waste. How to flexibly establish the association relationship between the QP connection between the data sending end and the receiving end and the shared receiving queue to reduce network overhead.
According to the number of packets to be transmitted to the receiving end, the relationship between the idle queue pair and the shared receiving queue is flexibly established, and the queue pair connection is adjusted by generating a new link building request to ensure the security and reliability of data transmission.
It reduces the memory burden on the receiver side, improves the efficiency and security of data transmission, and ensures the normal progress of communication.
Smart Images

Figure CN115865830B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet, and in particular to a method and device for reducing RDMA network overhead based on connection management. Background Art
[0002] Remote Direct Memory Access (RDMA) technology was developed to address server-side data processing delays during network transmission. RDMA transfers data directly to a computer's storage area over the network, rapidly moving data from one system to a remote system's memory without disrupting the operating system and requiring virtually no processing power from the computer. By eliminating the overhead of external memory copies and context switches, RDMA frees up memory bandwidth and CPU cycles, improving application performance.
[0003] In RDMA technology, technicians often use a reliable connection (RC) transmission method to ensure data transmission security. RC transmission requires the data sender and receiver to establish a one-to-one queue pair (QP) connection before data transmission, and ensures reliable transmission through a protocol handshake and ACK / NAK mechanism. However, this one-to-one QP connection can cause a large number of work queue elements (WQEs) or work queue entries (WQEs) in the receive queue (RQ) to remain unused during the data transmission process, which is a significant waste of memory.
[0004] Therefore, how to flexibly establish the association relationship between the QP connection between the data sending end and the data receiving end and the SRQ (Share Receive Queue) in the QP to reduce the RDMA network overhead is an urgent problem that those skilled in the art need to solve. Summary of the Invention
[0005] An embodiment of the present application provides a method for reducing RDMA network overhead based on connection management, which can flexibly establish an association relationship between idle queue pairs and shared receive queues based on the number of pending messages that the sender (or sending node) needs to send to the receiver (or receiving node, current node), thereby helping to reduce the memory burden of the receiver (or receiving node, current node).
[0006] In a first aspect, an embodiment of the present application provides a method for reducing RDMA network overhead based on connection management, which may include the following steps:
[0007] receiving a first link establishment request sent by a first node, where the first link establishment request may include a first number of packets to be transmitted;
[0008] determining whether a second number of idle queue pairs is greater than or equal to the first number, the idle queue pairs may include a receive queue and a transmit queue;
[0009] If the judgment is yes, a first association relationship between the idle queue pair and the shared receive queue is established, the third number of the shared receive queue is less than the second number, and the shared receive queue is in an idle state;
[0010] Sending the first number of receiving task orders to the shared receiving queue according to the first association relationship and the first number;
[0011] A second link establishment request is generated and sent to the first node. The second link establishment request may include information about the idle queue pair.
[0012] It can be seen that the embodiment method of the present application can flexibly establish an association relationship between an idle queue pair and a shared receiving queue based on the number of messages to be transmitted that the sending end (or sending node, the above-mentioned first node) needs to send to the receiving end (or receiving node, the current node), which is beneficial to reducing the memory load or pressure of the receiving end (or receiving node, the current node). In addition, the embodiment method of the present application can also generate a new link establishment request based on the information of the association relationship, and then send the new link establishment request to the sending end (or sending node, the above-mentioned first node), which helps to establish a connection between the queue pair with the sending end (or sending node, the above-mentioned first node) and ensure the security and reliability of subsequent data transmission.
[0013] In one possible implementation, the first link establishment request may further include memory area information for storing messages to be transmitted. After generating the second link establishment request and sending the second link establishment request to the first node, the method of the embodiment of the present application may further include the following steps:
[0014] receiving a first confirmation message sent by the first node and entering a working state;
[0015] receiving a message to be transmitted sent by the first node;
[0016] According to the preset protocol, determine whether the message to be transmitted is correct;
[0017] If the judgment is yes, sending a second confirmation message to the first node;
[0018] If the judgment is no, first feedback information is sent to the first node. The first feedback information may be used to indicate that an abnormal condition exists in the message to be transmitted, and the abnormal condition may include packet loss.
[0019] It can be seen that the method of the embodiment of the present application will adjust the working state of the receiving end (or receiving node, current node) according to the feedback information of the first node (i.e., the above-mentioned first determination message), which helps to ensure that the communication (or data exchange) between the sending end (or sending node, the above-mentioned first node) and the receiving end (or receiving node, current node) is carried out normally. The method of the embodiment of the present application can also check whether the message to be transmitted is correctly propagated according to the preset protocol, and generate corresponding information (such as the above-mentioned second determination message and the first feedback information) based on the judgment result, which helps to ensure the security and reliability of communication (or data exchange).
[0020] In another possible implementation, the method of the embodiment of the present application may further include the following steps:
[0021] According to the first association relationship, extract the corresponding receiving task book from the shared receiving queue;
[0022] According to the received task book, the message to be transmitted is stored in the corresponding memory area.
[0023] It can be seen that the method of the embodiment of the present application can reasonably prevent or store the corresponding message (or data) to be transmitted according to the received task book, which helps to ensure that the work process is carried out correctly and improve the user experience.
[0024] In another possible implementation, if the judgment is yes, after establishing the first association relationship between the idle queue pair and the shared receive queue, the method of the embodiment of the present application may further include the following steps:
[0025] A second association relationship between the idle queue and the completion queue is established.
[0026] In another possible implementation, after storing the message to be transmitted in the corresponding memory area according to the received task book, the following steps may be further included:
[0027] Generate mission reports;
[0028] Sends a task report to the completion queue.
[0029] It can be seen that the method of the embodiment of the present application can record the work progress of the receiving end (or receiving node, current node) through elements such as task reports and completion queues to ensure the orderly progress of data processing work.
[0030] In another possible implementation, the method of the embodiment of the present application may further include the following steps:
[0031] When all the messages to be transmitted are received, the node enters a dormant state, which may mean that the node no longer receives messages sent by the first node.
[0032] canceling the connection relationship with the first node;
[0033] cancelling the first association between the idle queue pair and the shared receive queue;
[0034] The second association between the idle queue pair and the completion queue is canceled.
[0035] It can be seen that after completing the communication (or data transmission) task with the sending end (or sending node, the above-mentioned first node), the embodiment method of the present application will disconnect the connection relationship with the sending end (or sending node, the above-mentioned first node), and cancel the association relationship between the idle queue and the shared receiving queue and the completion queue, which helps to release and refresh the memory space of the receiving end (or receiving node, current node), and is beneficial for the receiving end (or receiving node, current node) to establish a communication (or data transmission) connection with the new sending end (or sending node, the above-mentioned first node) and the allocation of related memory space.
[0036] In another possible implementation, after determining whether the second number of idle queue pairs is greater than or equal to the first number, the method of the embodiment of the present application may further include the following steps:
[0037] If the judgment is no, generating second feedback information according to the second number of idle queue pairs, where the second feedback information can be used to inform the first node of the currently available idle queue pairs;
[0038] The second feedback information is sent to the first node.
[0039] It can be seen that the method of the embodiment of the present application can help the sending end (or sending node, the above-mentioned first node) adjust the message transmission plan when the idle queue pairs at the receiving end (or receiving node, current node) are insufficient (that is, the number of idle queue pairs is less than the number of messages to be transmitted), or generate second feedback information, thereby improving the efficiency of communication (or data transmission).
[0040] In a second aspect, an embodiment of the present application provides a device for reducing RDMA network overhead based on connection management, which may include the following parts: a communication module, a computing module, and a control module;
[0041] A communication module, configured to receive a first link establishment request sent by a first node, where the first link establishment request may include a first number of messages to be transmitted;
[0042] a calculation module, configured to determine whether a second number of idle queue pairs is greater than or equal to the first number, the idle queue pairs may include a receiving queue and a sending queue;
[0043] The control module may be configured to establish a first association relationship between the idle queue pair and the shared receive queue when the second number of the idle queue pairs is greater than or equal to the first number, the third number of the shared receive queues being less than the second number, and the shared receive queue being in an idle state;
[0044] The control module may also be configured to send a first number of receiving task orders to the shared receiving queue according to the first association relationship and the first number;
[0045] The control module may also be configured to generate a second link establishment request, where the second link establishment request may include information about the idle queue pair;
[0046] The communication module can also be used to send a second link establishment request to the first node.
[0047] In a third aspect, an embodiment of the present application provides a device for reducing RDMA network overhead based on connection management, which may include the following parts: a processor, a memory, and a bus;
[0048] The processor and the memory are connected via a bus, wherein the memory is used to store a set of program codes, and the processor is used to call the program codes stored in the memory to execute the method as described in the first aspect.
[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising:
[0050] The computer-readable storage medium stores instructions, which, when executed on a computer, implement the method described in the first aspect.
[0051] By implementing the method of the embodiment of the present application, it is possible to flexibly establish an association relationship between an idle queue pair and a shared receiving queue based on the number of messages to be transmitted that the sending end (or sending node, the above-mentioned first node) needs to send to the receiving end (or receiving node, the current node), which is beneficial to reducing the memory load or pressure of the receiving end (or receiving node, the current node). In addition, the method of the embodiment of the present application can also generate a new link establishment request based on the information of the association relationship, and then send the new link establishment request to the sending end (or sending node, the above-mentioned first node), which helps to establish a connection between the queue pair with the sending end (or sending node, the above-mentioned first node) and ensure the security and reliability of subsequent data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0053] Figure 1 1 is a flow chart of a method for reducing RDMA network overhead based on connection management provided by an embodiment of the present application;
[0054] Figure 2 This is a schematic diagram of a scenario for establishing a first association relationship between an idle queue pair and a shared receive queue, provided by an embodiment of the present application;
[0055] Figure 3 This is a schematic diagram of a data transmission process provided by an embodiment of the present application;
[0056] Figure 4 1 is a schematic diagram of a device for reducing RDMA network overhead based on connection management provided in an embodiment of the present application;
[0057] Figure 5 This is a schematic diagram of the composition of another device for reducing RDMA network overhead based on connection management provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0059] The terms "first," "second," "third," and "fourth," etc., in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, rather than to describe a specific order. In addition, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0060] References herein to "embodiments" mean that a particular feature, result, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0061] In order to better understand the technical solution of the embodiment of the present application, Figure 1The steps in the embodiment of the present application provide a method for reducing RDMA network overhead based on connection management in detail.
[0062] See Figure 1 , is a flow chart of a method for reducing RDMA network overhead based on connection management provided by an embodiment of the present application. It can be understood that the execution subject of the following method is a device for reducing RDMA network overhead based on connection management; Figure 1 As shown, the method may include the following steps:
[0063] S101: Receive a first link establishment request sent by a first node.
[0064] It should be noted that the first link establishment request may include the first number of messages to be transmitted. Furthermore, the first link establishment request may also include memory area information for storing the messages to be transmitted.
[0065] Specifically, the executor of the method of the embodiment of the present application is the receiving end (or receiving node, current node) in the communication (or data transmission) process. The receiving end may include a software part and a hardware part. The software part and the hardware part will be responsible for different work processes or steps. The detailed work processes or steps can be referred to the examples below.
[0066] It can be seen that in the embodiment method of the present application, the receiving end (or receiving node, current node) will first receive the link establishment request sent by the sending end (or sending node, the above-mentioned first node), instead of directly receiving the message to be transmitted sent by the sending end (or sending node, the above-mentioned first node). This helps the receiving end (or receiving node, current node) to reasonably generate a communication (or data transmission) plan based on the number of messages to be transmitted, while reducing the memory consumption of the receiving end (or receiving node, current node) and ensuring efficient communication (or data transmission).
[0067] S102: Determine whether the second number of idle queue pairs is greater than or equal to the first number.
[0068] It should be noted that the idle queue pair may include a receiving queue and a sending queue.
[0069] It should be noted that the method in the embodiment of the present application defaults to the sending end (or sending node, the above-mentioned first node) sending the message to be transmitted in the following manner: one queue pair sends one message to be transmitted. Since the communication (or data transmission) process based on RDMA technology needs to establish a connection relationship between the queue pair of the sending end (or sending node, the above-mentioned first node) and the queue pair of the receiving end (or receiving node, current node), the method in the embodiment of the present application compares the number of idle queue pairs of the receiving end (or receiving node, current node) and the number of messages to be transmitted, which is equivalent to comparing the number of idle queue pairs of the receiving end (or receiving node, current node) and the number of queue pairs used by the sending end (or sending node, the above-mentioned first node) to send messages to be transmitted, which helps the receiving end (or receiving node, current node) to calculate or generate a reasonable queue pair connection plan.
[0070] Furthermore, the sending end (or the sending node, the above-mentioned first node) may have a queue pair that sends multiple messages to be transmitted. In this case, the first link establishment request sent by the sending end (or the sending node, the above-mentioned first node) may include the number of queue pairs used by the sending end (or the sending node, the above-mentioned first node) to send messages to be transmitted.
[0071] S103: If the answer is yes, a first association relationship between the idle queue pair and the shared receiving queue is established.
[0072] It should be noted that the third number of the shared receive queue is smaller than the second number, and the shared receive queue is in an idle state.
[0073] Specifically, the receiving end (or receiving node, current node) can establish at least one first association relationship of "shared receive queue-idle queue pair" in a ratio of 1:N (N>1), where 1 represents the number of shared receive queues and N represents the number of idle queue pairs. It should be noted that the value of N is set by technical personnel based on actual conditions and is not limited here.
[0074] For example, see Figure 2 , is a schematic diagram of a scenario for establishing a first association relationship between an idle queue pair and a shared receiving queue provided by an embodiment of the present application. Figure 2 As shown, suppose the number of messages to be transmitted at the sending end (or the sending node, the first node) is 300, and the number of idle queues at the receiving end (or the receiving node, the current node) is 100. Figure 2The number of QPs (QPs including send queues SQ and receive queues RQ) is 350. If N=60, the receiving end (or receiving node, current node) can create shared receive queue 1 (i.e., SRQ1), shared receive queue 2 (i.e., SRQ2), shared receive queue 3 (i.e., SRQ3), shared receive queue 4 (i.e., SRQ4), and shared receive queue 5 (i.e., SRQ5), and establish connections between SRQ1 and QP1-QP60, SRQ2 and QP61-QP120, SRQ3 and QP121-QP180, SRQ4 and QP181-QP240, and SRQ5 and QP241-QP300 ( Figure 2 Only the related connection situations of SRQ1 and SRQ5 are shown as examples); if N=300, the receiving end (or receiving node, current node) can create a shared receiving queue 6 (ie, SRQ6), and establish connections between SRQ6 and QP1~QP300.
[0075] It can be seen that the method of the embodiment of the present application can flexibly establish an association relationship between a shared receiving queue and an idle queue pair, which helps to reduce the memory burden.
[0076] In a possible implementation, if the determination is yes, after establishing the first association relationship between the idle queue pair and the shared receive queue, the following steps may also be included:
[0077] A second association relationship between the idle queue pair and the completion queue is established.
[0078] It should be noted that the second association relationship between the idle queue pair and the completion queue can be a one-to-one association relationship or a one-to-many association relationship, and this application does not impose any limitation on this.
[0079] S104: Send the first number of receiving task orders to the shared receiving queue according to the first association relationship and the first number.
[0080] The software of the receiving end (or receiving node, current node) sends the receive task book to the shared receive queue. The software of the receiving end (or receiving node, current node) generates the receive task book based on the number of messages to be transmitted by the sending end (or sending node, first node) and the memory area corresponding to the messages to be transmitted. This helps the hardware of the subsequent receiving end (or receiving node, current node) to store the received messages to be transmitted in the correct memory area according to the receive task book.
[0081] Exemplarily, the first number of messages to be transmitted at the sending end (or sending node, the above-mentioned first node) is 300, and the receiving end (or receiving node, current node) determines that there are enough idle queues to receive these 300 messages to be transmitted, then the software part of the receiving end (or receiving node, current node) sends 300 receiving task books to the shared receiving queue.
[0082] S105: Generate a second link establishment request, and send the second link establishment request to the first node.
[0083] It should be noted that the second link establishment request may include information about an idle queue pair. Specifically, the second link establishment request may include the name and / or address of the idle queue pair, which helps the sending end (or the sending node, the above-mentioned first node) to allocate the corresponding queue pair to establish a link between the queue pairs at both ends.
[0084] In a possible implementation, after generating the second link establishment request and sending the second link establishment request to the first node, the following steps may also be included:
[0085] Receive a first confirmation message sent by the first node and enter a working state;
[0086] receiving a message to be transmitted sent by the first node;
[0087] According to the preset protocol, determine whether the message to be transmitted is correct;
[0088] If the judgment is yes, sending a second confirmation message to the first node;
[0089] If the judgment is no, first feedback information is sent to the first node. The first feedback information may be used to indicate that an abnormality exists in the transmission message, and the abnormality may include packet loss.
[0090] Among them, the preset protocol can specify the rules for transmitting data (such as the message to be transmitted in the embodiment of the present application), and can also be used as a basis for judging whether there is a transmission error in the data. The specific preset protocol is set by technical personnel according to actual conditions and is not limited here.
[0091] Possibly, after receiving the second confirmation message, the sending end (or sending node, the above-mentioned first node) will generate a corresponding task report, indicating the completion of the data transmission task, that is, all the messages to be transmitted have been successfully sent and all have been successfully received by the receiving end (or receiving node, current node).
[0092] More importantly, abnormal situations may also include delayed arrival of data packets due to network delays, data packets due to network throttling arriving at the receiving end in batches that are not sent according to preset settings, data packet retransmissions due to network instability, data packet disorder, or data packet tampering during transmission. In response to the above-mentioned abnormal situations, the receiving end (or receiving node, current node) of the embodiment method of the present application can generate corresponding first feedback information, which can be used to inform the sending end (or sending node, the above-mentioned first node) to resend the data to be transmitted, or other remedial measures. The specific remedial measures are set by technical personnel and are not limited here.
[0093] It can be seen that the receiving end (or receiving node, current node) of the embodiment method of the present application will also verify the received data packets of the message to be transmitted to avoid data transmission errors, while ensuring the efficient communication (or data transmission) and taking into account the accuracy of communication (or data transmission).
[0094] In another possible implementation, the method of the embodiment of the present application may further include the following steps:
[0095] According to the first association relationship, extract the corresponding receiving task book from the shared queue;
[0096] According to the received task book, the message to be transmitted is stored in the corresponding memory area.
[0097] Specifically, when the receiving end (or receiving node, current node) receives a message to be transmitted sent by the sending end (or sending node, the above-mentioned first node), it will distinguish which idle queue pair the message to be transmitted is sent to, and then the hardware part of the receiving end (or receiving node, current node) will obtain a receiving task book from the shared receiving queue that has a first association relationship with the idle queue pair, and then store the message to be transmitted in the memory area specified by the receiving task book. Exemplarily, queue pair 1 in the sending end (or sending node, the above-mentioned first node) sends message 1 to be transmitted to idle queue pair 1 in the receiving end (or receiving node, current node), then the hardware part of the receiving end (or receiving node, current node) will obtain receiving task book 1 from the shared receiving queue 1 that has a first association relationship with the idle queue pair 1, and store the message to be transmitted in the memory area specified by receiving message 1.
[0098] It can be seen that the method of the embodiment of the present application can accurately save the messages to be transmitted to the corresponding memory area in strict accordance with the connection relationship of the queue pairs, the association relationship between the idle queue pairs and the shared receiving queue, and the receiving task book, which helps to ensure the accuracy of communication (or data transmission) and further protect the user experience.
[0099] In another possible implementation, after storing the message to be transmitted in the corresponding memory area according to the received task book, the following steps may be further included:
[0100] Generate mission reports;
[0101] Sends a task report to the completion queue.
[0102] Specifically, the task report can be used to indicate that the receiving end (or receiving node, current node) has completed the work task corresponding to the corresponding receiving task book.
[0103] In another possible implementation, the method of the embodiment of the present application may further include the following steps:
[0104] When all the messages to be transmitted are received, the node enters a dormant state, which may mean that the node no longer receives messages sent by the first node.
[0105] canceling the connection relationship with the first node;
[0106] cancelling the first association between the idle queue pair and the shared receive queue;
[0107] The second association between the idle queue pair and the completion queue is canceled.
[0108] Specifically, when the receiving end (or receiving node, current node) has completed receiving all the messages to be transmitted, all related connections for the transmission of the messages to be transmitted can be canceled. The idle queue pairs and shared receiving queues after the connection is canceled can be used to complete the new communication (or data transmission) tasks of the receiving end (or receiving node, current node).
[0109] In another possible implementation, after determining whether the second number of idle queue pairs is greater than or equal to the first number, the following steps may be further included:
[0110] If the judgment is no, generating second feedback information according to the second number of idle queue pairs, where the second feedback information can be used to inform the first node of the currently available idle queue pairs;
[0111] The second feedback information is sent to the first node.
[0112] For example, if the number of to-be-transmitted messages that the sending end (or the sending node, the above-mentioned first node) needs to send is 300 and the number of idle queue pairs of the receiving end (or the receiving node, the current node) is 200, then the receiving end (or the receiving node, the current node) can generate a second feedback message that conveys information similar to "the receiving end (or the receiving node, the current node) can receive a maximum of 200 to-be-transmitted messages in the current batch". The sending end (or the sending node, the above-mentioned first node) can send the to-be-transmitted messages in two batches according to the second feedback information: 200 to-be-transmitted messages in the first batch and 100 to-be-transmitted messages in the second batch. After the first batch of transmissions is completed, the sending end (or the sending node, the above-mentioned first node) can use the queue pair connection established with the receiving end (or the receiving node, the current node) in the first batch to send the second batch of to-be-transmitted messages without re-establishing the queue pair connection, thereby reducing the complexity of data transmission while ensuring the security of data transmission.
[0113] Possibly, the receiving end (or receiving node, current node) can also feed back information about the idle queue pair that completes the data transmission task to the sending end (or sending node, the above-mentioned first node), and the first batch and the second batch may be transmitted simultaneously.
[0114] It can be seen that the method of the embodiment of the present application can send feedback information to the sending end (or sending node, the above-mentioned first node) in a timely manner according to the number of existing idle queue pairs at the receiving end (or receiving node, current node), which helps the sending end (or sending node, the above-mentioned first node) to generate a suitable data transmission plan and improve the efficiency of data transmission.
[0115] Specifically, see Figure 3 , is a schematic diagram of a data transmission process provided by an embodiment of the present application. Figure 3As shown, the communication (or data transmission) process between the sending end (or sending node, the above-mentioned first node) and the receiving end (or receiving node, current node) involved in the method of the embodiment of the present application can be described as follows: the Initiator end (i.e., the sending end, or the sending node, current node) initiates a first link establishment request to the Target end (i.e., the receiving end, or the receiving node, current node); the Target end determines whether there are enough idle queue pairs to receive the to-be-transmitted message sent by the Initiator end; if the Target end determines that there are enough idle queue pairs to receive the to-be-transmitted message sent by the Initiator end, then the idle queue pair and the shared receiving queue are established. The first association relationship is established, and then a second link establishment request is sent to the Initiator end. After receiving the second link establishment request, the Initiator end calls the queue pair used to send the message to be transmitted on the Initiator end to establish a connection with the idle queue pair on the Target end, and sends a first confirmation message to the Target end. The Initiator end sends the message to be transmitted to the Target end through the established connection. After receiving all the messages to be transmitted and determining that the messages to be transmitted are correct (that is, the messages to be transmitted meet the requirements of the "preset protocol" described above), the Target end sends a second confirmation message to the Initiator end. It should be noted that Figure 3 It is only an example of a data transmission process involved in the embodiment method of the present application, and does not represent all data transmission processes or all data transmission situations involved in the embodiment method of the present application, and should not constitute a limitation to the present application.
[0116] Possibly, if a link establishment request sent by a sender (or sending node, the first node mentioned above) or a receiver (or receiving node, the current node) to another party fails to reach the other party due to an abnormality in the network path (i.e., no confirmation message is received from the other party within a preset time), the sender (or sending node, the first node) or the receiver (or receiving node, the current node) will resend the link establishment request to the other party. Furthermore, a number of retransmissions can be set for "re-sending the link establishment request to the other party." When the number of retransmissions exceeds the preset number, the link establishment initiator can choose to cancel the link establishment task. Furthermore, after the sender (or sending node, the first node) and the receiver (or receiving node, the current node) successfully establish a link, the sender (or sending node, the first node) will maintain a queue pair connection with the receiver (or receiving node, the current node) until it receives a second confirmation message from the receiver (or receiving node, the current node).
[0117] In another possible implementation, when a sender (or a sending node, or the first node) detects that there are no more pending tasks in the queue for sending messages to be transmitted, the sender (or the sending node, or the first node) may initiate a chain deletion request. When a sender (or the sending node, or the first node) detects that the next task in the queue for sending messages to be transmitted is destined for a different receiver (or receiving node, or the current node), the sender (or the sending node, or the first node) may initiate a chain deletion request. When a receiver (or the receiving node, or the current node) does not receive a first confirmation message from the sender (or the sending node, or the first node) within a preset time, the sender (or the receiving node, or the current node) may initiate a chain deletion request. When a receiver (or the receiving node, or the current node) does not receive a pending message from the sender (or the sending node, or the first node) within a preset time, the sender (or the receiving node, or the current node) may initiate a chain deletion request. The other end does not need to respond to the chain deletion request.
[0118] From the above, it can be seen that the embodiment method of the present application can flexibly establish an association relationship between idle queue pairs and shared receiving queues based on the number of to-be-transmitted messages that the sending end (or sending node, the above-mentioned first node) needs to send to the receiving end (or receiving node, current node), which is beneficial to reducing the memory load or pressure of the receiving end (or receiving node, current node).
[0119] The following describes the device involved in the embodiments of the present application with reference to the accompanying drawings.
[0120] See Figure 4 , is a schematic diagram of the composition of a device for reducing RDMA network overhead based on connection management provided in an embodiment of the present application, the device may include: a communication module 410, a computing module 420 and a control module 430;
[0121] The communication module 410 may be configured to receive a first link establishment request sent by a first node, where the first link establishment request may include a first number of packets to be transmitted;
[0122] A calculation module 420 may be configured to determine whether a second number of idle queue pairs is greater than or equal to the first number, where the idle queue pairs may include a receiving queue and a sending queue;
[0123] The control module 430 may be configured to establish a first association relationship between the idle queue pair and the shared receive queue when the second number of idle queue pairs is greater than or equal to the first number, the third number of the shared receive queue is less than the second number, and the shared receive queue is in an idle state;
[0124] The control module 430 may also be configured to send a first number of receiving task orders to the shared receiving queue according to the first association relationship and the first number;
[0125] The control module 430 may also be configured to generate a second link establishment request, where the second link establishment request may include information about the idle queue pair;
[0126] The communication module 410 may also be configured to send a second link establishment request to the first node.
[0127] In one possible implementation, the apparatus for reducing RDMA network overhead based on connection management may further include:
[0128] The communication module 410 may also be configured to receive a first confirmation message sent by the first node;
[0129] The control module 430 may also be used to control the device for reducing RDMA network overhead based on connection management to enter a working state;
[0130] The communication module 410 may also be configured to receive a message to be transmitted sent by the first node;
[0131] The calculation module 420 may also be used to determine whether the message to be transmitted is correct according to a preset protocol;
[0132] The communication module 410 may also be configured to send a second confirmation message to the first node when the message to be transmitted is correct;
[0133] The communication module 410 may also be configured to send first feedback information to the first node when the message to be transmitted is incorrect. The first feedback information may be configured to indicate that an abnormality exists in the message to be transmitted, and the abnormality may include packet loss.
[0134] In another possible implementation, the apparatus for reducing RDMA network overhead based on connection management may further include:
[0135] The control module 430 may also be configured to extract a corresponding receiving task book from the shared receiving queue according to the first association relationship;
[0136] The control module 430 may also be configured to store the message to be transmitted into a corresponding memory area according to the received task book.
[0137] In another possible implementation, the apparatus for reducing RDMA network overhead based on connection management may further include:
[0138] The control module 430 may also be configured to establish a second association relationship between the idle queue and the completion queue.
[0139] In another possible implementation, the apparatus for reducing RDMA network overhead based on connection management may further include:
[0140] The calculation module 420 can also be used to generate a task report;
[0141] The control module 430 may also be configured to send the task report to the completion queue.
[0142] In another possible implementation, the apparatus for reducing RDMA network overhead based on connection management may further include:
[0143] The control module 430 may also be configured to control the apparatus for reducing RDMA network overhead based on connection management to enter a dormant state after all the messages to be transmitted are received. The dormant state may indicate that the messages sent by the first node are no longer received.
[0144] The control module 430 may also be used to cancel the connection relationship with the first node;
[0145] The control module 430 may also be used to cancel the first association between the idle queue pair and the shared receiving queue;
[0146] The control module 430 may also be configured to cancel the second association between the idle queue pair and the completion queue.
[0147] In another possible implementation, the apparatus for reducing RDMA network overhead based on connection management may further include:
[0148] The control module 430 may also be configured to generate second feedback information based on the second number of idle queue pairs when the second number of idle queue pairs is less than the first number. The second feedback information may be used to inform the first node of currently available idle queue pairs.
[0149] See Figure 5 , is a schematic diagram of another apparatus for reducing RDMA network overhead based on connection management provided in an embodiment of the present application, the apparatus may include:
[0150] The processor 510, the memory 520 and the I / O interface 530 are communicatively connected. The memory 520 is used to store instructions, and the processor 510 is used to execute the instructions stored in the memory 520 to implement the above Figure 1 Corresponding method steps.
[0151] The processor 510 is used to execute the instructions stored in the memory 520 to control the I / O interface 530 to receive and send signals and complete the steps in the above method. The memory 520 can be integrated into the processor 510 or set separately from the processor 510.
[0152] Memory 520 may also include a storage system 521, a cache 522, and RAM 523. Cache 522 is a primary memory located between RAM 523 and the CPU. It consists of static RAM (SRAM) chips and has a relatively small capacity but a much higher speed than main memory, approaching the speed of the CPU. RAM 523 is internal memory that directly exchanges data with the CPU. It can be read and written at any time (except when refreshing) and is very fast. It is typically used as a temporary data storage medium for the operating system or other running programs. The three together realize the functions of memory 520.
[0153] As an implementation method, the function of the I / O interface 530 may be implemented by a transceiver circuit or a dedicated transceiver chip. The processor 510 may be implemented by a dedicated processing chip, a processing circuit, a processor, or a general-purpose chip.
[0154] As another implementation, it is possible to implement the apparatus provided in the embodiments of the present application using a general-purpose computer. Specifically, the program code implementing the functions of the processor 510 and the I / O interface 530 is stored in the memory 520, and the general-purpose processor executes the code in the memory 520 to implement the functions of the processor 510 and the I / O interface 530.
[0155] For the concepts, explanations, detailed descriptions and other steps involved in the device and related to the technical solutions provided in the embodiments of the present application, please refer to the description of the method steps performed by the device in the aforementioned method or other embodiments, which will not be repeated here.
[0156] As another implementation of this embodiment, a computer-readable storage medium is provided, on which instructions are stored. When the instructions are executed, the method in the above method embodiment is executed.
[0157] As another implementation of this embodiment, a computer program product including instructions is provided. When the instructions are executed, the method in the above method embodiment is performed.
[0158] Those skilled in the art will understand that for ease of explanation, Figure 5 Only one memory and processor are shown. In an actual terminal or server, there may be multiple processors and memories. The memory may also be referred to as a storage medium or storage device, etc., which is not limited in the embodiments of the present application.
[0159] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0160] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAMbus RAM (DR RAM).
[0161] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, the memory (storage module) is integrated into the processor.
[0162] It should be noted that the memory described herein is intended to include, but not be limited to, these and any other suitable types of memory.
[0163] In addition to the data bus, the bus may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as buses in the figure.
[0164] It should also be understood that the first, second, third, fourth and various numerical numbers involved in this document are only distinctions made for the convenience of description and are not intended to limit the scope of this application.
[0165] It should be understood that the term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.
[0166] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.
[0167] In various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0168] Those skilled in the art will appreciate that the various illustrative logical blocks (ILBs) and steps described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0169] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0170] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0171] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0172] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).
[0173] An embodiment of the present application also provides a computer storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement part or all of the steps of any method for reducing RDMA network overhead based on connection management as described in the above method embodiments.
[0174] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any method for reducing RDMA network overhead based on connection management as described in the above method embodiments.
[0175] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for reducing RDMA network overhead based on connection management, characterized in that: The method comprises the following steps: receiving a first link establishment request sent by a first node, where the first link establishment request includes a first number of packets to be transmitted; Determining whether a second number of idle queue pairs is greater than or equal to the first number, the idle queue pairs including a receive queue and a send queue; If the judgment is yes, a first association relationship between the idle queue pair and the shared receive queue is established, the third number of the shared receive queues is less than the second number, and the shared receive queue is in an idle state; Sending the first number of receiving task books to the shared receiving queue according to the first association relationship and the first number; generating a second link establishment request, and sending the second link establishment request to the first node, where the second link establishment request includes information about the idle queue pair; After determining whether the second number of idle queue pairs is greater than or equal to the first number, the following steps are further included: If the judgment is no, generating second feedback information according to the second number of the idle queue pairs, where the second feedback information is used to inform the first node of the currently available idle queue pairs; sending the second feedback information to the first node; The method further comprises the following steps: When all the messages to be transmitted are received, the node enters a dormant state, where the node no longer receives messages sent by the first node. canceling the connection relationship with the first node; canceling the first association relationship between the idle queue pair and the shared receive queue; The second association relationship between the idle queue pair and the completion queue is cancelled.
2. The method according to claim 1, characterized in that The first link establishment request also includes memory area information for storing the message to be transmitted; after generating the second link establishment request and sending the second link establishment request to the first node, the following steps are also included: receiving a first confirmation message sent by the first node and entering a working state; receiving the message to be transmitted sent by the first node; According to the preset protocol, determining whether the message to be transmitted is correct; If the judgment is yes, sending a second confirmation message to the first node; If the judgment is no, first feedback information is sent to the first node, where the first feedback information is used to indicate that an abnormality exists in the message to be transmitted, and the abnormality includes packet loss.
3. The method according to claim 2, characterized in that The method further comprises the following steps: Extracting a corresponding receiving task book from the shared receiving queue according to the first association relationship; According to the received task book, the message to be transmitted is stored in the corresponding memory area.
4. The method according to claim 3, characterized in that After the step of establishing a first association relationship between the idle queue pair and the shared receive queue if the determination is yes, the following steps are further included: A second association relationship between the idle queue pair and the completion queue is established.
5. The method according to claim 4, characterized in that After storing the message to be transmitted in the corresponding memory area according to the received task book, the method further includes the following steps: Generate mission reports; The task report is sent to the completion queue.
6. A device for reducing RDMA network overhead based on connection management, characterized in that: The device includes: a communication module, a calculation module and a control module; The communication module is configured to receive a first link establishment request sent by a first node, where the first link establishment request includes a first number of messages to be transmitted; The calculation module is configured to determine whether a second number of idle queue pairs is greater than or equal to the first number, the idle queue pairs comprising a receiving queue and a sending queue; The control module is configured to establish a first association relationship between the idle queue pair and the shared receive queue when the second number of the idle queue pairs is greater than or equal to the first number, the third number of the shared receive queues is less than the second number, and the shared receive queue is in an idle state; The control module is further configured to send the first number of receiving task books to the shared receiving queue according to the first association relationship and the first number; The control module is further configured to generate a second link establishment request, wherein the second link establishment request includes information about the idle queue pair; The communication module is further configured to send the second link establishment request to the first node; The control module is further configured to generate second feedback information according to the second number of idle queue pairs when the second number of idle queue pairs is less than the first number, wherein the second feedback information is used to inform the first node of currently available idle queue pairs; The communication module is further configured to send the second feedback information to the first node; The control module is further configured to control the device for reducing RDMA network overhead based on connection management to enter a dormant state after all the messages to be transmitted are received, wherein the dormant state indicates that the messages sent by the first node are no longer received; The control module is further configured to cancel the connection with the first node; The control module is further configured to cancel the first association between the idle queue pair and the shared receive queue; The control module is further configured to cancel the second association between the idle queue pair and the completion queue.
7. A device for reducing RDMA network overhead based on connection management, characterized in that: The device comprises: A processor, a memory, and a bus, wherein the processor and the memory are connected via the bus, wherein the memory is used to store a set of program codes, and the processor is used to call the program codes stored in the memory to execute the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that include: The computer-readable storage medium stores instructions, which, when executed on a computer, implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
RDMA data transmission method and device based on dynamic connection
CN106953797A