Storage optimization method and device, equipment and storage medium
By modifying the memory manager configuration, the registered memory used by the remote direct memory access memory pool is modified into storage performance development toolkit memory, and the data is directly submitted to the SPDK NVMe driver, which solves the resource waste and performance impact caused by data copying and improves system performance.
Patent Information
- Application Number
- CN202412000440.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-31
AI Technical Summary
When using SPDK NVMe driver, the data stored in normal memory needs to be copied to SPDK memory in NVME Device first, resulting in wasting system resources and affecting performance.
By modifying the configuration of the memory manager, the registered memory used by the remote direct memory access memory pool is modified into the storage performance development kit memory, and the data is directly submitted to the storage performance development kit non-volatile memory interface driver to reduce the copy process and the number of interrupts.
Reduces CPU usage and the number of context switches, saves system resources, and improves the performance of the storage system.
Smart Images

Figure CN119807092A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a storage optimization method, device, equipment and storage medium. Background Art
[0002] With the rapid development of technologies such as artificial intelligence, big data, and cloud computing, the demand for computing power and storage optimization has increased dramatically, and the importance of high-performance computing and large-scale storage optimization systems has become increasingly prominent. Traditional disk-based storage systems have been unable to meet the needs of modern applications due to their inherent concurrency and latency issues. To this end, new storage media such as NAND FLASH (Not AND Flash Memory) and storage interfaces such as NVMe (Non-Volatile Memory Express) have gradually become mainstream. As a high-performance interface designed for SSDs (Solid State Drives), NVMe significantly improves the performance of storage systems by supporting multiple I / O queues and optimizing the parallelism of flash chip levels, becoming one of the core technologies of high-performance storage systems.
[0003] However, the storage system implemented based on the user-mode NVMe driver (such as the NVMe driver provided by SPDK (Storage Performance Development Kit)) avoids excessive context switching overhead and reduces resource competition in the I / O process through the event framework. However, since the SPDK memory used by the user-mode driver is not consistent with the ordinary memory of the local storage system, when using the SPDK NVMe driver, the data stored in the ordinary memory needs to be copied to the SPDK memory in the NVME Device first before submitting the data to the SPDK NVMe driver for use, resulting in a waste of system resources and affecting performance. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a storage optimization method, device, equipment and storage medium to solve the problem that when using the SPDK NVMe driver, the data stored in the ordinary memory needs to be copied to the SPDK memory in the NV ME Device before submitting the data to the SPDK NVMe driver for use, resulting in a waste of system resources and affecting performance. The specific technical solution is as follows:
[0005] In a first aspect of the present invention, a storage optimization method is provided, the method comprising:
[0006] Obtaining an initial configuration of a memory manager, the memory manager being used to manage a remote direct memory access memory pool, the remote direct memory access memory pool using a registered memory;
[0007] By modifying the initial configuration, the registered memory used by the remote direct memory access memory pool is modified to the storage performance development toolkit memory;
[0008] Acquire storage data of the remote direct memory access memory pool;
[0009] transferring the storage data to a plurality of preset buffers of a non-volatile memory interface device;
[0010] Acquire memory data including the stored data in a plurality of the preset buffers, and determine the source of the memory data in any of the preset buffers;
[0011] If the memory data in the preset buffer comes from the memory of the storage performance development toolkit, the memory data in the preset buffer is submitted to the non-volatile memory interface driver of the storage performance development toolkit.
[0012] Optionally, the transmitting the storage data to a plurality of preset buffers of a non-volatile memory interface device includes:
[0013] Obtaining the data volume of the stored data;
[0014] If the data amount meets the preset condition, the stored data is transmitted to a number of preset buffers of the non-volatile memory interface device;
[0015] If the data volume does not meet the preset condition, obtaining the target data from the common memory;
[0016] The target data and the storage data are transmitted together to a plurality of preset buffers of a non-volatile memory interface device.
[0017] Optionally, after acquiring the memory data including the stored data in the plurality of preset buffers and determining the source of the memory data in any of the preset buffers, the method further includes:
[0018] Based on a plurality of preset buffers in the non-volatile memory interface device, generating an initial buffer chain list of the non-volatile memory interface device;
[0019] If the memory data in any of the preset buffers comes from the common memory, a memory block allocator is set in the storage performance development toolkit;
[0020] Allocating a plurality of first target memory blocks of preset sizes from the memory of the storage performance development toolkit through the memory block allocator;
[0021] Copying the memory data in the preset buffer to the first target memory block;
[0022] If any of the memory data comes from the memory of the storage performance development toolkit, determining a preset buffer corresponding to the memory data as a target buffer;
[0023] Based on the target buffer and the first target memory block, generate a new buffer linked list;
[0024] Sending the new buffer linked list to a storage performance development toolkit, wherein the storage performance development toolkit is provided with input and output interface functions;
[0025] The corresponding memory data in the new buffer linked list is submitted to the non-volatile memory interface driver of the storage performance development toolkit through the input and output interface function.
[0026] Optionally, if the data amount does not meet the preset condition, obtaining target data from a common memory includes:
[0027] If the data amount is less than a preset value or is not equal to an integer multiple of the preset value, taking a modulus of the data amount and the preset value to obtain a modulo data amount;
[0028] Obtaining a target difference value through the modulo data amount and the preset value;
[0029] The target data is obtained from the common memory through the target difference.
[0030] Optionally, the modifying the initial configuration to modify the registered memory used by the remote direct memory access memory pool to the storage performance development toolkit memory includes:
[0031] Pre-allocating a second target memory block to be allocated in the memory of the storage performance development toolkit;
[0032] Setting a memory allocation pointer in the memory manager;
[0033] Acquire the memory address of the second target memory block through the memory allocation pointer;
[0034] The remote direct memory access memory pool is controlled to use the second target memory block of the storage performance development toolkit through the memory address.
[0035] Optionally, after setting the memory allocation pointer in the memory manager, the method further includes:
[0036] Setting a memory release pointer in the memory manager;
[0037] When it is determined that the second target memory block has finished being used, obtaining a memory address of the second target memory block through the memory release pointer;
[0038] The second target memory block is released through the memory address.
[0039] Optionally, after obtaining the initial configuration of the memory manager, the method further includes:
[0040] Acquire a component related to a buffer chain list, wherein the component of the buffer chain list manages a buffer in a remote direct memory access memory pool and a non-volatile memory interface device, wherein the buffer includes a preset buffer of the non-volatile memory interface device;
[0041] Adding a Boolean flag component to the components of the buffer linked list;
[0042] When the data in the buffer comes from the memory of the storage performance development toolkit, setting a Boolean flag with a value of a first Boolean value in the buffer by a Boolean flag component;
[0043] When the data in the buffer area comes from a common memory, a Boolean flag whose value is set to a second Boolean value is set in the buffer area through a Boolean flag component.
[0044] In a second aspect of the present invention, a storage optimization device is provided, comprising:
[0045] A first acquisition module is used to acquire an initial configuration of a memory manager, wherein the memory manager is used to manage a remote direct memory access memory pool, and the remote direct memory access memory pool uses a registered memory;
[0046] A configuration modification module, configured to modify the registered memory used by the remote direct memory access memory pool to a storage performance development toolkit memory by modifying the initial configuration;
[0047] A second acquisition module, used for acquiring storage data of the remote direct memory access memory pool;
[0048] A transmission module, used for transmitting the storage data to a plurality of preset buffers of a non-volatile memory interface device;
[0049] A third acquisition module, used for acquiring memory data including the stored data in a plurality of the preset buffers, and determining a source of the memory data in any of the preset buffers;
[0050] A data submission module is used to submit the memory data in the preset buffer to the non-volatile memory interface driver of the storage performance development toolkit if the memory data in the preset buffer comes from the storage performance development toolkit memory.
[0051] In a third aspect of the implementation of the present invention, there is also provided a communication device, comprising: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor;
[0052] The processor is used to read the program in the memory to implement any of the above-mentioned storage optimization methods.
[0053] In a fourth aspect of the implementation of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute any of the above-mentioned storage optimization methods.
[0054] The storage optimization method provided by the embodiment of the present invention obtains the initial configuration of the memory manager, the memory manager is used to manage the remote direct memory access memory pool, the remote direct memory access memory pool uses the registered memory, and by modifying the initial configuration, the registered memory used by the remote direct memory access memory pool is modified to the storage performance development toolkit memory; so that the data is stored in the storage performance development toolkit memory when passing through the remote direct memory access memory pool, the storage data of the remote direct memory access memory pool is obtained, the storage data is transmitted to several preset buffers of the non-volatile memory interface device, the memory data including the storage data in the several preset buffers is obtained, and the source of the memory data in any preset buffer is determined; if the memory data in the preset buffer comes from the storage performance development toolkit memory, the memory data in the preset buffer is submitted to the storage performance development toolkit non-volatile memory interface driver, thereby reducing the copy process, thereby reducing the number of interrupts, the number of context switches and the CPU usage rate. In the embodiment of the present invention, the memory used by the remote direct memory access memory pool is modified so that the remote direct memory access memory pool uses the memory from the storage performance development toolkit, and the source of the memory data of the non-volatile memory interface device is determined so that the memory from the storage performance development toolkit can be directly submitted to the non-volatile memory interface driver of the storage performance development toolkit, thereby reducing copy operations, lowering CPU usage, saving system resources, and improving performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below.
[0056] Figure 1A schematic diagram of using SPDK NVMe driver for related technology;
[0057] Figure 2 Another schematic diagram of using SPDK NVMe driver for related technology;
[0058] Figure 3 This is the relevant flow chart for the scenario of remote direct memory access memory pool + CNC separation;
[0059] Figure 4 Improved the flow chart for the scenario of remote direct memory access memory pool + CNC separation;
[0060] Figure 5 A flowchart of a storage optimization method provided by an embodiment of the present invention;
[0061] Figure 6 yes Figure 5 A schematic diagram of a memory manager after configuration modification in a storage optimization method provided by an embodiment of the present invention is shown;
[0062] Figure 7 yes Figure 5 The flowchart of allocating memory through a memory allocation pointer in a storage optimization method provided by an embodiment of the present invention is shown;
[0063] Figure 8 yes Figure 5 The flowchart of releasing memory through a memory release pointer in a storage optimization method provided by an embodiment of the present invention is shown;
[0064] Fig. 9 yes Figure 5 A schematic diagram of components of a modified buffer linked list in a storage optimization method provided by an embodiment of the present invention is shown;
[0065] Fig.10 yes Figure 5 The flowchart of memory source determination of a constructor in a storage optimization method provided by an embodiment of the present invention is shown;
[0066] Fig.11 yes Figure 5 A schematic diagram of a modified non-volatile memory interface device in a storage optimization method provided by an embodiment of the present invention is shown;
[0067] Fig.12 yes Figure 5 The illustrated embodiment of the present invention provides a non-volatile memory interface device in a storage optimization method provided by the copy-free flow chart;
[0068] Fig.13 is a structural schematic diagram of a fault handling device provided by an embodiment of the present invention;
[0069] Fig.14 It is a structural diagram of a communication device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0070] To make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.
[0071] Currently when using the Storage Performance Development Kit Non-Volatile Memory Interface (SPDK NVMe) driver, such as Figure 1 As shown in the example, only the storage performance development kit memory can be used, and the data stored in the ordinary memory cannot be directly used. For ordinary memory, the data on it needs to be copied to the storage performance development kit memory in the non-volatile memory interface device (NVMEDevice) of the Ceph storage system block device before the SPDK NVMe driver can submit the data to the NVMEDevice, as shown in the following example: Figure 2 The embodiment of the present invention is applied to the scenario of remote direct memory access memory pool + numerical control separation. The relevant process is as follows Figure 3 As shown, the remote direct memory access memory pool uses registered memory to store data. RDMA registered memory allows the network adapter (RNIC) to directly access the memory without the CPU participating in data transmission, thereby releasing CPU resources for computing tasks. In the scenario of remote direct memory access memory pool + CNC separation, ordinary memory will also be used. In non-critical paths (such as logging, metadata management, and control information transmission), the performance overhead of ordinary memory is acceptable, and there is no need to use registered memory. The registered memory and ordinary memory are managed by OSD+BlueStore in the Ceph storage system, and then the data in the registered memory and the data in the ordinary memory are sent to the non-volatile memory interface device (NVMEDevice). In NVMEDevice, the data using the registered memory and the ordinary memory need to be copied to the storage performance development toolkit memory, and then the SPDK NVMe driver uses the data in the storage performance development toolkit memory. However, a large amount of data is usually stored in the registered memory, so when copying, the CPU utilization rate will increase, affecting system performance. Therefore, the embodiment of the present invention improves the above process, such as Figure 4 As shown, the registered memory used by the remote direct memory access memory pool is modified to the storage performance development toolkit memory, and the storage performance development toolkit memory and ordinary memory used by the remote direct memory access memory pool are managed through OSD+BlueStore in the Ceph storage system. A judgment process and a copy-free process are added to NVMEDevice. Because the data output in the remote direct memory access memory pool uses the storage performance development toolkit memory, the copy-free process can be used and directly provided to the SPDK NVMe driver, thereby reducing the CPU utilization and improving the system performance. Therefore, a storage optimization method is provided in an embodiment of the present invention. Refer to Figure 5 , shows a flowchart of the steps of a storage optimization method provided by an embodiment of the present invention, the method may include:
[0072] Step 101, obtaining the initial configuration of a memory manager, the memory manager is used to manage a remote direct memory access memory pool, and the remote direct memory access memory pool uses a registered memory.
[0073] The memory manager in the embodiment of the present invention refers to the Memory Manager, which is used to manage the remote direct memory access memory pool. For example, the memory manager can be responsible for allocating the memory blocks required for the remote direct memory access memory pool RDMA (Remote Direct Memory Access); the memory manager can work with the remote direct memory access memory pool driver to ensure that the memory meets the registration requirements and registers the memory allocated for the remote direct memory access memory pool to the RDMA hardware; the memory manager can also use the buddy allocator to manage large blocks of memory in the RDMA memory pool. Among them, the initial configuration of the memory manager may include multiple allocation algorithms (such as Buddy Allocator, sla b allocator, etc.), and these allocation algorithms are used to manage the RDMA memory pool.
[0074] Remote Direct Memory Access (RDMA) memory pool is a network communication technology that allows computers to directly access remote memory without CPU involvement. Typically, RDMA memory pools are used in conjunction with registered memory to achieve high performance. However, this setting requires a large number of copies when the SPDK NVMe driver is used later, affecting system performance. Therefore, the memory used by the RDMA memory pool needs to be modified. To achieve this goal, the memory manager can be modified.
[0075] Step 102 : By modifying the initial configuration, the registered memory used by the remote direct memory access memory pool is modified to the storage performance development toolkit memory.
[0076] The embodiment of the present invention modifies the initial configuration of the memory manager (Buddy Allocator) to obtain a memory manager including a new configuration, for example, Figure 6 As shown in the figure, in the new configuration of the memory manager, there is a memory pool BuddyPool based on the Buddy Allocator implementation, which includes the Buddy Allocator. An interface function, set_cb(), is set in the Buddy Allocator to provide the spdk_malloc() function address and spdk_free() function address to the BuddyAllocator after the SPDK environment is initialized. Then, a memory allocation pointer malloc_cb* and a memory release pointer free_cb* are added. malloc_cb* can receive the spdk_malloc() function address, and free_cb* can receive the spdk_free() function address. The original functions mem_alloc() and mem_free() in the Buddy Allocator are retained. However, the use of mem_alloc() and mem_free() is conditionally restricted.
[0077] The set spdk_malloc() function address can obtain the memory address of the memory of the storage performance development toolkit. This memory can be pre-allocated for the remote direct memory access memory pool. By obtaining the memory address, the remote direct memory access memory pool can find the available memory space. The specific steps include:
[0078] Pre-allocating a second target memory block to be allocated in the memory of the storage performance development toolkit;
[0079] Set the memory allocation pointer in the memory manager;
[0080] Obtain the memory address of the second target memory block through the memory allocation pointer;
[0081] Controls the remote direct memory access memory pool using the Storage Performance Development Kit's second target memory block by memory address.
[0082] Through the above settings, the remote direct memory access memory pool can directly use the storage performance development toolkit memory, avoiding subsequent copy operations, reducing CPU usage, and improving system performance.
[0083] Furthermore, the memory allocated to the remote direct memory access memory pool is dynamic. When the remote direct memory access memory pool does not need to use this part of the memory, a memory allocation pointer can be set in the memory manager, and then the memory address is obtained again through the memory allocation pointer to find the corresponding memory space and release the memory space. The specific steps include:
[0084] Set the memory release pointer in the memory manager;
[0085] When it is determined that the second target memory block has finished being used, obtaining a memory address of the second target memory block through a memory release pointer;
[0086] The second target memory block is released through the memory address.
[0087] The above settings can flexibly allocate and release the memory of the Storage Performance Development Toolkit. After use, the memory can be released to avoid memory leaks. Efficient memory management can reduce memory usage and improve the overall performance and response speed of the system. In addition, the memory release pointer and clear release steps simplify the logic of memory management and reduce the complexity of the code.
[0088] It should be noted that after the above modifications, when the memory manager allocates memory, Figure 7 As shown, first determine whether the memory allocation pointer is empty. If it is not empty, allocate memory through the memory allocation pointer. At this time, the memory belongs to the second target memory block to be allocated in the memory of the storage performance development toolkit. If it is empty, it means that the storage performance development toolkit has not allocated memory to the remote direct memory access memory pool. At this time, the Buddy Allocator of the memory manager allocates registered memory through the original process. When the memory manager releases memory, such as Figure 8 As shown, first determine whether the memory release pointer is empty. If it is not empty, the memory is released through the memory release pointer. If it is empty, the Buddy Allocator of the memory manager releases the memory through the original process.
[0089] Step 103, obtaining storage data of the remote direct memory access memory pool.
[0090] In the embodiment of the present invention, after modifying the memory used by the remote direct memory access memory pool, the stored data therein can be obtained. The stored data can be of different types according to different scenarios and requirements. For example, in a distributed storage system (such as a distributed file system, object storage, or database), the stored data of the RDMA memory pool is usually file blocks, object data, or database records.
[0091] In HPC or distributed computing, the storage data of the RDMA memory pool is usually data transmitted over the network (such as messages, tasks, and calculation results). In distributed file systems or object storage, the storage data of the RDMA memory pool is usually metadata such as file indexes, object metadata, and directory structures.
[0092] Step 104 : transferring the storage data to a plurality of preset buffers of the non-volatile memory interface device.
[0093] Non-volatile memory technology can use PCIe to connect SSD storage directly to a server or central processing unit (CPU). With a significant increase in performance, NVMe technology has become the preferred data storage / transfer option for gamers, video editors, and other users who need more performance than SAS or SATA HDDs. And PCIe connections are wider and have more bandwidth than SAS or SATA ports. It also improves with each generation, with twice the bandwidth of the previous generation. SAS and SATA have much lower bandwidth connections and are fixed, so they don't improve over time. Another feature that makes PCIe connections stand out is that they are scalable in "lanes", so even within the same generation, users can double the bandwidth with twice the number of lanes. NVMe drives can provide higher speeds than SAS or SATA drives because they can send and receive NVMe commands faster and provide better throughput. NVMe is widely seen as a more compatible option than SAS / SATA and is frequently updated with the development of rapidly evolving key technologies such as AI, ML, and cloud computing. NVMe technology can work seamlessly with all modern operating systems, including mobile phones, laptops, and game consoles.
[0094] Because the non-volatile memory interface driver of the storage performance development toolkit can only directly use the data in the storage performance development toolkit memory, the data that is not in the storage performance development toolkit memory needs to be converted through the non-volatile memory interface device, and the data of the ordinary memory or registered memory is first stored in the storage performance development toolkit memory, and then used by the non-volatile memory interface driver of the storage performance development toolkit. Therefore, the storage data is transferred to the non-volatile memory interface device.
[0095] In the process of transferring storage data to the non-volatile memory interface device, the transferred data will be managed by OSD+Blu eStore. During the transfer, the performance of the non-volatile memory interface device (NVMe device) will also be improved. By judging whether the amount of data meets the preset conditions and supplementing the insufficient data from the ordinary memory, the efficiency and alignment of data transmission can be ensured. The specific steps include:
[0096] Get the amount of stored data;
[0097] If the data volume meets the preset conditions, the storage data is transferred to a number of preset buffers of the non-volatile memory interface device;
[0098] If the data volume does not meet the preset conditions, the target data is obtained from the ordinary memory;
[0099] The target data and the storage data are transmitted together to a plurality of preset buffers of the non-volatile memory interface device.
[0100] The preset condition may be equal to a preset value or an integer multiple thereof. The preset value is usually aligned with a block size or a buffer size of a non-volatile memory interface device (such as an NVMe device). Ordinary memory is used to supplement the insufficient amount of data to ensure that the size of the transmitted data block meets the preset condition. The buffer is an area used by the storage device to temporarily store data.
[0101] The above method can improve the performance of storage devices, reduce fragmentation and additional overhead, avoid frequent transmission of small data blocks, improve the efficiency of storage devices, align data and transmit them in batches, reduce the number of storage device accesses and improve performance.
[0102] When the preset conditions are not met, data will be obtained from the normal memory for filling operation. The specific steps include:
[0103] If the data volume is less than the preset value or not equal to an integer multiple of the preset value, the data volume and the preset value are modulo to obtain the modulo data volume;
[0104] Obtain the target difference by taking the modulus data amount and the preset value;
[0105] Get the target data from the normal memory by the target difference.
[0106] For example, the preset value is 4KB, and the amount of stored data is 10KB. Since 10KB is not an integer multiple of 4KB and does not meet the preset conditions, the modulus data amount is calculated: 10KB%4KB=2KB, the target difference is calculated: 4KB-2KB=2KB, 2KB of target data is read from the ordinary memory, the 10KB of stored data and the 2KB of target data are merged to form a 12KB data block, and the 12KB data block is transferred to the buffer of the non-volatile memory interface device.
[0107] It should be noted that in the scenario of remote direct memory access memory pool + CNC separation, in addition to obtaining data from the remote direct memory access memory pool, or obtaining data from ordinary memory to align the data in the remote direct memory access memory pool, when the amount of data is extremely small, only ordinary memory will be used instead of the remote direct memory access memory pool. This part of the data also needs to be copied, and the specific steps include:
[0108] Acquire the data to be transmitted and the data volume of the data to be transmitted in the storage system;
[0109] If the amount of the data to be transmitted is less than a preset value, storing the data to be transmitted in a common memory;
[0110] The data to be transmitted is copied to the memory of the storage performance development toolkit in the non-volatile memory interface device so as to be driven by the non-volatile memory interface of the storage performance development toolkit.
[0111] For very small data volumes, using RDMA memory pools may not fully utilize their performance advantages, but may increase additional overhead, so the above settings can reduce the management overhead of the memory pool. At the same time, the above settings can adapt to the needs of different data volumes, and can process both very small data and large data volumes efficiently.
[0112] Step 105, obtaining memory data including storage data in a plurality of preset buffers, and determining the source of the memory data in any preset buffer.
[0113] In the embodiments of the present invention, the concept of BufferList can be used to manage data in the remote direct memory access memory pool and the non-volatile memory interface device (such as NVMe device). BufferList is a data structure used to manage multiple discontinuous memory blocks (Buffer) in the Ceph storage system. It supports efficient data storage, operation and transmission, and is widely used in scenarios such as network transmission, storage systems and data processing. Through BufferList, Ceph can efficiently manage memory data and improve the performance and flexibility of the system. BufferList is a linked list or array composed of multiple Buffers. Therefore, several preset buffers are set in the non-volatile memory interface device to receive data from the remote direct memory access memory pool and processed by OSD+BlueStore. The data stored in the preset buffer is collectively referred to as memory data. The memory data includes memory data from ordinary memory and memory data from the memory of the storage performance development toolkit.
[0114] It should be noted that the data received by RDMA can be passed to the NVM EDevice (BlockDevice) entry through the Bufferlist. In the remote direct memory access memory pool and the non-volatile memory interface device NVMEDevice, the memory data in the preset buffer can be identified by the Boolean flag pre-set in the Bufferlist. The specific steps include:
[0115] Acquire components related to a buffer chain list, wherein the components of the buffer chain list manage buffers in a remote direct memory access memory pool and a non-volatile memory interface device respectively, and the buffers include a preset buffer of the non-volatile memory interface device;
[0116] Add a Boolean flag component to the buffer list component;
[0117] When the data of the buffer comes from the storage performance development kit memory, a Boolean flag whose value is a first Boolean value is set in the buffer by the Boolean flag component;
[0118] When the data of the buffer comes from the normal memory, a Boolean flag whose value is set to the second Boolean value is set in the buffer through the Boolean flag component.
[0119] The first Boolean value may be true, and the second Boolean value may be false. In the embodiment of the present invention, a judgment flag is added to the bufferlist to judge whether it comes from RDMA, thereby distinguishing data from the memory of the storage performance development toolkit from data from ordinary memory. Fig. 9As shown, BufferList includes bufferlist module, PtrNode module and raw module. BufferList is a linked list or array composed of multiple Buffers, and each Buffer relies on buffer::raw to manage its underlying memory data. A Boolean flag from_spdk is added to buffer::raw to determine whether the raw buffer comes from the storage performance development toolkit memory, that is, to determine whether the memory data of the preset buffer comes from the storage performance development toolkit memory. If so, the Boolean value is set to true, otherwise, the Boolean value is set to false. BufferList's buffer::ptr is a core class used to represent a logical data block in BufferList. buffer::ptr is an encapsulation of buffer::raw, which provides an access interface to the actual memory data and supports reference counting and memory sharing. Therefore, in buffer::ptr, an interface function get_raw() for obtaining raw* is added, which is used by the NVMEDevice module to obtain an instance of raw to obtain the from_spdk flag.
[0120] The above settings make it easier to distinguish high-performance memory (such as SPDK memory) from ordinary memory in the future, thereby optimizing the data processing process and helping the system quickly determine different processing methods for different data. For example, unnecessary operations (such as copying) on high-performance memory can be avoided, thereby improving performance.
[0121] In addition, the Boolean value of from_spdk is also set in the memory manager that manages the remote direct memory access memory pool. Because the remote direct memory access memory pool is set to use the storage performance development toolkit memory, if it is buffer data from the buddypool in the memory manager, directly modify from_spdk to true. Fig.10 As shown, the constructor of raw_rdma is set in the BuddyPool of the memory manager, and a judgment is added therein. If chunk!=null, it indicates that the memory comes from the buddy memory pool. At this time, the Boolean value of the Boolean flag from_spdk is changed to true. If it is null, the Boolean value of from_spdk remains unchanged, which is the default false.
[0122] The embodiment of the present invention further modifies NVMEDevice, removes the original copy logic, and enables the copy-free bufferlist to be directly submitted to the IO interface function of SPDK. First, several preset buffers in the non-volatile memory interface device are managed through bufferlist. Therefore, based on several preset buffers in the non-volatile memory interface device, an initial buffer list of the non-volatile memory interface device is generated. The memory data in each preset buffer in the initial buffer list is judged by the from_spdk flag. If the flag is false, create a raw memory management object (raw_sp dk object) based on SPDK and copy the data to raw_spdk. Raw_spdk allocates several first target memory blocks of preset sizes from the memory of the storage performance development toolkit through the memory block allocator, and then places raw_spdk (first target memory block) into the new buffer list. If the flag is true, this part of the data will be directly placed in the new buffer list, and the new buffer list will be submitted to the input and output interface function of the storage performance development toolkit. Then, the corresponding memory data in the new buffer list is submitted to the non-volatile memory interface driver of the storage performance development toolkit through the input and output interface function. The specific steps include:
[0123] Based on a plurality of preset buffers in the non-volatile memory interface device, generating an initial buffer chain list of the non-volatile memory interface device;
[0124] If the memory data in any preset buffer is from the normal memory, a memory block allocator is set in the storage performance development toolkit;
[0125] Allocate a plurality of first target memory blocks of preset sizes from the memory of the storage performance development toolkit through a memory block allocator;
[0126] Copying the memory data in the preset buffer to the first target memory block;
[0127] If any memory data comes from the memory of the storage performance development toolkit, a preset buffer corresponding to the memory data is determined as a target buffer;
[0128] Generate a new buffer linked list based on the target buffer and the first target memory block;
[0129] Send the new buffer list to the storage performance development toolkit, and set the input and output interface functions in the storage performance development toolkit;
[0130] The corresponding memory data in the new buffer list is submitted to the non-volatile memory interface driver of the storage performance development toolkit through the input and output interface function.
[0131] Among them, the modification of the non-volatile memory interface device (NVMEDevice) is as follows Fig.11 As shown, the write / aio_write() function in NVMEDevice is modified, the read / aio_read() function is modified, and the copy_read() / aio_copy_read() function, get_append_read_buffer() function, slab_allocator function, raw_spdk function, and get_aligned_bufferlist() function are added. By modifying write / aio_write(), the original write process is modified, the segmentation and copying are removed, and the from_spdk flag of raw is judged to choose to copy or directly use the data in the buffer. By modifying the read / aio_read() function, the original read process is modified, and it is necessary to allocate several preset-size first target memory blocks (raw_spdk) from the memory of the storage performance development toolkit for reading data from the SSD, and append the raw_spdk to the end of the entry bufferlist to generate a new buffer linked list. By adding copy_read() / aio_copy_read() functions, the write / aio_write() function is modified and the read / aio_read() function is combined, such as Fig.12 As shown, the memory data in each preset buffer in the initial buffer list is judged by the from_spdk flag. If the flag is false, multiple 4K raw memory management objects (raw_spdk objects) are allocated and the data is copied to raw_spdk. Raw_spdk allocates a number of first target memory blocks of preset sizes from the memory of the storage performance development toolkit through the memory block allocator, and then raw_spdk (first target memory block) is placed at the end of the new buffer list. If the flag is true, this part of the data will be directly placed in the new buffer list, and the new buffer list will be submitted to the storage performance development toolkit. The new buffer list is polled I / O completion processing through the input and output interface function of the storage performance development toolkit, and then the corresponding memory data in the new buffer list is submitted to the non-volatile memory interface driver of the storage performance development toolkit through the input and output interface function. After the use is completed, the new buffer list will be judged whether it still exists. If it does not exist, the data needs to be copied back to the original buffer list.
[0132] The added raw_spdk function is used to use memory from SPDK; it is used to accept metadata copies and write copies and read operations of data that does not come from RDMA. The added slab_allocator function is used to manage the SPDK memory required by raw_spdk and speed up the allocation of SPDK memory. The added get_append_read_buffer() function is used to obtain a buffer suitable for NVMe device read operations and append it to the new buffer list. The added get_aligned_bufferlist() function is used to obtain a memory-aligned buffer list (BufferList), which is usually used to prepare for writing to NVMe to meet the data transmission requirements of NVMe devices.
[0133] By performing copy-free operations on memory data in a preset buffer from the storage performance development toolkit memory, the number of interrupts (SYSTEMIN) and context switches are reduced, while the CPU utilization and total PCM memory bandwidth are significantly improved.
[0134] In addition, a new SGL positioning function will be used in NVMEDevice, and the bufferlist::buffers_t iterator will be used to locate the SGE; (Note: 1. SGL is a data structure used to describe data transfer operations in NVMe commands. It is used to specify the physical memory address and length of the data, and how to aggregate multiple scattered memory segments together for data transfer; 2. SGE is a single entry in SGL; 3. In SPDK, the SGL positioning function is provided by the upper layer, and SPDK is responsible for checking and building the SGL in the NVMe specification).
[0135] Step 106: If the memory data in the preset buffer comes from the memory of the storage performance development toolkit, the memory data in the preset buffer is submitted to the non-volatile memory interface driver of the storage performance development toolkit.
[0136] In the embodiment of the present invention, the non-volatile memory interface driver of the storage performance development toolkit can only directly use the data in the storage performance development toolkit memory, so the memory data in the preset buffer of the storage performance development toolkit memory can be used, and the memory data in the preset buffer not from the storage performance development toolkit memory needs to be copied to the storage performance development toolkit memory first. By performing the copy-free operation on the memory data in the preset buffer of the storage performance development toolkit memory, the number of interrupts (SYSTEMIN) and the number of context switches are reduced, and at the same time, the CPU utilization rate and the total bandwidth of the PC M memory are significantly improved.
[0137] Drivers generally refer to device drivers, which are special programs that enable computers and devices to communicate with each other. They are equivalent to the interface of the hardware. Only through this interface can the operating system control the operation of the hardware device.
[0138] The storage optimization method provided by the embodiment of the present invention obtains the initial configuration of the memory manager, the memory manager is used to manage the remote direct memory access memory pool, the remote direct memory access memory pool uses the registered memory, and by modifying the initial configuration, the registered memory used by the remote direct memory access memory pool is modified to the storage performance development toolkit memory; so that the data is stored in the storage performance development toolkit memory when passing through the remote direct memory access memory pool, the storage data of the remote direct memory access memory pool is obtained, the storage data is transmitted to several preset buffers of the non-volatile memory interface device, the memory data including the storage data in the several preset buffers is obtained, and the source of the memory data in any preset buffer is determined; if the memory data in the preset buffer comes from the storage performance development toolkit memory, the memory data in the preset buffer is submitted to the storage performance development toolkit non-volatile memory interface driver, thereby reducing the copy process, thereby reducing the number of interrupts, the number of context switches and the CPU usage rate. In the embodiment of the present invention, the memory used by the remote direct memory access memory pool is modified so that the remote direct memory access memory pool uses the memory from the storage performance development toolkit, and the source of the memory data of the non-volatile memory interface device is determined so that the memory from the storage performance development toolkit can be directly submitted to the non-volatile memory interface driver of the storage performance development toolkit, thereby reducing copy operations, lowering CPU usage, saving system resources, and improving performance.
[0139] Reference Fig.13 , which shows a schematic diagram of the structure of a storage optimization device provided by an embodiment of the present invention, such as Fig.13 As shown, the device may include:
[0140] The first acquisition module 201 is used to acquire the initial configuration of the memory manager, the memory manager is used to manage the remote direct memory access memory pool, and the remote direct memory access memory pool uses the registered memory.
[0141] The configuration modification module 202 is used to modify the registered memory used by the remote direct memory access memory pool to the storage performance development toolkit memory by modifying the initial configuration.
[0142] The second acquisition module 203 is used to acquire storage data of the remote direct memory access memory pool.
[0143] The transmission module 204 is used to transmit the storage data to a plurality of preset buffers of the non-volatile memory interface device.
[0144] The third acquisition module 205 is used to acquire memory data including stored data in a plurality of preset buffers, and determine the source of the memory data in any preset buffer.
[0145] The data submission module 206 is used to submit the memory data in the preset buffer to the non-volatile memory interface driver of the storage performance development toolkit if the memory data in the preset buffer comes from the storage performance development toolkit memory.
[0146] Optionally, the transmission module 204 specifically includes:
[0147] The first acquisition submodule is used to acquire the data volume of the stored data.
[0148] The first transmission submodule is used to transmit the storage data to a plurality of preset buffers of the non-volatile memory interface device if the data amount meets the preset conditions.
[0149] The second acquisition submodule is used to acquire target data from the common memory if the data amount does not meet the preset condition.
[0150] The second transmission submodule is used to transmit the target data and the storage data together to a plurality of preset buffers of the non-volatile memory interface device.
[0151] Optionally, the storage optimization device further includes:
[0152] The first generating module is used to generate an initial buffer chain list of the non-volatile memory interface device based on a plurality of preset buffers in the non-volatile memory interface device.
[0153] The first setting module is used to set a memory block allocator in the storage performance development toolkit if the memory data in any preset buffer zone comes from the ordinary memory.
[0154] A memory allocation module is used to allocate a number of first target memory blocks of preset sizes from the memory of the storage performance development toolkit through a memory block allocator.
[0155] The copy module is used to copy the memory data in the preset buffer to the first target memory block.
[0156] The determination module is used to determine the preset buffer corresponding to the memory data as the target buffer if any memory data comes from the memory of the storage performance development toolkit.
[0157] The second generating module is used to generate a new buffer linked list based on the target buffer and the first target memory block.
[0158] The sending module is used to send the new buffer list to the storage performance development toolkit, and the input and output interface functions are set in the storage performance development toolkit.
[0159] The submission module is used to submit the corresponding memory data in the new buffer list to the non-volatile memory interface driver of the storage performance development toolkit through the input and output interface function.
[0160] Optionally, the second acquisition submodule specifically includes:
[0161] The modulo unit is used to take the modulo of the data amount and the preset value to obtain the modulo data amount if the data amount is less than a preset value or is not equal to an integer multiple of the preset value.
[0162] The first acquisition unit is used to acquire a target difference by taking a modulo data amount and a preset value.
[0163] The second acquisition unit is used to acquire target data from the common memory through the target difference.
[0164] Optionally, the configuration modification module 202 specifically includes:
[0165] The partitioning submodule is used to pre-partition a second target memory block to be allocated in the memory of the storage performance development toolkit.
[0166] The first setting submodule is used to set the memory allocation pointer in the memory manager.
[0167] The third acquisition submodule is used to acquire the memory address of the second target memory block through the memory allocation pointer.
[0168] The control submodule is used for controlling the remote direct memory access memory pool to use the second target memory block of the storage performance development toolkit through the memory address.
[0169] The second setting submodule is used to set the memory release pointer in the memory manager.
[0170] The fourth acquisition submodule is used to acquire the memory address of the second target memory block through the memory release pointer when it is determined that the second target memory block has finished being used.
[0171] The memory release submodule is used to release the second target memory block through the memory address.
[0172] Optionally, the storage optimization device further includes:
[0173] The fourth acquisition module is used to acquire components related to a buffer chain list, wherein the components of the buffer chain list manage the buffers in the remote direct memory access memory pool and the non-volatile memory interface device, and the buffers include preset buffers of the non-volatile memory interface device.
[0174] Add component module, used to add Boolean flag component to the components of buffer linked list.
[0175] The second setting module is used to set a Boolean flag with a first Boolean value in the buffer through a Boolean flag component when the data in the buffer comes from the memory of the storage performance development toolkit.
[0176] The third setting module is used for setting a Boolean flag with a second Boolean value in the buffer through a Boolean flag component when the data in the buffer comes from the common memory.
[0177] The storage optimization method provided by the embodiment of the present invention obtains the initial configuration of the memory manager, the memory manager is used to manage the remote direct memory access memory pool, the remote direct memory access memory pool uses the registered memory, and by modifying the initial configuration, the registered memory used by the remote direct memory access memory pool is modified to the storage performance development toolkit memory; so that the data is stored in the storage performance development toolkit memory when passing through the remote direct memory access memory pool, the storage data of the remote direct memory access memory pool is obtained, the storage data is transmitted to several preset buffers of the non-volatile memory interface device, the memory data including the storage data in the several preset buffers is obtained, and the source of the memory data in any preset buffer is determined; if the memory data in the preset buffer comes from the storage performance development toolkit memory, the memory data in the preset buffer is submitted to the storage performance development toolkit non-volatile memory interface driver, thereby reducing the copy process, thereby reducing the number of interrupts, the number of context switches and the CPU usage rate. In the embodiment of the present invention, the memory used by the remote direct memory access memory pool is modified so that the remote direct memory access memory pool uses the memory from the storage performance development toolkit, and the source of the memory data of the non-volatile memory interface device is determined so that the memory from the storage performance development toolkit can be directly submitted to the non-volatile memory interface driver of the storage performance development toolkit, thereby reducing copy operations, lowering CPU usage, saving system resources, and improving performance.
[0178] The embodiment of the present invention also provides a communication device, such as Fig.14 As shown, it includes a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304.
[0179] Memory 303, used for storing computer programs;
[0180] The processor 301 is used to execute the program stored in the memory 303 to implement the following steps:
[0181] Obtaining an initial configuration of a memory manager, the memory manager being used to manage a remote direct memory access memory pool, the remote direct memory access memory pool using a registered memory;
[0182] By modifying the initial configuration, the registered memory used by the remote direct memory access memory pool is modified to the storage performance development toolkit memory;
[0183] Acquire storage data of the remote direct memory access memory pool;
[0184] transferring the storage data to a plurality of preset buffers of a non-volatile memory interface device;
[0185] Acquire memory data including the stored data in a plurality of the preset buffers, and determine the source of the memory data in any of the preset buffers;
[0186] If the memory data in the preset buffer comes from the memory of the storage performance development toolkit, the memory data in the preset buffer is submitted to the non-volatile memory interface driver of the storage performance development toolkit.
[0187] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into a physical address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0188] The communication interface is used for communication between the above terminal and other devices.
[0189] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0190] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0191] The present invention also provides a readable storage medium, when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the storage optimization method of the aforementioned embodiment.
[0192] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0193] The algorithm and display provided herein are not inherently related to any particular computer, virtual device or other equipment. According to the above description, it is obvious that the structure required for constructing this type of device is. In addition, the present invention is not directed to any specific programming language. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific language is to disclose the best mode of the present invention.
[0194] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0195] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than those expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all of the features of the individual embodiments disclosed above. Therefore, the claims that follow the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present invention.
[0196] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0197] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0198] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0199] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, apparatuses and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0200] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0201] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0202] It should be noted that the various data-related processes in the embodiments of the present application are all carried out in compliance with the corresponding data protection laws and policies of the country where the device is located, and with the authorization given by the owner of the corresponding device.
Claims
1. A storage optimization method, characterized in that: The method comprises: Obtaining an initial configuration of a memory manager, the memory manager being used to manage a remote direct memory access memory pool, the remote direct memory access memory pool using a registered memory; By modifying the initial configuration, the registered memory used by the remote direct memory access memory pool is modified to the storage performance development toolkit memory; Acquire storage data of the remote direct memory access memory pool; transferring the storage data to a plurality of preset buffers of a non-volatile memory interface device; Acquire memory data including the stored data in a plurality of the preset buffers, and determine the source of the memory data in any of the preset buffers; If the memory data in the preset buffer comes from the memory of the storage performance development toolkit, the memory data in the preset buffer is submitted to the non-volatile memory interface driver of the storage performance development toolkit.
2. The method according to claim 1, characterized in that: The step of transmitting the storage data to a plurality of preset buffers of a non-volatile memory interface device comprises: Obtaining the data volume of the stored data; If the data amount meets the preset condition, the stored data is transmitted to a number of preset buffers of the non-volatile memory interface device; If the data volume does not meet the preset condition, obtaining the target data from the common memory; The target data and the storage data are transmitted together to a plurality of preset buffers of a non-volatile memory interface device.
3. The method according to claim 2, characterized in that After acquiring the memory data including the stored data in the plurality of preset buffers and determining the source of the memory data in any of the preset buffers, the method further includes: Based on a plurality of preset buffers in the non-volatile memory interface device, generating an initial buffer chain list of the non-volatile memory interface device; If the memory data in any of the preset buffers comes from the common memory, a memory block allocator is set in the storage performance development toolkit; Allocating a plurality of first target memory blocks of preset sizes from the memory of the storage performance development toolkit through the memory block allocator; Copying the memory data in the preset buffer to the first target memory block; If any of the memory data comes from the memory of the storage performance development toolkit, determining a preset buffer corresponding to the memory data as a target buffer; Based on the target buffer and the first target memory block, generate a new buffer linked list; Sending the new buffer linked list to a storage performance development toolkit, wherein the storage performance development toolkit is provided with input and output interface functions; The corresponding memory data in the new buffer linked list is submitted to the non-volatile memory interface driver of the storage performance development toolkit through the input and output interface function.
4. The method according to claim 2, characterized in that: If the data amount does not meet the preset condition, obtaining the target data from the common memory includes: If the data amount is less than a preset value or is not equal to an integer multiple of the preset value, taking a modulus of the data amount and the preset value to obtain a modulo data amount; Obtaining a target difference value through the modulo data amount and the preset value; The target data is obtained from the common memory through the target difference.
5. The method according to claim 1, characterized in that The step of modifying the initial configuration to modify the registered memory used by the remote direct memory access memory pool to the storage performance development toolkit memory includes: Pre-allocating a second target memory block to be allocated in the memory of the storage performance development toolkit; Setting a memory allocation pointer in the memory manager; Acquire the memory address of the second target memory block through the memory allocation pointer; The remote direct memory access memory pool is controlled to use the second target memory block of the storage performance development toolkit through the memory address.
6. The method according to claim 5, characterized in that After setting the memory allocation pointer in the memory manager, the method further includes: Setting a memory release pointer in the memory manager; When it is determined that the second target memory block has finished being used, obtaining a memory address of the second target memory block through the memory release pointer; The second target memory block is released through the memory address.
7. The method according to claim 1, characterized in that After obtaining the initial configuration of the memory manager, the method further includes: Acquire components related to a buffer chain list, wherein the components of the buffer chain list manage buffers in a remote direct memory access memory pool and a non-volatile memory interface device respectively, wherein the buffers include a preset buffer of the non-volatile memory interface device; Adding a Boolean flag component to the components of the buffer linked list; When the data in the buffer comes from the memory of the storage performance development toolkit, setting a Boolean flag with a value of a first Boolean value in the buffer by a Boolean flag component; When the data in the buffer area comes from a common memory, a Boolean flag whose value is set to a second Boolean value is set in the buffer area through a Boolean flag component.
8. A storage optimization device, characterized in that: include: A first acquisition module is used to acquire an initial configuration of a memory manager, wherein the memory manager is used to manage a remote direct memory access memory pool, and the remote direct memory access memory pool uses a registered memory; A configuration modification module, configured to modify the registered memory used by the remote direct memory access memory pool to a storage performance development toolkit memory by modifying the initial configuration; A second acquisition module, used for acquiring storage data of the remote direct memory access memory pool; A transmission module, used for transmitting the storage data to a plurality of preset buffers of a non-volatile memory interface device; A third acquisition module, used for acquiring memory data including the stored data in a plurality of the preset buffers, and determining a source of the memory data in any of the preset buffers; A data submission module is used to submit the memory data in the preset buffer to the non-volatile memory interface driver of the storage performance development toolkit if the memory data in the preset buffer comes from the storage performance development toolkit memory.
9. A communication device, characterized in that: include: A transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; The processor is used to read the program in the memory to implement the steps in the storage optimization method as described in any one of claims 1-7.
10. A readable storage medium for storing a program, characterized in that: When the storage program is executed by the processor, the steps of the storage optimization method as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Database storage engine acceleration method and system based on an SPDK
CN113688099A
Data processing method and device based on remote direct memory access and medium
CN115934623A
Method, device and equipment for realizing full copy storage of SPDK architecture and medium
CN116521069A
SPDK performance optimization thread method and device, equipment and storage medium
CN117931434A
Optimization method, optimization device and computing equipment
CN119105802A