Method and system for optimizing network application performance based on remote direct data access

By generating preset memory segments in network applications and creating requests for scheduling messages using weight-first queues, the problems of kernel interrupt pressure and RDMA memory copy overhead under high data traffic are solved, and system performance and message transmission efficiency are improved.

CN113626216BActive Publication Date: 2025-02-14JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110838304.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-23
Publication Date
2025-02-14
Estimated Expiration
2041-07-23

AI Technical Summary

Technical Problem

In the network environment where high data traffic is handled, the kernel is busy dealing with hardware interrupts, which affects the kernel's response to other requests. In RDMA technology, the memory copy overhead is large, affecting system performance.

Method used

By generating a preset number of memory segments and using a weight-based priority queue to receive and schedule message creation requests, we ensure that different types of messages obtain memory timing and response timeliness, reducing memory copy overhead.

Benefits of technology

It effectively controls memory usage and message transmission efficiency, reduces the system's total memory demand, and improves system performance and message transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113626216B_ABST
    Figure CN113626216B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for optimizing the performance of network applications based on remote direct data access, the method comprising: generating a memory space, wherein the memory space comprises a preset number of memory segments; in response to a business process triggering a message creation request, receiving the message creation request through a priority queue based on a weight, and enqueuing the message creation request into a priority queue based on a weight; dequeuing a message creation request from all the enqueued message creation requests in the priority queue based on a weight, and allocating a memory segment in the memory space for the dequeued message creation request; generating a message to be transmitted based on the allocated memory segment; transmitting the message to be transmitted based on remote direct data access, and releasing the allocated memory segment after the transmission of the message to be transmitted is completed. Through the scheme of the present invention, the timing and response time of different types of messages obtaining memory are effectively controlled, the memory copy overhead and the system's demand for the total amount of memory are reduced, and the system performance and message transmission efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of storage systems, and in particular to a method and system for optimizing network application performance based on remote direct data access. Background Art

[0002] The combination of TCP / IP protocol and Ethernet has become the mainstream network solution. Hardware manufacturers and operating system developers work together to provide continuous performance improvements to meet the needs of various business scenarios and explosive data growth. In Linux, the kernel interacts with the hardware through interrupts; the TCP / IP protocol stack, as an indispensable part of the kernel, runs in the kernel space, is responsible for parsing and controlling data flows, and submitting user data to the application layer. Before the TCP / IP protocol stack processes the message flow, any message flow from the hardware is first cached in the memory belonging to the kernel space. After any message flow from the hardware is stored in the aforementioned memory space, it will register an interrupt with the kernel to prompt the kernel that new data is ready. The hardware notifies the kernel through an interrupt that the data is ready, and the kernel needs to do some additional work for this. Nowadays, the data traffic on the network is getting larger and larger, and the frequency of network cards initiating interrupt requests to the kernel is also increasing, causing the kernel to be busy processing hardware interrupts and affecting the kernel's response to other requests. The introduction of the new NAPI has reduced the resource overhead of kernel context switching to a certain extent. But in fact, NAPI combines polling and interrupt mechanisms. When the data flow is small, it will degenerate into an interrupt mechanism; when the data flow is large, it will degenerate into a polling mechanism. Hardware manufacturers have introduced a multi-queue mechanism for network cards. Each queue carries some connection traffic. Combined with CPU affinity technology, all traffic is distributed to a specified set of CPU cores. But the problem still cannot be solved. The pressure on the kernel has not been reduced to an acceptable level. At the same time, the data stream still needs to be transmitted to the memory of the kernel space. Taking socket programming as an example, the TCP / IP protocol processes the data stream delivered by the hardware wrapped in the sk_buf structure. The TCP / IP protocol unpacks and distributes sk_buf according to the rules. Although the TCP / IP protocol stack uses clever programming techniques in the kernel to greatly reduce its memory copy overhead in the kernel, the final data must be presented in the user space, and the memory copy overhead from the kernel space to the user space cannot be avoided.

