Memory data management method, offload card, and system
By offloading memory management card, the problem of excessive CPU load was solved, achieving efficient memory usage and data transfer, optimizing memory management and reducing costs.
Patent Information
- Application Number
- PCT/CN2024/142461
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-09
- Filing Date
- 2024-12-25
- Publication Date
- 2025-11-13
AI Technical Summary
In existing technologies, memory management is performed by the operating system, which leads to an excessive burden on the central processing unit (CPU), consumes more resources, and affects system performance.
Memory data is managed by an offloading card. The offloading card obtains memory access information from the computing device, identifies the target data, and offloads it to the appropriate storage location, reducing the CPU's memory management burden.
It reduces CPU resource consumption, improves memory utilization and data transfer efficiency, optimizes memory management, and reduces memory usage costs.
Smart Images

Figure CN2024142461_13112025_PF_FP_ABST
Abstract
Description
A memory data management method, an unloading card, and a system
[0001] This application claims priority to Chinese Patent Application No. 202410574480.6, filed with the State Intellectual Property Office of China on May 9, 2024, entitled “A Memory Data Management Method, Unloading Card and System”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This invention relates to the field of computers, and more particularly to a memory data management method, uninstallation card, and system for managing computer memory. Background Technology
[0003] Main memory, also known as RAM, is used to store various running software, input and output data, and information exchanged with secondary storage. To improve processor access speed, main memory needs to have high access speed. In traditional computer system architectures, dynamic random access memory (DRAM) is typically used as main memory. The processor can access main memory at high speed through the memory controller, performing read and write operations on any storage unit within it.
[0004] The demand for memory is constantly growing in emerging data centers. Since DRAM memory chips are relatively expensive, improving memory utilization efficiency has become an effective way to reduce data center costs.
[0005] In existing technologies, to improve memory utilization efficiency, memory is typically managed by the operating system. The operating system tracks memory page usage, manages and releases memory in a timely manner, thereby improving memory utilization efficiency.
[0006] However, the process of counting memory requires continuous consumption of central processing unit (CPU) resources, adding extra load to the already busy CPU. Summary of the Invention
[0007] This invention provides a memory data management method, an unloading card, and a memory data management system to solve the technical problem of excessive burden on the computer's central processing unit caused by memory management.
[0008] In a first aspect, the present invention provides a memory data management method, the method comprising: an unloading card obtaining memory access information from a computing device, the memory access information being used to indicate the access frequency of memory data, the memory data being stored in the memory of the computing device; the unloading card identifying target data from the memory of the computing device through the memory access information; and then unloading the identified target data from the source location to the target storage location.
[0009] In this solution, an offloading card replaces the CPU of the computing device to implement memory management. Firstly, the offloading card identifies target data that needs to be offloaded from the computing device, avoiding frequent access to the computing device's memory by the CPU, thus reducing CPU resource consumption. Secondly, the offloading card offloads the target data to the target storage location, so the computing device's CPU only accesses the computing device's memory when it needs to use the data, avoiding memory access for data offloading, thereby reducing cache pollution. Thirdly, target data can be directly offloaded from memory to the target storage location without going through the computing device's CPU, improving data transfer efficiency.
[0010] In one possible implementation, the memory data is stored in multiple locations, with different storage locations corresponding to memory data with different access frequencies. For example, memory data with high access frequency corresponds to a storage location (storage medium) with low latency, while memory data with low access frequency corresponds to a storage location (storage medium) with high latency. The aforementioned step of the unloading card unloading the target data to the target storage location specifically includes: the unloading card unloading the target data from the source location to the corresponding target storage location according to the access frequency of the target data.
[0011] In this solution, the target data is unloaded to the corresponding target storage location based on the access frequency of the target data. For example, data that is frequently accessed by the CPU of the computing device can be stored in a storage medium closer to the CPU (low access latency), while data that is less frequently accessed by the CPU can be stored in a storage medium farther from the CPU (high access latency), thereby optimizing memory usage efficiency.
[0012] In one possible implementation, the unloading card unloads target data from the source location to the target storage location, specifically including one or more of the following: the unloading card unloads frequently accessed data from the slow memory of the computing device to the high-speed memory of the computing device; the unloading card unloads infrequently accessed data from the high-speed memory of the computing device to the slow memory of the computing device.
[0013] In this solution, the computing device's memory includes high-speed memory and low-speed memory. If the data in high-speed memory becomes less popular, it will be offloaded to low-speed memory; conversely, if the data in low-speed memory becomes more popular, it will be offloaded to high-speed memory. The computing device's CPU can access the more popular data in a timely manner, thus achieving efficient utilization of the computing device's memory.
[0014] In one possible implementation, the target storage location includes the memory of the offloading card or a back-end storage device; the back-end storage device is a persistent storage device inside the computing device or a storage device outside the computing device; the offloading card offloads the target data from the source location to the target storage location, specifically including: the offloading card offloads the target data from the source location to the memory of the offloading card or the back-end storage device according to the access frequency of the target data.
[0015] In this solution, the memory of the offloading card and the back-end storage device are selected as target storage locations. Since the CPU's access latency to these target storage locations is higher than that of the computing device's memory, the identified target data is memory data with low access frequency that does not need to be stored in the computing device's memory. By using the offloading card's memory and the back-end storage device as target storage locations, low-access target data can be offloaded from the computing device's memory to these storage locations, freeing up memory space to store high-access memory data. For the computing device's CPU, it can access high-access data faster, improving CPU data access efficiency.
[0016] In one possible implementation, the memory data is categorized into hot and cold data, with the target data being cold data. The offloading card caches the target data in its own memory and then offloads it to the backend storage device. The latency of the backend storage device is greater than the latency of the computing device's memory. Storing cold data in the backend storage device frees up computing device memory space.
[0017] In this solution, the offload card memory is used as a cache location for cold data. Compared to the computing device's CPU retrieving cold data from a remote device, the latency of retrieving cold data from the offload card memory is significantly lower. This solution can form a two-level parallel structure of computing device memory and back-end storage device. Furthermore, by using the offload card memory as a cache for the back-end storage device, memory utilization efficiency is further optimized, and the computing device's CPU's data location efficiency is improved.
[0018] In one possible implementation, the backend storage device includes a remote device; the remote device communicates with the computing device via a network. In this solution, the remote device has a large storage space. In a data center scenario, using the remote device as the target storage location for cold data can ensure that there is sufficient storage space for the cold data.
[0019] In one possible implementation, the hot data registration in memory includes hot data, warm data, and cold data. If the target data is warm data, the unloading card unloads the target data into its own memory; if the target data is cold data, the unloading card unloads the target data into a back-end storage device. The latency of the back-end storage device is greater than the latency of the computing device's memory. Storing cold data in the back-end storage device can free up computing device memory space.
[0020] In this solution, the latency of the computing device accessing the offload card memory is greater than the latency of the computing device accessing its own memory, but less than the latency of the computing device accessing the backend storage device. Using the offload card memory as a cache location for warm data is equivalent to using the offload card memory as extended memory for the computing device, increasing the computing device's memory space. When the computing device's CPU needs to access warm data, it can obtain it more quickly. This solution can form a three-level parallel structure: computing device memory - offload card memory - backend storage device. Based on different levels of data usage, target data can be offloaded to the offload card memory or the backend storage device. Since read / write performance gradually decreases from computing device memory, through the offload card memory, to the backend storage device, latency increases sequentially during data read / write operations, but simultaneously, cost decreases. Therefore, offloading target data of different usage levels to corresponding target storage locations can optimize memory utilization efficiency and reduce memory usage costs.
[0021] In one possible implementation, the offloading card obtains memory access information from the computing device's runtime memory. This information indicates the access frequency of memory objects. In computer science and software engineering, runtime typically refers to the environment and conditions during program execution. Memory runtime refers to the management and use of memory resources by the operating system or application during execution. The memory access information obtained from the runtime memory can reflect the access frequency of memory objects. After identifying cold memory objects, they can be evicted and moved to backend storage devices. After identifying warm memory objects, they can be migrated to the offloading card's memory for caching.
[0022] In one possible implementation, the unloading card has a computer bus interface for connecting to a computing device, and the unloading card receives memory access information sent by the computing device through the computer bus interface.
[0023] In one possible implementation, the offloading card is a smart network interface card (NIC) or a data processing unit (DPU). In this solution, the smart NIC / DPU serves as the network connection, and the computing device communicates with the remote device through the smart NIC / DPU. In data center scenarios, when storing large amounts of data to remote devices, this data naturally passes through the smart NIC / DPU. Using the smart NIC / DPU as the offloading card can shorten the transmission path of the target data and improve data transfer efficiency.
[0024] In one possible implementation, the central processing unit (CPU) of the computing device retrieves unloaded data from the memory of the computing device and processes it; the CPU of the computing device retrieves the unloaded target data from the target storage location and processes it.
[0025] In this solution, the CPU of the computing device only acquires data when it needs to use it, and no longer has the responsibility of managing memory, which can reduce the load on the CPU of the computing device.
[0026] Secondly, the present invention provides an unloading card, which includes: an information acquisition module for acquiring memory access information from a computing device, the memory access information being used to indicate the access frequency of memory data, the memory data being stored in the memory of the computing device; a data identification module for identifying target data from the memory of the computing device through the memory access information; and a data unloading module for unloading the target data from the source location to the target storage location.
[0027] In one possible implementation, the data offloading module offloads target data from the source location to the target storage location, specifically including one or more of the following: the data offloading module offloads frequently accessed data from the slow memory of the computing device to the high-speed memory of the computing device; the data offloading module offloads infrequently accessed data from the high-speed memory of the computing device to the slow memory of the computing device.
[0028] In one possible implementation, the target storage location includes the memory of the offloading card or a back-end storage device; the back-end storage device is a persistent storage device inside the computing device or a storage device outside the computing device; the data offloading module is specifically used to offload the target data to the memory of the offloading card or the back-end storage device according to the access frequency of the target data.
[0029] In one possible implementation, the memory data has a heat level that includes hot data and cold data, with the target data being cold data; the data offloading module is specifically used to cache the target data in the memory of the offloading card; it is also used to offload the target data to the backend storage device.
[0030] In one possible implementation, the hotness registration of memory data includes hot data, warm data, and cold data; the data unloading module is specifically used to unload the target data to the memory of the unloading card when the target data is warm data, and to unload the target data to the backend storage device when the target data is cold data.
[0031] In one possible implementation, the target data includes one or more memory objects, each memory object comprising one or more memory pages; the data unloading module is specifically used to unload the target data on a unit basis, memory objects. A memory object is the basic unit for data storage and operation during program runtime. The lifecycle of a memory object begins with its creation and ends when the program no longer needs it or explicitly deletes it. A memory object can be the size of multiple memory pages. If the unloading card detects that the overall heat of a memory object has decreased (becoming warm or cold data), it can initiate the unloading of that memory object. Compared to migration at the memory page level, this embodiment of the invention performs migration at the memory object level, which can improve migration efficiency.
[0032] In one possible implementation, the target data comprises one or more memory pages, each memory page comprising one or more cache lines; the data offloading module is specifically used to offload the target data in cache line units. A cache line is the smallest unit of cache in memory. It is the basic unit for transferring data between the processor cache and main memory (or main memory), and its size is typically a power of 2, and may vary in different processors and architectures. In this solution, because a smart NIC / DPU is used for memory management, memory data migration / offloading can be performed at the cache line granularity. Generally, memory data migration is done at the memory page granularity, which is relatively large and causes unnecessary data movement overhead. Compared to memory data migration at the memory page granularity, the cache line granularity is smaller, saving data movement overhead.
[0033] In one possible implementation, the information acquisition module is specifically used to acquire memory object access information from the memory runtime of the computing device; the memory access information acquired from the memory runtime is used to indicate the access frequency of memory objects.
[0034] In one possible implementation, the information acquisition module is specifically used to receive memory access information sent by the computing device through a computer bus interface set on the unloading card.
[0035] In one possible implementation, the offloading card is a smart network interface card or a data processing unit (DPU).
[0036] Thirdly, the present invention provides an unloading card, the unloading card comprising: a memory for storing a computer program; and a processor configured to execute, when running the computer program, a memory data management method for implementing the first aspect and any implementation thereof.
[0037] In one possible implementation, the processor for the offloading card is the DPU.
[0038] In one possible implementation, the offloading card also includes: a computer bus interface for communicating with the computing device; and a network interface for connecting the computing device to an external network.
[0039] Fourthly, the present invention provides a memory data management system, which includes a computing device and an unloading card of the second aspect and any implementation thereof, or an unloading card of the third aspect and any implementation thereof, wherein the unloading card is plugged into the computing device and communicates with the computing device through a computer bus.
[0040] Fifthly, the present invention provides a computer storage medium including computer instructions that, when executed on an electronic device or a cloud server, cause the electronic device or cloud server to perform the method as described in the first aspect and any implementation thereof.
[0041] In a sixth aspect, the present invention provides a computer program product that, when run on a computer, causes the computer to perform the method as described in the first aspect and any implementation thereof.
[0042] The second, third, fourth, fifth, and sixth aspects all possess various possible designs similar to the first aspect and can produce corresponding technical effects, which will not be elaborated here. Attached Figure Description
[0043] Figure 1 is a schematic diagram of a storage system provided in an embodiment of the present invention;
[0044] Figure 2 is a schematic diagram of the architecture of a computer system provided in an embodiment of the present invention;
[0045] Figure 3 is a schematic diagram of an offload card network structure provided in an embodiment of the present invention;
[0046] Figure 4 is a flowchart of a memory data management method provided in an embodiment of the present invention;
[0047] Figure 5 is a flowchart of another memory data management method provided in an embodiment of the present invention;
[0048] Figure 6 is a structural schematic diagram of an unloading card provided in an embodiment of the present invention;
[0049] Figure 7 is a schematic diagram of another unloading card provided in an embodiment of the present invention;
[0050] Figure 8 is a structural schematic diagram of another unloading card provided in an embodiment of the present invention;
[0051] Figure 9 is a schematic diagram of another type of unloading card provided in an embodiment of the present invention. Detailed Implementation
[0052] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0053] Figure 1 is a schematic diagram of a three-layer storage system provided in an embodiment of the present invention. From the first layer to the third layer, the storage capacity increases progressively, the access speed decreases progressively, and the cost decreases progressively.
[0054] As shown in Figure 1, the first level includes register 111, level 1 cache 112, level 2 cache 113 and level 3 cache 114 located in the central processing unit (CPU).
[0055] The second level includes memory that can serve as the main memory of a computer system. Examples include dynamic random access memory (DRAM) 121, static random access memory (SRAM), and double data rate synchronous dynamic random access memory (DDR SDRAM) 122 (DDR for short). Main memory, also known simply as primary memory or RAM, is the memory that exchanges information with the CPU.
[0056] The third tier of memory can serve as auxiliary storage for a computer system. Examples include network storage 131, solid-state drives (SSDs) 132, and hard disk drives (HDDs) 133. Auxiliary storage can be simply referred to as secondary storage or external storage. Compared to main memory, external storage has a larger storage capacity but slower access speed.
[0057] It is evident that memory located closer to the CPU has smaller capacity, faster access speed, greater bandwidth, and lower latency. Therefore, the memory included in the third tier can serve as back-end storage devices. The memory included in the second tier can serve as cache devices, used to store data frequently accessed by the CPU, significantly improving system access performance.
[0058] Memory is the storage space that the CPU can directly address. It is typically used to store various running software, input and output data, and information exchanged with external storage. Applications we commonly use, such as word processing software and games, are usually installed on external storage such as hard drives, but their functionality cannot be used without being loaded into memory for processing. Caches (Level 1 cache, Level 2 cache, Level 3 cache) are used to store copies of data in the CPU-managed main memory to avoid network overhead and latency issues caused by frequent access to slow, large-capacity external main memory.
[0059] Memory is a finite resource. If a process (an application divided into multiple processes) consumes a large amount of memory, even more than physical memory, and multiple processes need to be executed simultaneously, memory management becomes necessary. Memory management refers to the techniques for allocating and using a computer's memory resources. Its primary purpose is to allocate memory resources efficiently and quickly, and to release and reclaim memory resources when appropriate.
[0060] Memory management is typically performed by the operating system. As the computer's kernel, the operating system operates independently of ordinary applications, having access to protected memory space and the authority to access underlying hardware devices. To ensure kernel security and prevent user processes from directly manipulating the kernel, the operating system divides the address space (which can be a portion of the computer's memory or virtual storage) into two parts: kernel space, a protected memory space used to store kernel code and data; and user space, used to store application code and data. When a process executes application code, it is in user mode. Conversely, when a process executes a system call and enters kernel code, it is in kernel mode. User-mode processes run in user space, and kernel-mode processes run in kernel space.
[0061] In kernel mode, the processor can access all data in memory, including peripheral devices such as hard drives and network cards. The processor can also switch itself from one program to another. In user mode, the processor can only use the regular processor instruction set and cannot use the processor instruction set that operates on hardware resources. Therefore, the processor can only access memory in a restricted manner and is not allowed to access peripheral devices (such as I / O read / write, network card access, memory allocation, etc.).
[0062] Figure 2 is a schematic diagram of the architecture of a computer system provided in an embodiment of the present invention. As can be seen from Figure 2, the architecture of the entire computer system is divided into user mode and kernel mode through system calls. In order for applications to access kernel resources (such as CPU, memory, I / O), the kernel provides a set of general access interfaces, which are called system calls. System calls are the way in which user-mode processes actively switch to kernel mode.
[0063] Kernel-level memory management is responsible for managing memory resources so that processes can safely share the computer's memory. Memory management is a function of the operating system kernel, and since the operating system is typically run by the CPU, memory management consumes CPU resources and impacts CPU performance.
[0064] Based on this, embodiments of the present invention provide a memory data management method. This method offloads memory management functions to an offloading card. The offloading card obtains information reflecting the access frequency of memory data from the computing device. Based on the obtained information, the offloading card identifies target data (such as cold data) in the computing device's memory and removes the identified target data to a target storage location (such as a back-end storage device). The memory data management method provided by embodiments of the present invention, by offloading memory management functions to an offloading card, reduces the CPU burden and improves CPU operating efficiency.
[0065] Please refer to Figure 3, which is a schematic diagram of an offload card network provided in an embodiment of the present invention. The offload card network includes a computing device 310, an offload card 320, and a remote device 330. It should be noted that the remote device 330 can have one or more data devices.
[0066] The offloading card 320 is equipped with a computer bus interface (not shown in the figure), which is connected to bus 314. The offloading card 320 communicates with the computing device 310 via bus 314 and with the remote device 330 via a network. The offloading card 320 also includes a processor 321 and memory 322, where memory 322 is the storage space directly addressable by the processor 321. For example, the processor 321 can be a DPU (Data Processing Unit).
[0067] The computing device 310 includes a processor 311, memory 312, and secondary storage 313. Memory 312 is the storage space that the processor 311 can directly address. The computing device 310 is a device used to process computing tasks; for example, it can be a computing node or a computing cluster.
[0068] The remote device 330 includes a processor 331, memory 332, and external storage 333, where memory 332 is storage space directly addressable by the processor 331. The remote device 330 may be a server or a server cluster that provides storage services to the computing device 310.
[0069] Bus 314 is used to connect the various functional components of computing device 310. Bus 314 is a common communication trunk for transmitting information between the various functional components of computing device 310. Bus 314 can be a transmission line bundle formed by wires. Depending on the objects being connected, bus 314 can also be divided into internal bus and external bus.
[0070] The internal bus uses an internal bus protocol to transmit information. The internal bus protocol includes a bus protocol for accessing the memory space of the computing device 310. The external bus uses an external bus protocol to transmit information. The external bus protocol includes a bus protocol for accessing the external memory space of the computing device 310. Here, memory space refers to the address space of the main memory, and external memory space refers to the address space of the secondary storage.
[0071] In some embodiments, the internal bus protocol includes, but is not limited to, the Peripheral Component Interconnect (PCI) protocol, the Peripheral Component Interconnect Standard High Speed (PCI Express, PCI-E) protocol, and the High-Speed Interconnect (Intel) protocol. TM Quick Path Interconnect (QPI) protocol and Universal Bus (UB) protocol. External bus protocols include, but are not limited to, Small Computer System Interface (SCSI) protocol or Serial Attached SCSI (SAS) protocol.
[0072] In some embodiments, the offloading card 320 can communicate with the computing device 310 via a PCIe bus, a compute express ink (CXL) bus, a unified bus, etc. The following description uses the example of communication between the offloading card 320 and the computing device 310 via a PCIe bus. This embodiment of the invention does not limit the specific type of communication channel between the offloading card 320 and the computing device 310; any communication channel that enables communication between the offloading card 320 and the computing device 310 is applicable to this embodiment.
[0073] In some embodiments, as described above, the back-end storage device may include external storage 311 (local external storage) and / or external storage 333 (remote external storage / non-local external storage).
[0074] If the back-end storage device includes external storage 333, then the computing device 310 accesses the network via the offloading card 320, and then connects to the remote device via the network. The network can be a wired communication network, such as a fiber optic communication network, or a wireless communication network, such as a wireless local area network (WLAN) or a fifth-generation (5G) mobile communication network.
[0075] If the back-end storage device includes external storage 313, other components of the computing device 310, such as the processor 311, can be connected to the external storage 313 via bus 314. Of course, other components of the computing device can also be connected to the external storage 313 via offload card 320.
[0076] Furthermore, the embodiments of the present invention can be applied to scenarios of integrated in-memory computing or scenarios of separate in-memory computing; the embodiments of the present invention do not limit this.
[0077] The memory data management method of this invention according to an embodiment of the present invention will be described below with reference to Figure 4. Figure 4 is a flowchart of a memory data management method provided by an embodiment of the present invention. As shown in Figure 4, the memory data management method provided by an embodiment of the present invention includes steps 410 to 430.
[0078] Step 410: During the operation of computing device 310, unloading card 320 obtains memory access information from computing device 310. This memory access information is used to indicate the access frequency of memory data. The memory data is stored in memory 312 of computing device 310.
[0079] It is understandable that memory access information can include information that reflects memory data access patterns, such as the frequency of memory data access, cache hit rate, and cache misses. Taking access frequency as an example, the higher the frequency of memory data access, the higher the access frequency of the memory data. In some embodiments, memory data can be divided into different levels of access frequency. For example, memory data with high access frequency can be classified as hot data, memory data with low access frequency as cold data, and memory data with access frequency between hot and cold data as warm data. This embodiment of the invention does not limit how to classify the levels of access frequency.
[0080] Understandably, depending on the actual situation, memory data can be divided into cold data and hot data, or it can be divided into cold data, warm data, and hot data. The specific division depends on the difference in the frequency of memory data access.
[0081] For example, the offloading card 320 can obtain memory access information from the operating system kernel (or memory management). The operating system kernel is the core part of the operating system; it is responsible for managing computer hardware resources and providing basic runtime services for applications. Therefore, the operating system kernel records memory access information that reflects memory access patterns. In this embodiment of the invention, memory access information is obtained only through the operating system kernel; the memory management task is performed by the offloading card. Therefore, the memory access information is collected by the offloading card.
[0082] Step 420: Unloading card 320 identifies the target data based on the acquired memory access information. The target data is the data that needs to be unloaded from memory 312.
[0083] Specifically, after the uninstallation card 320 obtains the memory access information, it can determine the access frequency of memory data based on the memory access information, thereby identifying the target data (such as warm data or cold data) that needs to be uninstalled.
[0084] Understandably, the target data is low-frequency data, and the processor 311 of computing device 310 accesses this type of data infrequently. If this type of data is stored in memory 312 for a long time, it will prevent high-frequency data from being stored in memory 312, and the computing device will not be able to access this high-frequency data quickly. Therefore, one of the functions of memory management is to offload low-frequency data from memory 312 to other storage media, freeing up memory 312 space.
[0085] Step 430: The unloading card 320 unloads the identified target data from the memory 312 of the computing device 310 to the target storage location, thereby releasing the memory 312 of the computing device 310 and realizing memory management of the computing device 310.
[0086] It is understandable that different levels of access frequency for target data correspond to different target storage locations. The offloading card 320 offloads low-access-frequency data from the memory 312 of the computing device 310 to other storage media, freeing up space in memory 312; the offloading card 320 loads high-access-frequency data from other storage media into the memory 312 of the computing device 310, improving the efficiency of the computing device 310 in accessing high-access-frequency data; thus, the offloading card 320 manages the memory of the computing device 310.
[0087] Step 430 will be explained in two scenarios below.
[0088] Scenario 1: The popularity levels of memory data include hot data and cold data.
[0089] In one scenario, memory data may be identified as hot or cold data by the unmounted card 320.
[0090] In some embodiments, if memory data is identified as hot data by the unloading card 320, the hot data is retained in the memory 312 of the computing device 310 and is not unloaded. It is understood that the aforementioned hot data already exists in the memory 312. If the hot data identified by the unloading card 320 is not stored in the memory 312, the unloading card 320 caches the identified hot data in the memory 312 of the computing device 310.
[0091] In some embodiments, if memory data is identified as cold data by the offloading card 320, the persistent storage medium is used as the target storage location for the cold data, and the cold data is evicted from the memory 312 of the computing device 310 to the persistent storage medium. The persistent storage medium may include the aforementioned back-end storage devices (such as the external memory 313 of the computing device 310 and / or the external memory 333 of the remote device 330).
[0092] In some embodiments, to improve the access speed of computing device 310 to cold data, offloading card 320 uses its memory 322 as a cache for cold data. In this embodiment, offloading card 320 caches cold data that has been decommissioned to backend storage devices in its memory 322. When computing device 310 needs to access cold data, it can directly access the cached cold data from the memory 322 of offloading card 320. Compared to accessing the external storage 333 of a remote device via a network or accessing the local external storage 313, the latency caused by computing device 310 directly accessing the memory 322 of offloading card 320 is lower.
[0093] In this embodiment of the invention, memory data is divided into two levels of popularity: hot data and cold data. Based on the popularity level division, a two-level parallel storage structure (memory 312 and back-end storage device) is planned, and the memory 322 of the offloading card 320 is used as a cache. The offloading card offloads cold data to the back-end storage device and caches it in the memory 322 of the offloading card 320. This scenario is beneficial for accelerating some persistent storage.
[0094] Scenario 2: The popularity levels of memory data include hot data, warm data, and cold data.
[0095] In some embodiments, if memory data is identified as hot data by the unloading card 320, the hot data is retained in the memory 312 of the computing device 310 and is not unloaded. Similar to scenario one, if the hot data identified by the unloading card 320 is not stored in the memory 312, the unloading card 320 caches the identified hot data in the memory 312 of the computing device 310.
[0096] In some embodiments, if memory data is identified as warm data by the offloading card 320, then the memory 322 of the offloading card 320 is used as the target storage location for the warm data. The warm data is offloaded from the memory 312 of the computing device 310 to the memory 322 of the offloading card 320, thereby freeing up the memory of the computing device 310. If the computing device 310 needs to access the warm data, it can directly access the memory 322 of the offloading card 320. In this embodiment of the invention, using the memory 322 of the offloading card 320 to cache warm data is equivalent to using the memory 322 of the offloading card 320 as extended memory of the computing device 310, thus expanding the memory of the computing device 310 and increasing its memory capacity.
[0097] In some embodiments, if memory data is identified as cold data by the offloading card 320, then as described above, the persistent storage medium is used as the target storage location for the cold data, and the cold data is evicted from the memory 312 of the computing device 310 to the persistent storage medium. The persistent storage medium may include the aforementioned back-end storage devices (such as the external memory 313 of the computing device 310 or the external memory 333 of the remote device 330).
[0098] In this embodiment of the invention, memory data is categorized into three popularity levels: hot data, warm data, and cold data. Based on these popularity levels, a three-tier parallel storage structure (memory 312, memory 322, and backend storage device) is planned. According to different popularity levels, target memory pages are swapped to memory 312, memory 322, and the backend storage device, respectively. Since read / write performance gradually decreases from memory 312 and memory 322 to the backend storage device, latency increases sequentially during data read / write operations, but cost decreases simultaneously. Therefore, swapping target memory pages of different popularity levels to different target storage locations can optimize memory usage efficiency and reduce memory usage costs.
[0099] In some embodiments, the offloading card 320 uses the memory 332 of the remote device 330 as a cache for cold data. After identifying cold data, the offloading card 320 caches the cold data in the memory 332. When the computing device 310 needs to access the cold data, it first accesses the memory 332. In this embodiment of the invention, the memory 332 of the remote device 330 is used as extended memory for the computing device 310, thereby expanding the memory of the computing device 310 and increasing its memory capacity.
[0100] As mentioned above, both the memory 322 of the offloading card 320 and the memory 332 of the remote device 330 can be used as caches. In this embodiment of the invention, memory 322 and memory 332 are collectively referred to as non-local memory. For identified warm data, the offloading card 320 can offload it to memory 322 or memory 332; for identified cold data, the offloading card 320 can cache it in memory 322 or memory 332. In some embodiments, the offloading card 320 first uses memory 322, and then uses memory 332 when memory 322 is insufficient. That is, cold data is preferentially cached in memory 322, and when memory 322 is insufficient, cold data is then cached in memory 332; warm data is preferentially offloaded to memory 322, and when memory 322 is insufficient, warm data is then offloaded to memory 332.
[0101] In this embodiment of the invention, the memory management function is offloaded to the offloading card 320, and the offloading card 320 performs memory management on the computing device 310 without consuming CPU resources, thus reducing the CPU load.
[0102] In some embodiments, the offload card 320 is a smart network interface card (Smart NIC). The smart NIC also includes a network interface (Ethernet interface, such as an RJ-45 interface) connected to a network, through which the smart NIC can connect to a remote device 330 to access data stored in the remote device 330.
[0103] In this embodiment of the invention, using the smart network card as an offload card can shorten the transmission path of cold data and improve the efficiency of cold data transfer, for the following reasons:
[0104] Data transmission between computing device 310 and remote device 330 requires a network connection. Therefore, data transmitted between these devices must pass through a network interface card (NIC). If another device is used as an offloading card, when transmitting cold or warm data, the data needs to be transferred from the computing device's memory to the offloading card, then from the offloading card to the NIC, and finally reach the remote device via the network. However, if a smart NIC is used as the offloading card, since the smart NIC itself connects the computing device 310 to the network, the transmission path for cold or warm data is computing device → smart NIC → remote device, shortening the data transmission path and improving data transmission efficiency. Furthermore, as mentioned above, a three-tiered parallel storage structure can be formed using the computing device's memory, the smart NIC's memory, and the remote device's memory / external storage, with the smart NIC managing memory consistency.
[0105] In some embodiments, the granularity of the target data is a cache line. A cache line is the smallest unit of caching in memory. It is the basic unit for transferring data between the processor cache (Level 1 cache 112, Level 2 cache 113, and Level 3 cache 144 shown in Figure 1) and main memory (or system memory). Its size is typically a power of 2 and may vary in different processors and architectures. In this embodiment of the invention, since a smart network interface card (NIC) is used for memory management, memory data migration / unloading can be performed at the cache line granularity. Generally, memory data migration is performed at the memory page granularity, which is relatively large and causes unnecessary data movement overhead. Compared to memory data migration at the memory page granularity, the cache line granularity is smaller, which can save data movement overhead.
[0106] In some embodiments, the granularity of the target data is a memory object. A memory object typically refers to various data structures stored in memory within a computer program. These data structures can be basic data types (such as integers, floating-point numbers, characters, etc.) or complex data structures (such as arrays, linked lists, trees, graphs, etc.). Memory objects are the basic units for data storage and manipulation during program runtime. The lifecycle of a memory object begins with its creation and ends when the program no longer needs it or explicitly deletes it. A memory object can be the size of multiple memory pages. If the unloading card detects that the overall heat of a memory object has decreased (becoming warm or cold data), it can initiate the unloading of that memory object. Compared to migration at the memory page level, migrating at the memory object level in this embodiment of the invention can improve migration efficiency.
[0107] In this embodiment of the invention, depending on the specific circumstances, memory data can be migrated / unloaded at the granularity / unit of memory objects, memory pages, and cache behavior, resulting in a flexible and efficient migration method.
[0108] In some embodiments, the offloading card obtains memory access information from the memory runtime. In computer science and software engineering, runtime generally refers to the environment and conditions during program execution. For example, memory runtime refers to the management and use of memory resources by the operating system or application during execution. Memory access information obtained from the memory runtime can reflect the access frequency of memory objects. After identifying cold memory objects, they can be evicted and moved to backend storage devices. After identifying warm memory objects, they can be migrated to the offloading card's memory for caching.
[0109] Figure 5 is a flowchart illustrating another memory data management method provided in an embodiment of the invention. As shown in Figure 5, the memory data management method provided in this embodiment differs from the memory data management method provided in the embodiment shown in Figure 4 in that it adds a step of exchanging data from other storage media to the memory of the computing device. Figure 5 shows a schematic diagram of the structure of the offload card network, taking an offload card as a smart network interface card (Smart NIC) and an offload card processor as a DPU as an example. As shown in Figure 5, the DPU of the smart network interface card runs an on-board program, and when the DPU executes the on-board program, it can implement the memory data management method shown in Figure 5.
[0110] The memory data management methods shown in Figure 5 include:
[0111] S501. During the operation of computing device 310, smart network interface card 520 collects memory access information from computing device. This memory access information is used to indicate the frequency of data access by the processor of computing device.
[0112] For example, the accessed data could be data that an application running on the processor of a computing device needs to use.
[0113] For example, the access data may be stored in the memory 510 of the computing device, or in the memory 522 of the smart network card 520, or in a back-end storage device.
[0114] For example, the DPU521 of the Smart Network 520 card obtains the memory access information from the user-mode memory runtime or the kernel-mode memory management of the computing device.
[0115] The S502 and Smart NIC 520 identify target data based on the acquired memory access information.
[0116] For example, the target data is the data that needs to be moved from one level of storage medium to another. The latency of different levels of storage medium is different. For example, the target data may be data that needs to be moved between the second and third levels as shown in Figure 1, or it may be data that needs to be moved between local storage and remote storage.
[0117] For example, the DPU521 of the smart network card 520 can determine the popularity level of the accessed data based on the collected memory access information, and determine the target storage location that matches it based on the popularity level of the accessed data.
[0118] In some embodiments, the popularity level of accessed data includes hot data. If the popularity level of accessed data is hot data, the target storage location that matches it includes local memory (memory 510 of the computing device).
[0119] In some embodiments, the popularity level of accessed data includes cold data. If the popularity level of accessed data is cold data, the target storage location matched with it includes back-end storage device 530.
[0120] In some embodiments, the popularity level of accessed data includes warm data. If the popularity level of accessed data is warm data, then the target storage location matching it includes the memory of a computing device or the memory 522 of a smart network interface card 520.
[0121] In some embodiments, DPU521 can determine whether the current storage location and the target storage location of the accessed data match. If the current storage location of the accessed data does not match its target storage location, it is identified as target data that needs to be moved.
[0122] The S503 and Smart NIC 520 migrate the target data to the target storage location.
[0123] For example, if the target data is classified as "hot data" and is stored in a backend storage device, the DPU 521 of the smart network interface card 520 will migrate it to the memory 510 of the computing device. During the migration process, the target data will pass through the memory 522 of the smart network interface card.
[0124] For example, if the target data is classified as "hot data" and is stored in the backend device 530 and also cached in the memory 522 of the smart network interface card 520, then the smart network interface card 520 migrates it from memory 522 to memory 510 of the computing device. Compared to the previous embodiments, the hot data in this embodiment is cached in the memory 522 of the smart network interface card 520. Therefore, when the computing device needs to access the hot data, it can obtain the hot data more quickly.
[0125] For example, if the target data has a heat level of warm data and it is stored in memory 522 or back-end storage device 530, then the DPU 521 of the smart network card 520 will migrate it to memory 522, using memory 522 as extended memory of the computing device to cache the warm data.
[0126] For example, if the target data is classified as cold data and is stored in the memory 510 of the computing device, the DPU 521 of the smart network interface card 520 will migrate it to the back-end storage device 522. During the migration process, the target data will pass through the memory 522 of the smart network interface card.
[0127] For example, in some embodiments, the smart network interface card 520 may also cache cold data in its memory 522. Compared to the aforementioned embodiments, the cold data in this embodiment is cached in the memory 522 of the smart network interface card 520, so the computing device can obtain the cold data more quickly when it needs to access it.
[0128] It is understood that the accessed data mentioned above includes the aforementioned memory data. The migration action mentioned above includes the aforementioned unloading action.
[0129] In this embodiment of the invention, memory management is implemented by the offloading card, eliminating the need for the CPU to obtain memory access information, thus reducing the CPU burden; the migration of access data between the computing device memory 510 and other storage media does not require the CPU, thereby improving data transmission efficiency.
[0130] The memory data management method of the present invention has been described above. The following describes an embodiment of the unloading card for performing the above-described corresponding method, with reference to Figures 6 to 9.
[0131] Figure 6 shows a schematic block diagram of an unloading card 600 according to an embodiment of the present invention. The unloading card 600 includes:
[0132] The information acquisition module 610 is used to acquire memory access information from the computing device. The memory access information is used to indicate the access frequency of memory data, which is stored in the memory of the computing device. At this time, the information acquisition module 610 can execute step 410 of the method shown in Figure 4.
[0133] The data recognition module 620 is used to identify target data through memory access information. At this time, the data recognition module 620 can execute step 420 of the method shown in Figure 4.
[0134] The data unloading module 630 is used to unload the target data to the target storage location. At this time, the data unloading module 630 can execute step 430 of the method shown in Figure 4.
[0135] In this solution, by identifying the target data to be unloaded from the computing device using an unloading card, frequent accesses of the computing device's central processing unit (CPU) to the computing device's memory can be avoided, thereby reducing CPU resource consumption. By unloading the target data to the target storage location using the unloading card, the computing device's CPU only accesses memory when the data is needed, avoiding memory access for data unloading, thus reducing cache pollution. The target data can be directly unloaded from memory to the target storage location without passing through the computing device's CPU, improving data transfer efficiency.
[0136] In some embodiments, the offloading card is a smart network interface card (NIC). A smart NIC is a network interface card that possesses the basic functions of a traditional NIC. In scenarios with massive data volumes (such as data center scenarios), computing devices need to acquire data from remote devices (such as network storage devices) or transmit data to remote devices for storage. Computing devices primarily access the network through NICs and then communicate with remote devices. Therefore, during data exchange with remote devices, the exchanged data naturally passes through the NIC. In this embodiment of the invention, using a smart NIC as an offloading card does not add a data transmission path, ensuring efficient data transmission between the computing device and the remote device.
[0137] Of course, the uninstallation card can also be a network card with built-in memory management functions.
[0138] In some embodiments, the data offloading module is specifically used to offload target data with different access frequencies to different target storage locations; the target storage locations include the memory of the offloading card or a back-end storage device.
[0139] In this solution, the memory of the offloading card is used as one of the target storage locations, forming a three-tiered storage structure between the memory of the computing device, the memory of the offloading card, and the backend storage device. Furthermore, based on the frequency of the target data, it can be offloaded to different levels of the storage structure, thereby optimizing memory usage efficiency and reducing memory costs.
[0140] In some embodiments, the target data includes cold data, and the data offloading module is specifically used to offload the cold data to a back-end storage device. Cold data is data that is accessed infrequently. In this solution, offloading cold data to a back-end storage device can optimize the memory space of the computing device.
[0141] In some embodiments, the data offloading module is further configured to cache cold data in the memory of the offloading card. In this solution, the memory of the offloading card is used as a cache for cold data. When the computing device needs to access cold data, it can directly access the cached cold data from the memory of the offloading card. Compared to accessing the external storage of a remote device via a network or accessing local external storage, the latency caused by the computing device directly accessing the memory of the offloading card is relatively small.
[0142] In some embodiments, the target data includes warm data, and the data offloading module is specifically used to offload the warm data to the memory of the offloading card. In this solution, the warm data is offloaded from the memory of the computing device to the memory of the offloading card, thereby freeing up the memory of the computing device and optimizing its memory space. If the computing device needs to access the warm data, it can directly access the memory of the offloading card. This solution utilizes the memory of the offloading card to cache the warm data, which is equivalent to using the memory of the offloading card as extended memory of the computing device, thus expanding the memory of the computing device and increasing its memory capacity.
[0143] In some embodiments, the target data includes one or more memory objects, each memory object including one or more memory pages; the data unloading module is specifically used to unload the target data on a cache line basis. As mentioned above, the granularity of memory objects is larger than that of memory pages. Compared to migration at the memory page level, migration at the memory object level in this embodiment of the invention can improve migration efficiency.
[0144] In some embodiments, the target data includes one or more memory pages, and each memory page includes one or more cache lines; the data offloading module is specifically used to offload the target data on a cache line basis. In this solution, since a smart network interface card (NIC) is used for memory management, memory data migration / offloading can be performed at the cache line granularity. Generally, memory data migration is done at the memory page granularity, which is too large and causes unnecessary data movement overhead. Compared to memory data migration at the memory page granularity, the cache line granularity is smaller, saving data movement overhead.
[0145] In some embodiments, the information acquisition module is specifically used to acquire memory object access information from the memory runtime of the computing device; the memory access information acquired from the memory runtime is used to indicate the access frequency of memory objects. As mentioned above, the memory access objects acquired from the memory runtime can reflect the access frequency of memory objects. After identifying cold memory objects, they can be evicted and moved to the backend storage device. After identifying warm memory objects, they can be migrated to the memory of the offloading card for caching.
[0146] Figure 7 shows a schematic block diagram of an unloading card 700 according to an embodiment of the present invention. The unloading card 700 includes:
[0147] The information acquisition module 710 is used to acquire memory access information from the computing device. This memory access information is used to indicate the frequency of data access by the processor of the computing device. At this time, the information acquisition module 710 can execute step 501 of the method shown in Figure 5.
[0148] For example, the accessed data could be data that an application running on the processor of a computing device needs to use.
[0149] For example, the access data may be stored in the memory 510 of the computing device, or in the memory 522 of the smart network card 520, or in a back-end storage device.
[0150] The specific steps for obtaining memory access information have been detailed in steps 501 and 410, and will not be repeated here.
[0151] The data recognition module 720 is used to identify target data through memory access information. At this time, the data recognition module 720 can execute step 502 of the method shown in Figure 5.
[0152] For example, the target data is the data that needs to be moved from one level of storage medium to another. The latency of different levels of storage medium is different. For example, the target data may be data that needs to be moved between the second and third levels as shown in Figure 1, or it may be data that needs to be moved between local storage and remote storage.
[0153] The specific steps for identifying target data have been detailed in step 502 and will not be repeated here.
[0154] The data unloading module 730 is used to migrate the target data to the target storage location. At this time, the data unloading module 730 can execute step 503 of the method shown in Figure 5.
[0155] For example, the current storage location of the target data does not match its popularity level, so it needs to be migrated to a target storage location that matches its popularity level.
[0156] The specific steps for migrating the target data have been detailed in step 503 and will not be repeated here.
[0157] The beneficial effects of the unloading card 700 shown in Figure 7 are similar to those of the unloading card 600 described in Figure 6, and will not be repeated here.
[0158] Figure 8 is a schematic block diagram of an unloading card provided in an embodiment of the present invention. As shown in Figure 8, the unloading card 800 includes: a memory 810, a processor 820, and a computer program; wherein, the computer program is stored in the memory 810 and configured to be executed by the processor 820 of the steps in Figure 4, or the steps in Figure 5. The processor 72 is used to implement the modules in Figures 6 and 7.
[0159] The memory 810 and the processor 820 are connected via a bus 830.
[0160] The relevant explanations can be understood by referring to the descriptions and effects of the steps in the embodiments corresponding to Figures 4 and 5, which will not be elaborated on here.
[0161] For example, FIG9 is a schematic block diagram of another unloading card provided in an embodiment of the present invention. As shown in FIG9, the unloading card 900 provided in this embodiment includes: a transceiver 910, a memory 930, a processor 920, and a computer program.
[0162] The processor 920 is used to control the transceiver 910 to transmit and receive signals. The computer program is stored in the memory 930 and is configured to be executed by the processor 920 to implement the method provided by any of the implementations corresponding to Figures 4 to 5 of the present invention.
[0163] The transceiver 910, memory 930, and processor 920 are connected via bus 940.
[0164] The relevant explanations can be understood by referring to the descriptions and effects of the steps in the embodiments corresponding to Figures 4 and 5, which will not be elaborated on here.
[0165] This invention also provides a computer-readable storage medium including computer code that, when run on a computer, causes the computer to perform the method provided by any of the implementations corresponding to Figures 4 and 5.
[0166] This invention also provides a computer program product, including program code. When a computer runs the computer program product, the program code executes the method provided by any of the implementation methods shown in Figures 4 to 5.
[0167] This invention also provides a chip, including a processor. The processor is used to call and run a computer program stored in a memory to execute the corresponding operations and / or processes performed by the unloading card in the memory data management method provided in any of the implementations corresponding to Figures 4 and 5. Optionally, the chip further includes a memory, which is connected to the processor via a circuit or wire. The processor is used to read and execute the computer program in the memory. Further optionally, the chip includes a communication interface, to which the processor is connected. The communication interface is used to receive data and / or information that needs to be processed. The processor obtains the data and / or information from the communication interface and processes the data and / or information. The communication interface may be an input / output interface.
[0168] It is important to note that the term "unloading" in the above embodiments can be interpreted differently in different scenarios. For example, in a scenario where the popularity levels include hot data and cold data, unloading the target data to the backend storage device can be understood as migrating it to the backend storage device; unloading the target data to the memory of the unloading card can be understood as caching it to the memory of the unloading card. In a scenario where the popularity levels include hot data, warm data, and cold data, unloading the target data to the memory of the unloading card can be understood as migrating it to the memory of the unloading card, and unloading the target data to the backend storage device can be understood as migrating it to the backend storage device. In a scenario where frequently accessed data is unloaded from the slow memory of the computing device to the high-speed memory of the computing device, unloading can be understood as migration. In a scenario where frequently accessed data is unloaded from the high-speed memory of the computing device to the slow memory, unloading can be understood as migration or caching. For example, in the hot data caching (caching of slower media with faster one) technology, the high-speed memory of the computing device is used as a cache for slow memory, so hot data will be cached from slow memory to high-speed memory. For example, in page migration technology, the high-speed memory and low-speed memory of the computing device are parallel memory structures. Hot pages will be migrated to fast memory, and cold pages will be migrated to slow memory.
[0169] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., SSD), etc.
[0170] Those skilled in the art will recognize that the functions described in the embodiments of the present invention in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
Claims
1. A memory data management method, characterized in that, include: The unloading card obtains memory access information from the computing device, the memory access information being used to indicate the access frequency of memory data, the memory data being stored in the memory of the computing device; The unloading card identifies target data from the memory of the computing device using the memory access information; The unloading card unloads the target data from the source location to the target storage location.
2. The memory data management method according to claim 1, characterized in that, The unloading card unloads the target data from the source location to the target storage location, specifically including one or more of the following: The unloading card unloads frequently accessed data from the low-speed memory of the computing device to the high-speed memory of the computing device. The unloading card unloads low-access data from the high-speed memory of the computing device to the low-speed memory of the computing device.
3. The memory data management method according to claim 1, characterized in that, The target storage location includes the memory of the offloading card or a back-end storage device, wherein the back-end storage device is a persistent storage device inside the computing device or a storage device outside the computing device; The unloading card unloads the target data from the source location to the target storage location, specifically including: The unloading card unloads the target data from its source location to the memory of the unloading card or the backend storage device based on the access frequency of the target data.
4. The memory data management method according to claim 3, characterized in that, The heat level of the memory data includes hot data and cold data, and the target data is cold data; The unloading card caches the target data in the memory of the unloading card; The unloading card also unloads the target data to the backend storage device; or, The heat registration of the memory data includes hot data, warm data, and cold data; If the target data is warm data, then the unloading card will unload the target data to the memory of the unloading card; If the target data is cold data, then the unloading process will unload the target data to the backend storage device.
5. The memory data management method according to claim 1, characterized in that, The unloading card obtains the memory access information from the memory of the computing device during runtime.
6. The memory data management method according to claim 1, characterized in that, The unloading card is provided with a computer bus interface for connecting to the computing device, and the unloading card receives the memory access information sent by the computing device through the computer bus interface.
7. The memory data management method according to any one of claims 1 to 6, characterized in that, The offloading card is a smart network card or a data processing unit (DPU).
8. The memory data management method according to any one of claims 1 to 6, characterized in that, Also includes: The central processing unit (CPU) of the computing device retrieves and processes the unloaded data from the memory; The central processing unit (CPU) of the computing device retrieves the unloaded target data from the target storage location and processes it.
9. An unloading card, characterized in that, include: An information acquisition module is used to acquire memory access information from a computing device. The memory access information is used to indicate the access frequency of memory data, and the memory data is stored in the memory of the computing device. The data recognition module is used to identify target data from the memory of the computing device using the memory access information; The data unloading module is used to unload the target data from the source location to the target storage location.
10. The unloading card according to claim 9, characterized in that, The data unloading module unloads the target data from the source location to the target storage location, specifically including one or more of the following: The data offloading module offloads frequently accessed data from the slow memory of the computing device to the high-speed memory of the computing device. The data offloading module offloads data with low access frequency from the high-speed memory of the computing device to the low-speed memory of the computing device.
11. The unloading card according to claim 9, characterized in that, The target storage location includes the memory of the offload card or a back-end storage device; the back-end storage device is a persistent storage device inside the computing device or a storage device outside the computing device. The data offloading module is specifically used to offload the target data from the memory of the computing device to the memory of the offloading card or the backend storage device based on the access frequency of the target data.
12. The unloading card according to claim 11, characterized in that, The heat level of the memory data includes hot data and cold data, and the target data is cold data; The data offloading module is specifically used to cache the target data in the memory of the offloading card; and also to offload the target data to the backend storage device; or, The heat registration of the memory data includes hot data, warm data, and cold data; The data offloading module is specifically used to, when the target data is warm data, offload the target data to the memory of the offloading card; and when the target data is cold data, offload the target data to the back-end storage device.
13. The unloading card according to claim 9, characterized in that, The target data includes one or more memory objects, and each memory object includes one or more memory pages; the data unloading module is specifically used to unload the target data on a unit basis (memory object); or... The target data includes one or more memory pages, and each memory page includes one or more cache lines; the data unloading module is specifically used to unload the target data on a cache line-by-cache basis.
14. The unloading card according to claim 13, characterized in that: The information acquisition module is specifically used to acquire the memory object access information from the memory runtime of the computing device. The memory access information obtained from the memory runtime is used to indicate the access frequency of memory objects.
15. The unloading card according to claim 9, characterized in that, The information acquisition module is specifically used to receive the memory access information sent by the computing device through the computer bus interface set on the unloading card.
16. The unloading card according to any one of claims 9 to 15, characterized in that, The offloading card is a smart network card or a data processing unit (DPU).
17. An unloading card, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the memory data management method as described in any one of claims 1 to 8 when running the computer program.
18. The unloading card according to claim 17, characterized in that, Also includes: Computer bus interface, used for communicating with computing devices; A network interface is used to connect the computing device to an external network.
19. A memory data management system, characterized in that: It includes a computing device and an offloading card as described in any one of claims 9 to 18, the offloading card being plugged into the computing device and communicating with the computing device via a computer bus.
Citation Information
Patent Citations
Data migration method and device and electronic equipment
CN116185553A
Memory access popularity statistical method, related device and equipment
CN117149049A
Remote memory system based on intelligent network card unloading
CN117785789A
Accelerated migration of compute instances using offload cards
US11474857B1