A method and device for adjusting the length of an RDMA completion queue based on a DPU
By installing a software driver on the host CPU to perform RDMA queue length adjustment, the efficiency problem caused by hardware relocation is solved, and efficient data transmission and resource utilization are achieved.
Patent Information
- Application Number
- CN202411542844.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2044-10-31
AI Technical Summary
In existing RDMA transmissions, resetting the completion queue size results in a decrease in the efficiency of input/output job requests due to hardware handling of completion queue entries.
By loading a software driver on the host central processing unit, the queue length adjustment is completed by directly accessing memory. This includes receiving adjustment requests, configuring a new address mapping table, sending a completion queue length change notification, moving completion queue entries and releasing old storage space, and using the hardware of the data processor (DPU) for auxiliary operations.
It reduces hardware resource consumption, improves data transmission efficiency, avoids communication losses, enhances system resource utilization, and adapts to changing network environments.
Smart Images

Figure CN119669141B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication technology, and in particular to a method and apparatus for adjusting queue length using RDMA based on a DPU. Background Technology
[0002] In today's computer networks and data centers, the demand for high-performance computing (HPC) and large-scale data processing is growing rapidly. With the explosive growth in data volume and computing demands, traditional data transmission methods are struggling to meet the performance requirements of modern applications. To address this challenge, RDMA (Remote Direct Memory Access) technology has been widely adopted. RDMA allows computers to directly access each other's memory over a network without operating system intervention, significantly reducing data transmission latency and improving bandwidth utilization. The core advantage of RDMA lies in its ability to bypass the traditional operating system network protocol stack and directly transmit data. This greatly reduces data transmission latency and CPU load, allowing more CPU resources to be used for application computation tasks. Furthermore, RDMA supports one-to-many and many-to-many communication modes, which is particularly important for applications requiring high-concurrency data processing. In high-performance computing and data center applications, RDMA technology has become an indispensable solution.
[0003] However, in existing RDMA transfers, the operation of resizing the completion queue (cq) relies excessively on hardware. The hardware-driven handling of the completion queue entries (CQE) of the original completion queue (CQ) after resizing causes a decrease in the efficiency of the hardware in processing normal input / output (IO) work requests (WR). Therefore, a new scheme for resizing the completion queue is urgently needed to allow the hardware to allocate its performance to processing normal IO work requests (WR), thereby improving data transfer efficiency. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method and apparatus for adjusting the length of the RDMA completion queue based on a DPU, so as to eliminate or improve one or more defects existing in the prior art, and solve the problem that the prior art occupies hardware resources and causes a decrease in input / output efficiency when resetting the size of the completion queue in RDMA transmission.
[0005] One aspect of the present invention provides a method for adjusting queue length using Remote Direct Memory Access (RDMA) based on a Data Processing Unit (DPU). The method is loaded onto a host CPU in the form of a software driver for scheduling and execution via Direct Memory Access. The host CPU is used to implement Remote Direct Memory Access. The method includes the following steps:
[0006] Receive a request to adjust the length of the completion queue, allocate new memory space for the completion queue according to the adjustment request, and configure the corresponding new completion queue address mapping table;
[0007] Send a completion queue length change notification to the DPU hardware corresponding to the adjustment request. The completion queue length change notification includes the start position information, index information, and depth information of the newly created completion queue address mapping table. The index information includes a newly created producer index and a newly created consumer index.
[0008] After the hardware caches and reads the notification of change in the length of the completion queue and deploys a new completion queue, it receives a tagged completion queue entry sent by the hardware in a preset format.
[0009] The completed queue entries generated after the marked completed queue entries are written to the front of the newly created completed queue one by one according to the producer index. The unprocessed completed queue entries in the old completed queue are moved to the back of the newly created completed queue according to the new consumer index, and are read out and processed one by one from the new consumer index.
[0010] Release the storage space of the old completion queue.
[0011] In some embodiments, the index of the newly created producer points to the starting position of the newly created completion queue; the formula for calculating the index of the newly created consumer is:
[0012] new_CI=new_depth-(old_PI-old_CI);
[0013] Wherein, new_CI represents the position pointed to by the newly created consumer index; new_depth represents the depth information; old_PI represents the old producer index of the old completion queue; and old_CI represents the old consumer index of the old completion queue.
[0014] In some embodiments, the newly created consumer index points to the middle position of the newly created completed queue.
[0015] In some embodiments, the depth information is expanded according to a preset plan, wherein the preset plan sets the depth of the newly created completion queue to a specified multiple of the length of the old completion queue during each expansion process.
[0016] In some embodiments, the marked completion queue entries are marked by modifying the opcode field according to the preset format.
[0017] In some embodiments, the method further includes:
[0018] Acquire historical data generated within a first set time period prior to the current moment, wherein the historical data is a sequence of data entries forwarded within multiple time periods;
[0019] The historical data is input into a pre-trained data traffic prediction model to predict the sequence of data items forwarded within multiple time periods after the current time within a second set time range;
[0020] Based on the maximum value of the number of forwarded data entries in each time period of the predicted data entry sequence, the queue length is adjusted in advance.
[0021] In some embodiments, the pre-training step of the data traffic prediction model includes:
[0022] Obtain a training sample set, which contains multiple samples, each sample containing a first data count sequence and a second data count sequence generated in two time periods with a set time interval;
[0023] An initial neural network model is obtained, which consists of a continuous convolutional neural network, a long short-term memory neural network, and a fully connected layer; the first data line count sequence in each sample is input into the initial neural network model, and the predicted sequence for the second data line count sequence is output;
[0024] The initial neural network is trained using the training sample set, and the mean square error between the predicted sequence and the second data sequence is calculated as a loss function. The parameters of the initial neural network are then updated according to the loss function to obtain the data flow prediction model.
[0025] On the other hand, the present invention also provides a DPU-based RDMA completion queue length adjustment device, including a processor, a memory, and a computer program / instructions stored in the memory. The processor is used to execute the computer program / instructions, and when the computer program / instructions are executed, the device implements the steps of the above method.
[0026] On the other hand, the present invention also provides a computer-readable storage medium having a computer program / instructions stored thereon, characterized in that the computer program / instructions, when executed by a processor, implement the steps of the above-described method.
[0027] On the other hand, the present invention also provides a computer program product, including a computer program / instructions, characterized in that the computer program / instructions, when executed by a processor, implement the steps of the above-described method.
[0028] The beneficial effects of this invention are at least:
[0029] The DPU-based RDMA completion queue length adjustment method and apparatus of this invention, by loading software on the host central processing unit to perform the reset of the completion queue size and the completion queue entry transfer operation, can directly access memory for scheduling processing. After the completion queue memory space is switched, the hardware of the data processor (DPU) does not need to participate in the transfer of completion queue entries in the old completion queue storage space, and directly handles input / output work. This reduces the transmission rate drop caused by processing the generated CQE, improves the efficiency of data transmission, avoids communication loss caused by data transfer, and reduces the waste of communication resources. The software-driven transfer strategy can change the transfer strategy at any time to adapt to the changing network environment, thereby improving the overall system resource utilization.
[0030] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.
[0031] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description
[0032] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings:
[0033] Figure 1 This is a flowchart illustrating the DPU-based RDMA queue length adjustment method according to an embodiment of the present invention.
[0034] Figure 2 This is a logical schematic diagram of the DPU-based RDMA completion queue length adjustment method according to another embodiment of the present invention. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.
[0036] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0037] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0038] In existing RDMA implementations, during the process of resizing the completion queue (resize cq), the hardware is responsible for moving the submitted completion queues from the old completion queue memory space to the new completion queue memory space. During this process, after the hardware completion queue is switched to the new completion queue memory space, it cannot directly process subsequent input / output work requests (WR), resulting in a decrease in the efficiency of the hardware in processing normal input / output work requests.
[0039] The characters involved in this invention are explained as follows:
[0040] RDMA: Remote Direct Memory Access, is a computer networking technology that allows two nodes on a network to directly access each other's memory and complete data communication without the intervention of the operating system. It offers advantages such as low latency, high bandwidth, and reduced system resource consumption.
[0041] DPU: Data Processing Unit, is a dedicated data processing chip that supports infrastructure resource layer virtualization, improves computing system efficiency, and reduces the overall total cost of ownership. As a key hardware component for implementing RDMA, the DPU can significantly improve the overall efficiency of the computing system, reduce the total cost of ownership, and minimize performance overhead on other computing chips.
[0042] WQE: Work Queue Entry, is an entry in RDMA used to store a send operation request. It is generally called WQE in the driver and WR (Work Request) to the user.
[0043] RQE: Recv Queue Entry, is an entry in RDMA used to store a receive operation request. It is generally called RQE in the driver and WR (Work Request) to the user.
[0044] PI: Producer Index, is an index representing the entries that a producer will submit.
[0045] CI: Consumer Index, is an index representing the entries that a consumer will process.
[0046] SQ: SendQueue, is a queue used in RDMA to store sent WQE / WR messages.
[0047] RQ: ReceiveQueue, is a queue used in RDMA to store received RQE / WR messages.
[0048] QP: Queue Pair, is an endpoint used for data transmission in RDMA, including a transmit queue and a receive queue.
[0049] CQE: Completion Queue Entry. It is an entry in RDMA used to store the completion status of a work request. It is generally called CQE in the driver and WC (Work Complete) to the user.
[0050] CQ: Completion Queue, is the queue in RDMA where the hardware reports the completion status of a specific WQE / WR from the software.
[0051] Specifically, this invention provides a method for adjusting queue length using RDMA based on a DPU. This method is loaded onto the host CPU in the form of a software driver and directly accesses memory for scheduling and execution. The host CPU is loaded with a Data Processing Unit (DPU) to implement remote direct memory access, such as... Figure 1 and Figure 2 As shown, the method includes the following steps S101 to S105:
[0052] Step S101: Receive the completion queue length adjustment request, allocate new memory space for the completion queue according to the adjustment request, and configure the corresponding new completion queue address mapping table.
[0053] Step S102: Send a completion queue length change notification corresponding to the execution adjustment request to the hardware of the data processor DPU. The completion queue length change notification includes the starting position information, index information and depth information of the newly created completion queue address mapping table; the index information includes the newly created producer index and the newly created consumer index.
[0054] Step S103: After the hardware caches and reads the notification of change in the length of the completion queue and deploys the newly created completion queue, receive the completed queue entry with a tagged label sent by the hardware in a preset format.
[0055] Step S104: Write the completed queue entries generated after the marked completed queue entries into the front end of the newly created completed queue one by one according to the producer index. Move the unprocessed completed queue entries in the old completed queue to the back end of the newly created completed queue according to the new consumer index, and read them out one by one from the new consumer index to process them.
[0056] Step S105: Release the storage space of the old completion queue.
[0057] In steps S101-S105, the method is loaded as software onto the host central processing unit (CPU). It directly accesses the hardware's memory space through a driver or operating system to read CQEs from the old completion queue (old CQ). This process is entirely under software control, avoiding hardware involvement from the data processing unit (DPU) and thus not consuming hardware I / O resources. The software can flexibly manage the order and status of CQEs, ensuring that the order requirements of CQEs are not violated during the transfer process. This differs from the strict operation sequence required by hardware; software can handle the order of CQEs more flexibly through logical processing. After the transfer is complete, the software marks these CQEs as processed, thereby preventing them from being processed repeatedly or causing inconsistencies.
[0058] The host CPU can utilize its cache to accelerate read and write operations on CQE. Compared to hardware-based relocation, software-based relocation better leverages the CPU's cache and memory locality, reducing the frequency of direct access to main memory and thus improving efficiency. Software can flexibly schedule CQE relocation operations based on the current system load, avoiding excessive burden on the CPU. For example, software can choose to perform CQE relocation when the system load is low to minimize the impact on other tasks.
[0059] Hardware may need to frequently switch contexts between different tasks when moving completed queue entries (CQE), while software can move completed queue entries sequentially by the host CPU, avoiding the additional overhead of hardware context switching.
[0060] In step S101, this method is executed based on the user's request to adjust the length of the completion queue. In other scenarios, the operation of resizing the completion queue (resize cq) can also be initiated based on preset conditions, such as at specified time intervals or by monitoring the average occupancy of the completion queue. When the occupancy exceeds a set proportion, the operation of resizing the completion queue is initiated. The size of the newly created memory space can be configured adaptively based on the plan or according to changes in the usage scenario. A new completion queue address mapping table is configured to point to the specific location occupied in memory.
[0061] In step S102, the data processor (DPU), acting as the hardware (HCA) performing RDMA, is driven by software to send a completion queue length change notification, along with information related to the newly created memory, including the starting position information, index information, and depth information of the newly created completion queue address mapping table; the index information includes the newly created producer index and the newly created consumer index. This information guides the writing and reading of completion queue entries during the handover process.
[0062] In some embodiments, the index of the newly created producer points to the starting position of the newly created completion queue, i.e., new PI = 0; the formula for calculating the position of the index of the newly created consumer is:
[0063] new_CI=new_depth-(old_PI-old_CI);
[0064] Wherein, new_CI represents the position pointed to by the newly created consumer index; new_depth represents the depth information; old_PI represents the old producer index of the old completion queue; and old_CI represents the old consumer index of the old completion queue.
[0065] In some embodiments, the new consumer index points to the middle position of the new completion queue. This configuration ensures that all unprocessed completion queue entries in the old completion queue can be completely moved to the new completion queue.
[0066] In some embodiments, the marked completion queue entries are marked by modifying the opcode field (opcode identifier) according to a preset format, specifically distinguishing them from the general send, write, read, or recv types.
[0067] In some embodiments, the method further includes steps S201 to S203:
[0068] Step S201: Obtain historical data generated within a first set time period before the current time. The historical data is a sequence of data entries forwarded within multiple time periods.
[0069] Step S202: Input historical data into the pre-trained data traffic prediction model to predict the sequence of data items forwarded within multiple time periods after the current time within a second set time range.
[0070] Step S203: Based on the number of data entries, predict the maximum value of the number of data entries forwarded in each time period of the sequence, and adjust the queue length in advance.
[0071] Steps S201 to S203 are for implementing predictive scheduling. By utilizing historical data and traffic prediction, the size of the completion queue (CQ) is adjusted in advance, thereby reducing the frequency of requests to reset the completion queue size, which reduces the hardware burden. Specifically, for the predicted number of data entries in the future time period, if its maximum or average value exceeds the current level by a set proportion, a request to reset the completion queue size is initiated.
[0072] In some embodiments, the pre-training step of the data traffic prediction model includes steps S301 to S303:
[0073] Step S301: Obtain a training sample set. The training sample set contains multiple samples, and each sample contains a first data sequence and a second data sequence generated in two time periods with a set time interval.
[0074] Step S302: Obtain the initial neural network model, which consists of a continuous convolutional neural network, a long short-term memory neural network, and a fully connected layer; input the first data line sequence in each sample into the initial neural network model, and output the prediction sequence for the second data line sequence.
[0075] Step S303: Train the initial neural network using the training sample set, calculate the mean square error (MSE) between the predicted sequence and the second data sequence as the loss function, and update the parameters of the initial neural network according to the loss function to obtain the data flow prediction model.
[0076] Specifically, the time interval between the first data sequence and the second data sequence can be set according to application requirements. The data collection frequency can be on the order of seconds, minutes, or hours, depending on the time period requirements of the prediction.
[0077] In some embodiments, data cleaning can be performed to handle missing values and outliers. If there are only a few missing data points, they can be filled in with the mean, median, or data from the previous time point; if there are many missing data points, incomplete time periods may need to be discarded. Data standardization / normalization is performed to scale the data to an appropriate range (e.g., 0-1) to speed up model training and improve prediction accuracy.
[0078] Considering the characteristics of time series data, the initial neural network model can also be a recurrent neural network (RNN) or a gated recurrent unit (GRU). During training, the mean absolute error (MAE) can be used to construct the loss. Furthermore, a suitable optimizer, such as Adam or RMSprop, can be selected to update the model's weights.
[0079] On the other hand, the present invention also provides a DPU-based RDMA completion queue length adjustment device, including a processor, a memory, and a computer program / instructions stored in the memory. The processor is used to execute the computer program / instructions, and when the computer program / instructions are executed, the device implements the steps of the above method.
[0080] On the other hand, the present invention also provides a computer-readable storage medium having a computer program / instructions stored thereon, characterized in that the computer program / instructions, when executed by a processor, implement the steps of the above-described method.
[0081] On the other hand, the present invention also provides a computer program product, including a computer program / instructions, characterized in that the computer program / instructions, when executed by a processor, implement the steps of the above-described method.
[0082] The present invention will now be described with reference to a specific embodiment:
[0083] This embodiment proposes a method for a software driver to handle the movement of completion queue entries from the original completion queue (CQ) after resizing the completion queue (cq). The software driver is loaded and runs on the host CPU, directly scheduling and accessing memory. (Refer to...) Figure 2 The overall plan includes the following main steps S1 to S5:
[0084] Step S1: After receiving the user's request to reset the completion queue size, the software driver allocates a new completion queue memory space (cq buffer) and fills in the completion queue address mapping table.
[0085] Step S2: The software driver sends a notification to the RDMA execution hardware requesting a reset of the completion queue size, carrying the start address information, index information, and depth information of the completion queue address mapping table. After the reset, the new completion queue (CQ) always starts from the beginning position; that is, the address of the reported completion queue entry (CQE) is the start address of the completion queue. If the reset action is agreed to double the size each time, then the depth information is not required.
[0086] Step S3: The hardware caches the commands from the software driver requesting to reset the completion queue size, reads and processes them one by one, and informs the software with a "special CQE". This serves as the switching point between the old and new completion queue memory spaces (CQ buffer). Completion queue entries (CQEs) before the "special CQE" are placed in the old completion queue, and completion queue entries (CQEs) after the "special CQE" are placed in the new completion queue. The "special CQE" refers to a CQE that specially marks the opcode field (opcode identifier).
[0087] Step S4: The switching process does not require a parallel switch; instead, it starts from the beginning of the new completion queue (pI = 0). That is, both the software and hardware need to set PI to 0 after the switch. The software needs to move unprocessed completion queue entries, conventionally to the end of the new completion queue. After resetting the completion queue size, both the software driver and hardware need to modify the CI. Before the hardware receives the new CI from the software, it needs to convert its local CI. The calculation method is as follows:
[0088] new_CI=new_depth-(old_PI-old_CI);
[0089] Wherein, new_CI represents the position pointed to by the newly created consumer index; new_depth represents the depth information; old_PI represents the old producer index of the old completion queue; and old_CI represents the old consumer index of the old completion queue.
[0090] The hardware can also skip calculating the CI and directly use new_depth / 2 as the CI, which can ensure that the queue will not be full. The CI can be updated when the software issues a new one.
[0091] Step S5: Release the old completion queue memory space.
[0092] By improving the RDMA completion queue size reset process, the method described in this embodiment effectively solves the problems of decreased transmission efficiency and resource waste caused by the completion queue size reset operation in the prior art. Specific advantages include:
[0093] Releasing hardware processing power: The software completes the transfer of the original completion queue (CQ) CQE after resizing the completion queue. The hardware can immediately process IO work requests (WR) after the completion queue memory space is switched, and then generate CQE to notify the upper layer user of the completion status of the work request. This reduces the transmission rate drop caused by processing the generated CQE and improves the efficiency of data transmission.
[0094] Reduce resource waste: By optimizing the process of resetting the completion queue size, communication losses caused by data transfer are avoided, communication resources are reduced, and the overall system resource utilization is improved.
[0095] Corresponding to the above method, the present invention also provides an apparatus / system including a computer device, the computer device including a processor and a memory, the memory storing computer instructions, the processor executing the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the apparatus / system performs the steps of the method as described above.
[0096] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.
[0097] In summary, the DPU-based RDMA completion queue length adjustment method and apparatus of this invention, by loading software on the host central processing unit to perform the reset of the completion queue size and the completion queue entry transfer operation, can directly access memory for scheduling processing. After the completion queue memory space is switched, the hardware of the data processor (DPU) does not need to participate in the transfer of completion queue entries in the old completion queue storage space, and directly handles input / output work. This reduces the transmission rate drop caused by processing the generated CQE, improves the efficiency of data transmission, avoids communication loss caused by data transfer, and reduces the waste of communication resources. The software-driven transfer strategy can change the transfer strategy at any time to adapt to the changing network environment, thereby improving the overall system resource utilization.
[0098] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.
[0099] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0100] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.
[0101] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for adjusting queue length using DPU-based RDMA, characterized in that, The method is implemented in software-driven form on the host CPU for direct memory access and scheduling. The host CPU is equipped with a data processing unit (DPU) to implement remote direct memory access. The method includes the following steps: Receive a request to adjust the length of the completion queue, allocate new memory space for the completion queue according to the adjustment request, and configure the corresponding new completion queue address mapping table; A completion queue length change notification is sent to the hardware in the DPU to execute the adjustment request. The completion queue length change notification includes the start position information, index information, and depth information of the newly created completion queue address mapping table. The index information includes a newly created producer index and a newly created consumer index. After the hardware caches and reads the notification of change in the length of the completion queue and deploys a new completion queue, it receives a tagged completion queue entry sent by the hardware in a preset format. The completed queue entries generated after the marked completed queue entries are written to the front of the newly created completed queue one by one according to the producer index. The unprocessed completed queue entries in the old completed queue are moved to the back of the newly created completed queue according to the new consumer index, and are read out and processed one by one from the new consumer index. Release the storage space of the old completion queue.
2. The method for adjusting the queue length of DPU-based RDMA according to claim 1, characterized in that, The index information indicates that the newly created producer index points to the starting position of the newly created completion queue; the formula for calculating the position of the newly created consumer index is: new_CI=new_depth-(old_PI-old_CI); Wherein, new_CI represents the position pointed to by the newly created consumer index; new_depth represents the depth information; old_PI represents the old producer index of the old completion queue; and old_CI represents the old consumer index of the old completion queue.
3. The method for adjusting the queue length of RDMA based on DPU according to claim 1, characterized in that, The newly created consumer index points to the middle position of the newly created queue.
4. The method for adjusting the queue length of RDMA based on DPU according to claim 1, characterized in that, The depth information is expanded according to a preset plan, in which the preset plan sets the depth of the newly created completion queue to a specified multiple of the length of the old completion queue during each expansion process.
5. The method for adjusting the queue length of RDMA based on DPU according to claim 1, characterized in that, The marked queue entries are marked according to the preset format by modifying the opcode field.
6. The method for adjusting the queue length of RDMA based on DPU according to claim 1, characterized in that, The method further includes: Acquire historical data generated within a first set time period prior to the current moment, wherein the historical data is a sequence of data entries forwarded within multiple time periods; The historical data is input into a pre-trained data traffic prediction model to predict the sequence of data items forwarded within multiple time periods after the current time within a second set time range; Based on the maximum value of the number of forwarded data entries in each time period of the predicted data entry sequence, the queue length is adjusted in advance.
7. The method for adjusting the queue length of DPU-based RDMA according to claim 6, characterized in that, The pre-training steps of the data traffic prediction model include: Obtain a training sample set, which contains multiple samples, each sample containing a first data count sequence and a second data count sequence generated in two time periods with a set time interval; An initial neural network model is obtained, which consists of a continuous convolutional neural network, a long short-term memory neural network, and a fully connected layer; the first data sequence in each sample is input into the initial neural network model, and a prediction sequence for the second data sequence is output; The initial neural network is trained using the training sample set, and the mean square error between the predicted sequence and the second data sequence is calculated as a loss function. The parameters of the initial neural network are then updated according to the loss function to obtain the data flow prediction model.
8. A DPU-based RDMA completion queue length adjustment device, comprising a processor, a memory, and a computer program / instructions stored in the memory, characterized in that, The processor is configured to execute the computer program / instructions, and when the computer program / instructions are executed, the device implements the steps of the method as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 7.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Communication method for reducing high-speed bus delay
CN109491809A
Packet granularity load balancing method and system
CN118764450A