[0003] As a new network application development technology, RDMA represents the trend of future network application development. More and more projects are beginning to use the technical foundation of RDMA - user space driver as a tool to explore the performance potential of their respective projects. RDMA reduces the memory copy overhead of data by establishing a direct path between hardware and user space accessible memory, while reducing the context switch between user space and kernel space. RDMA technology requires user space to allocate memory in advance (denoted as CA, which can be directly accessed by user space) and bind it to the hardware. At any time, messages sent or received by hardware need to pass through CA, and before sending, a new memory space (denoted as NM) must be occupied to prepare (initialize) data, and then the data is copied from NM to CA, or after receiving a message, a new memory space (denoted as NM) must be occupied to store data, and the data is copied from CA to NM. In the storage software built on the basis of the RDMA-based network module, all message transmission processes will go through the process of copying from NM to MR. Each memory copy will consume a considerable amount of CPU cycles. Canceling this memory copy process will improve system performance to a certain extent. Summary of the invention

[0004] In view of this, the present invention proposes a method and system for optimizing the performance of network applications based on remote direct data access, which effectively controls the timing and response time of different types of messages obtaining memory, does not occupy the memory for a long time and does not cause the messages to be in a hungry state for a long time, reduces the memory copy overhead and the system's demand for the total amount of memory, and improves the system performance and message transmission efficiency.

[0005] Based on the above purpose, one aspect of an embodiment of the present invention provides a method for optimizing the performance of a network application based on remote direct data access, which specifically includes the following steps:

[0006] Generate a memory space, wherein the memory space includes a preset number of memory segments;

[0007] In response to a business process triggering a message creation request, receiving the message creation request through a weight-based priority queue, and enqueuing the message creation request into the weight-based priority queue;

[0008] Dequeueing a message creation request from all the enqueued message creation requests of the weight-based priority queue, and allocating a memory segment in the memory space for the dequeued message creation request;

[0009] Generate messages to be transmitted based on the allocated memory segment;

[0010] The message to be transmitted is transmitted based on remote direct data access, and after the transmission of the message to be transmitted is completed, the allocated memory segment is released.

[0011] In some embodiments, the weight-based priority queue comprises a plurality of first-in-first-out queues;

[0012] Enqueuing the message creation request into the weight-based priority queue includes: enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue.

[0013] In some implementations, the method further includes: configuring a message type and a priority level carried by the message type;

[0014] Enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue includes: enqueuing the message creation request into the first-in-first-out queue of the weight-based priority queue based on the priority carried by the message type in the message creation request.

[0015] In some implementations, dequeuing a message creation request from all enqueued message creation requests in the weight-based priority queue includes:

[0016] A message creation request is dequeued from all enqueued message creation requests of the weight-based priority queue according to a message scheduling mechanism of the weight-based priority queue.

[0017] In some implementations, dequeuing a message creation request from all enqueued message creation requests in the weight-based priority queue, and allocating a memory segment in the memory space for the dequeued message creation request comprises:

[0018] dequeueing a message creation request from all enqueued message creation requests of the weight-based priority queue;

[0019] It is determined whether there is an idle memory segment in the memory space. If there is an idle memory segment, the idle memory segment is allocated for the message creation request to be dequeued.

[0020] In some implementations, generating a memory space further includes:

[0021] Metadata corresponding to each memory segment is generated based on each memory segment, wherein the corresponding metadata includes status information of the memory segment.

[0022] In some implementations, releasing the allocated memory segment further includes:

[0023] The state information of the metadata corresponding to the memory segment is modified to be unoccupied.

[0024] In some implementations, generating a message to be transmitted based on the allocated memory segment includes:

[0025] The business process is driven to fill the allocated memory segment with data information to generate a message to be transmitted.

[0026] In some implementations, configuring a message type and a priority level carried by the message type includes:

[0027] Configure message types and the priorities they carry based on system architecture and functionality.

[0028] Another aspect of the embodiment of the present invention further provides a system for optimizing the performance of network applications based on remote direct data access, the system comprising:

[0029] A first generating module, wherein the first generating module is configured to generate a memory space, wherein the memory space includes a preset number of memory segments;

[0030] An enqueue module, the enqueue module being configured to respond to a business process triggering a message creation request, receive the message creation request through a weight-based priority queue, and enqueue the message creation request into the weight-based priority queue;

[0031] a dequeue module, the dequeue module being configured to dequeue a message creation request from all the enqueued message creation requests of the weight-based priority queue, and to allocate a memory segment in the memory space for the dequeued message creation request;

[0032] a second generating module, the second generating module being configured to generate a message to be transmitted based on the allocated memory segment;

[0033] A transmission module, wherein the transmission module is configured to transmit the message to be transmitted based on remote direct data access, and release the allocated memory segment after the transmission of the message to be transmitted is completed.

[0034] In some embodiments, the weight-based priority queue comprises a plurality of first-in-first-out queues;

[0035] Enqueuing the message creation request into the weight-based priority queue includes: enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue.

[0036] In some implementations, the system further includes a configuration module, the configuration module being configured to: configure a message type and a priority level carried by the message type;

[0037] Enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue includes: enqueuing the message creation request into the first-in-first-out queue of the weight-based priority queue based on the priority carried by the message type in the message creation request.

[0038] In some implementations, dequeuing a message creation request from all enqueued message creation requests in the weight-based priority queue includes:

[0039] A message creation request is dequeued from all enqueued message creation requests of the weight-based priority queue according to a message scheduling mechanism of the weight-based priority queue.

[0040] In some implementations, dequeuing a message creation request from all enqueued message creation requests in the weight-based priority queue, and allocating a memory segment in the memory space for the dequeued message creation request comprises:

[0041] dequeueing a message creation request from all enqueued message creation requests of the weight-based priority queue;

[0042] It is determined whether there is an idle memory segment in the memory space. If there is an idle memory segment, the idle memory segment is allocated for the message creation request to be dequeued.

[0043] In some embodiments, the first generation module further includes a first generation submodule;

[0044] The first generating submodule is configured to: generate metadata corresponding to each memory segment based on each memory segment, wherein the corresponding metadata includes status information of the memory segment.

[0045] In some implementations, releasing the allocated memory segment further includes:

[0046] The state information of the metadata corresponding to the memory segment is modified to be unoccupied.

[0047] In some embodiments, the second generation module is further configured to:

[0048] The business process is driven to fill the allocated memory segment with data information to generate a message to be transmitted.

[0049] In some embodiments, the configuration module is further configured to:

[0050] Configure message types and the priorities they carry based on system architecture and functionality.

[0051] According to another aspect of an embodiment of the present invention, a computer device is provided, comprising: at least one processor; and a memory, wherein the memory stores a computer program executable on the processor, and the computer program implements the steps of the above method when executed by the processor.

[0052] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which stores a computer program that implements the above method steps when executed by a processor.

[0053] The present invention has the following beneficial technical effects: by uniformly managing the memory space for remote direct data access, messages are directly initialized and transmitted using the memory space, thereby reducing the total memory demand and the overhead of memory copying, and scheduling message creation requests for memory applications through a weight-based priority queue, thereby effectively controlling the timing and response time for different types of messages to obtain memory, preventing the memory from being occupied for a long time and preventing messages from being in a hungry state for a long time, thereby improving system performance and message transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.

[0055] Figure 1 A block diagram of an embodiment of a method for optimizing network application performance based on remote direct data access provided by the present invention;

[0056] Figure 2 A schematic diagram of an embodiment of a system for optimizing the performance of network applications based on remote direct data access provided by the present invention. DETAILED DESCRIPTION

[0057] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0058] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.

[0059] Based on the above objectives, the first aspect of the embodiments of the present invention provides an embodiment for optimizing the performance of network applications based on remote direct data access. Figure 1 As shown, it includes the following steps:

[0060] Step S101, generating a memory space, wherein the memory space includes a preset number of memory segments;

[0061] Step S103: In response to a business process triggering a message creation request, receiving the message creation request through a weight-based priority queue, and enqueuing the message creation request into the weight-based priority queue;

[0062] Step S105, dequeueing a message creation request from all the enqueued message creation requests in the weight-based priority queue, and allocating a memory segment in the memory space to the dequeued message creation request;

[0063] Step S107: Generate a message to be transmitted based on the allocated memory segment;

[0064] Step S109: transmitting the message to be transmitted based on remote direct data access, and releasing the allocated memory segment after the transmission of the message to be transmitted is completed.

[0065] Specifically, a memory space CA is allocated, the size of the memory space is set to the total amount of memory that can meet the demand, and the memory space is divided into N memory segments, and a memory segment becomes a chunk. The memory space can be represented as CA = {C1, C2, C n , …, C N}, CA contains N chunks, C n Indicates the nth chunk in CA, C N Represents the Nth chunk in CA, where 1≤n≤N.

[0066] When the system's business process triggers a message creation request, the message creation request is received through a weighted priority queue (WPQ), and the message creation request is queued in the WPQ. At the same time, the next message creation request to be processed is determined from all queued message creation requests in the WPQ.

[0067] WPQ uses priority as the main reference dimension to schedule the acquisition of the next message. Compared with other priority queues, WPQ can better improve the probability of low-priority message types being processed, so that low-priority message types will not be in a starvation state for a long time when the system is flooded with a large number of high-priority messages.

[0068] A memory segment in the memory space is allocated for a message creation request to be dequeued. After the memory segment is allocated, the message creation request is initialized on the memory segment to generate a message to be transmitted. Based on Remote Direct Memory Access (RDMA), the message to be transmitted is sent to the destination or the message to be transmitted is received and stored in the memory segment. After the message sending or receiving operation is completed, the system is notified that the operation is completed. The system releases the space of the memory segment according to the received operation completion information.

[0069] By uniformly managing the memory space accessed by RDMA, messages are directly initialized and transmitted using the memory space, which reduces the total memory demand and the overhead of memory copying. In addition, WPQ is used to schedule message creation requests for memory applications, effectively controlling the timing and response time of different types of messages obtaining memory. This prevents memory from being occupied for a long time and prevents messages from being in a starved state for a long time, thereby improving system performance and message transmission efficiency.

[0070] In some embodiments, the weight-based priority queue comprises a plurality of first-in-first-out queues;

[0071] Enqueuing the message creation request into the weight-based priority queue includes: enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue.

[0072] In some implementations, the method further includes: configuring a message type and a priority level carried by the message type;

[0073] Enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue includes: enqueuing the message creation request into the first-in-first-out queue of the weight-based priority queue based on the priority carried by the message type in the message creation request.

[0074] In some implementations, dequeuing a message creation request from all enqueued message creation requests in the weight-based priority queue includes:

[0075] A message creation request is dequeued from all enqueued message creation requests of the weight-based priority queue according to a message scheduling mechanism of the weight-based priority queue.

[0076] In some implementations, dequeuing a message creation request from all enqueued message creation requests in the weight-based priority queue, and allocating a memory segment in the memory space for the dequeued message creation request comprises:

[0077] dequeueing a message creation request from all enqueued message creation requests of the weight-based priority queue;

[0078] It is determined whether there is an idle memory segment in the memory space. If there is an idle memory segment, the idle memory segment is allocated for the message creation request to be dequeued.

[0079] In some implementations, generating a memory space further includes:

[0080] Metadata corresponding to each memory segment is generated based on each memory segment, wherein the corresponding metadata includes status information of the memory segment.

[0081] In some implementations, releasing the allocated memory segment further includes:

[0082] The state information of the metadata corresponding to the memory segment is modified to be unoccupied.

[0083] In some implementations, generating a message to be transmitted based on the allocated memory segment includes:

[0084] The business process is driven to fill the allocated memory segment with data information to generate a message to be transmitted.

[0085] In some implementations, configuring a message type and a priority level carried by the message type includes:

[0086] Configure message types and the priorities they carry based on system architecture and functionality.

[0087] Several implementation modes of the present invention are described below based on specific examples.

[0088] First, after the memory space is generated and divided into chunks, the metadata describing the status of each chunk is defined. UA is used to represent the metadata set corresponding to the chunk in CA.

[0089] UA={U 1rw , U 2rw , U nrw ,…,U Nrw}

[0090] The meta in UA corresponds to the chunk in CA. UA contains N meta. nrw Indicates the meta corresponding to the nth chunk, where r indicates whether it is occupied by reading, and w indicates whether it is occupied by writing. Both r and w indicate the status. Reading and writing cannot occupy the same chunk at the same time. The value can only be 0 or 1. 0 indicates not occupied, and 1 indicates occupied. 201 Indicates the second element in UA, describing the status information of the second chunk in CA, U 201 Indicates that the write of the current chunk is occupied.

[0091] At the same time, all message types and their corresponding priorities used in the storage software are configured in advance to initialize the WPQ capability. The message types and their corresponding priorities can be solidified through configuration files or in the code.

[0092] Let QA represent an instance of WPQ, QA = {Q1, Q2, Q m , …, Q M}.

[0093] Each Q in QA represents a FIFO queue (first-in-first-out queue). QA contains M Qs. The subscript m represents the priority value of the corresponding Q, that is, the priority of all FIFO queues contained in QA, 1≤m≤M. A message creation request of a message type with a priority of m is denoted as D mi , where i represents the sequence number of the message creation request.

[0094] Any message that needs to apply for CA first triggers the message creation request D mi , D mi It will enter QA, and according to its priority value m, D mi Will enter Q m , this process is called enqueuing,

[0095] Q m ←D mi

[0096] At the same time, QA will decide the next message to be processed from all Qs. This process is called dequeuing. If the message dequeued is D {32}{98} ,

[0097] Q 32 →D {32}{98}

[0098] Query the CA for available chunks, i.e. chunks with r and w both set to 0. If there are no free chunks, wait until a free chunk is available. If a free chunk is found, its number is 1024, and the message D is sent. {32}{98} In this C 1024 Initialize it, denoted as U {1024}01 (write operation) or U {1024}01 (Read operation). At this point, the enqueue and dequeue operations of a message are completed, and the dequeue and enqueue operations can be performed at the same time.

[0099] RDMA Send C 1024 The data carried is sent to the destination (write operation) or the data is received and stored in C 1024 (read operation) and inform the network application that the operation is completed. The system knows C 1024 Used up, recycled 1024 The storage space and modify its corresponding status information to U {1024}00 .

[0100] Through the solution of the present invention, messages are directly initialized and transmitted using the memory space, which reduces the total memory requirement, reduces the memory copy overhead, and effectively controls the timing and response time of different types of messages obtaining memory. The memory will not be occupied for a long time and the messages will not be in a hungry state for a long time, thereby improving system performance and message transmission efficiency.

[0101] Based on the same inventive concept, according to another aspect of the present invention, Figure 2 As shown, an embodiment of the present invention further provides a system for optimizing network application performance based on remote direct data access, the system comprising:

[0102] A first generating module 110, wherein the first generating module 110 is configured to generate a memory space, wherein the memory space includes a preset number of memory segments;

[0103] An enqueue module 120, wherein the enqueue module 120 is configured to receive the message creation request through a weight-based priority queue in response to a business process triggering a message creation request, and enqueue the message creation request in the weight-based priority queue;

[0104] A dequeue module 130, wherein the dequeue module 130 is configured to dequeue a message creation request from all the enqueued message creation requests in the weight-based priority queue, and allocate a memory segment in the memory space for the dequeued message creation request;

[0105] A second generating module 140, wherein the second generating module 140 is configured to generate a message to be transmitted based on the allocated memory segment;

[0106] The transmission module 150 is configured to transmit the message to be transmitted based on remote direct data access, and release the allocated memory segment after the transmission of the message to be transmitted is completed.

[0107] In some embodiments, the weight-based priority queue comprises a plurality of first-in-first-out queues;

[0108] Enqueuing the message creation request into the weight-based priority queue includes: enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue.

[0109] In some implementations, the system further includes a configuration module, the configuration module being configured to: configure a message type and a priority level carried by the message type;

[0110] Enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue includes: enqueuing the message creation request into the first-in-first-out queue of the weight-based priority queue based on the priority carried by the message type in the message creation request.

[0111] In some implementations, dequeuing a message creation request from all enqueued message creation requests in the weight-based priority queue includes:

[0112] A message creation request is dequeued from all enqueued message creation requests of the weight-based priority queue according to a message scheduling mechanism of the weight-based priority queue.

[0113] In some implementations, dequeuing a message creation request from all enqueued message creation requests in the weight-based priority queue, and allocating a memory segment in the memory space for the dequeued message creation request comprises:

[0114] dequeueing a message creation request from all enqueued message creation requests of the weight-based priority queue;

[0115] It is determined whether there is an idle memory segment in the memory space. If there is an idle memory segment, the idle memory segment is allocated for the message creation request to be dequeued.

[0116] In some embodiments, the first generation module further includes a first generation submodule;

[0117] The first generating submodule is configured to: generate metadata corresponding to each memory segment based on each memory segment, wherein the corresponding metadata includes status information of the memory segment.

[0118] In some implementations, releasing the allocated memory segment further includes:

[0119] The state information of the metadata corresponding to the memory segment is modified to be unoccupied.

[0120] In some embodiments, the second generation module is further configured to:

[0121] The business process is driven to fill the allocated memory segment with data information to generate a message to be transmitted.

[0122] In some embodiments, the configuration module is further configured to:

[0123] Configure message types and the priorities they carry based on system architecture and functionality.

[0124] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer device, which includes a processor and a memory, wherein the memory stores a computer program that can be run on the processor, and the processor executes the steps of the above method when executing the program.

[0125] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program that performs the above method when executed by a processor.

[0126] Finally, it should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium of the program can be a disk, an optical disk, a read-only storage memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding above-mentioned arbitrary method embodiments.

[0127] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0128] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.

[0129] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0130] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0131] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A method for optimizing the performance of a network application based on remote direct data access, characterized in that: include: Generate a memory space, wherein the memory space includes a preset number of memory segments; In response to a business process triggering a message creation request, receiving the message creation request through a weight-based priority queue, and enqueuing the message creation request into the weight-based priority queue; Dequeueing a message creation request from all the enqueued message creation requests of the weight-based priority queue, and allocating a memory segment in the memory space for the dequeued message creation request; Generate messages to be transmitted based on the allocated memory segment; Transmitting the message to be transmitted based on remote direct data access, and releasing the allocated memory segment after the transmission of the message to be transmitted is completed; Wherein, the weight-based priority queue includes a plurality of first-in-first-out queues; Enqueuing the message creation request into the weight-based priority queue, comprising: enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue; Configure message types and the priorities carried by the message types; Enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue includes: enqueuing the message creation request into the first-in-first-out queue of the weight-based priority queue based on the priority carried by the message type in the message creation request.

2. The method according to claim 1, characterized in that Dequeuing a message creation request from all enqueued message creation requests of the weight-based priority queue comprises: A message creation request is dequeued from all enqueued message creation requests of the weight-based priority queue according to a message scheduling mechanism of the weight-based priority queue.

3. The method according to claim 1, characterized in that Dequeuing a message creation request from all the enqueued message creation requests of the weight-based priority queue, and allocating a memory segment in the memory space for the dequeued message creation request, comprising: dequeueing a message creation request from all enqueued message creation requests of the weight-based priority queue; It is determined whether there is an idle memory segment in the memory space. If there is an idle memory segment, the idle memory segment is allocated for the message creation request to be dequeued.

4. The method according to claim 1, characterized in that Generate memory space, also includes: Metadata corresponding to each memory segment is generated based on each memory segment, wherein the corresponding metadata includes status information of the memory segment.

5. The method according to claim 4, characterized in that Releasing the allocated memory segment further comprises: The state information of the metadata corresponding to the memory segment is modified to be unoccupied.

6. The method according to claim 1, characterized in that Generating a message to be transmitted based on the allocated memory segment includes: The business process is driven to fill the allocated memory segment with data information to generate a message to be transmitted.

7. The method according to claim 1, characterized in that Configure the message type and the priority carried by the message type, including: Configure message types and the priorities they carry based on system architecture and functionality.

8. A system for optimizing the performance of network applications based on remote direct data access, characterized in that: include: A first generating module, wherein the first generating module is configured to generate a memory space, wherein the memory space includes a preset number of memory segments; An enqueue module, the enqueue module being configured to respond to a business process triggering a message creation request, receive the message creation request through a weight-based priority queue, and enqueue the message creation request into the weight-based priority queue; A dequeue module, the dequeue module being configured to dequeue a message creation request from all the enqueued message creation requests of the weight-based priority queue, and to allocate a memory segment in the memory space for the dequeued message creation request; a second generating module, the second generating module being configured to generate a message to be transmitted based on the allocated memory segment; A transmission module, wherein the transmission module is configured to transmit the message to be transmitted based on remote direct data access, and release the allocated memory segment after the transmission of the message to be transmitted is completed; Wherein, the weight-based priority queue includes a plurality of first-in-first-out queues; Enqueuing the message creation request into the weight-based priority queue, comprising: enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue; Configure message types and the priorities carried by the message types; Enqueuing the message creation request into a first-in-first-out queue of the weight-based priority queue includes: enqueuing the message creation request into the first-in-first-out queue of the weight-based priority queue based on the priority carried by the message type in the message creation request.

Citation Information

Patent Citations

  • Apparatus, system, and method for managing commands of solid-state storage using bank interleave

    CN101646994A

  • Information caching method, device and communication apparatus

    CN103647807A