A method and computing device for DPU optimized image file operations

By optimizing the methods of image file operations and sharing the same data blocks among virtual machines, the problems of wasted virtual machine image file storage space and high operational complexity are solved, achieving more efficient data processing.

CN120821534BActive Publication Date: 2025-11-25SHENZHEN JAGUAR MICROSYSTEMS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511341402.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2025-11-25
Estimated Expiration
2045-09-19

AI Technical Summary

Technical Problem

In existing technologies, each virtual machine is allocated a complete cloud disk image file, which leads to problems such as wasted storage space, high operational complexity, and increased costs.

Method used

By acquiring the configured copy and snapshot algorithms, image file operations are optimized, reducing the creation of image copies and snapshots, sharing the same data blocks, and avoiding the allocation of full image space for each virtual machine.

Benefits of technology

It reduces disk usage, lowers operational complexity and costs, improves data read and write speed, and enhances data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821534B_ABST
    Figure CN120821534B_ABST
Patent Text Reader

Abstract

The application provides a method and a computing device for optimizing image file operation of a DPU, the method comprising: obtaining a configured copy algorithm; receiving a first virtual machine creation instruction; checking an image file corresponding to the first virtual machine and a current image copy number; judging whether to increase an image copy according to the copy algorithm and the current image copy number, and if the image copy needs to be increased, creating a new image copy; and starting the first virtual machine. According to the technical scheme of the application, a complete image space can be allocated for each virtual machine, the operation and maintenance complexity and cost are reduced, the data reading and writing speed is increased, and the data processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of network chip development, and in particular to a method for optimizing image file operation of a DPU and a computing device. BACKGROUND

[0002] In the prior art, a data processing unit (DPU) creates a separate cloud disk image for each virtual machine (VM), and the cloud disk image data is stored in a local or cloud image storage system. When the DPU creates a virtual machine using a cloud disk, it finds the corresponding cloud disk image according to the configuration and starts the virtual machine. Therefore, the number of virtual machines corresponds to the number of cloud disk images.

[0003] In fact, for virtual machines using the same release version cloud disk image, most of the image file data is the same, and only the data modified by the virtual machine is different. This results in a waste of storage space and an increase in DPU costs. If the same data area in the DPU image file can be shared, the current problem of multiple cloud disk images occupying storage space can be solved.

[0004] In the current DPU scenario, if a virtual machine is started using a cloud disk image, only one unique cloud disk image file can be used, or a unique cloud disk image can be loaded from a cloud storage cluster connected to the DPU. The existing technical solution configures a separate cloud disk image file for each virtual machine. As the number of virtual machines increases, the complexity and cost of operation and maintenance increase, storage space is wasted, and DPU costs rise, among other problems.

[0005] Therefore, a technical solution is needed that can avoid allocating a complete image space to each virtual machine, reduce disk occupancy, reduce the complexity and cost of operation and maintenance, increase data read / write speed, and improve data processing efficiency. SUMMARY

[0006] The present application aims to provide a method for optimizing image file operation of a DPU and a computing device that can avoid allocating a complete image space to each virtual machine, reduce disk occupancy, reduce the complexity and cost of operation and maintenance, increase data read / write speed, and improve data processing efficiency.

[0007] According to an aspect of the present application, a method for optimizing image file operation of a DPU is provided, the method comprising:

[0008] obtaining a configured copy algorithm;

[0009] receiving a first virtual machine creation instruction;

[0010] checking the first virtual machine corresponding image file and the current image copy number;

[0011] determining whether to increase the mirror copy according to the copy algorithm and the current number of mirror copies, and creating a new mirror copy if the mirror copy needs to be increased;

[0012] starting the first virtual machine.

[0013] According to some embodiments, the creating a new mirror copy comprises:

[0014] obtaining a configured data block size;

[0015] performing data block segmentation on the mirror file according to the data block size, and creating the mirror copy in units of the data block.

[0016] According to some embodiments, a snapshot algorithm is obtained;

[0017] After receiving an IO write request of the first virtual machine, a corresponding data block where data to be written is located is searched in a system index, and if the corresponding data block only exists in the mirror copy, a corresponding mirror snapshot is created according to the snapshot algorithm;

[0018] updating the content of the mirror snapshot and the system index.

[0019] According to some embodiments, the creating a corresponding mirror snapshot comprises:

[0020] creating the mirror snapshot in units of the data block.

[0021] According to some embodiments, after receiving an IO write request of the first virtual machine, a corresponding data block where data to be written is located is searched in a system index, and if the corresponding data block exists in the mirror snapshot, the content of the mirror snapshot and the system index are directly updated.

[0022] According to some embodiments, when receiving an IO read request of the first virtual machine, a corresponding data block where data to be read is located is searched in a system index;

[0023] if the corresponding data block exists in the mirror snapshot, data is read in the corresponding mirror snapshot;

[0024] if the corresponding data block does not exist in the mirror snapshot but exists in the mirror copy, data is read in the corresponding mirror copy.

[0025] According to some embodiments, the determining whether to increase the mirror copy according to the copy algorithm and the current number of mirror copies comprises:

[0026] calculating the required number of mirror copies according to the number of virtual machines corresponding to the mirror file.

[0027] If the current number of mirror replicas is less than the required number of mirror replicas, then add more mirror replicas.

[0028] According to some embodiments, a command to delete a first virtual machine is received;

[0029] Shut down the first virtual machine and delete its information;

[0030] Check the image file corresponding to the first virtual machine, and determine whether to delete the image copy based on the configured copy algorithm;

[0031] Check the image file corresponding to the first virtual machine, and determine whether to delete the image snapshot based on the configured snapshot algorithm;

[0032] Complete the deletion of the first virtual machine.

[0033] According to another aspect of the present invention, an apparatus for optimizing image file operations using a DPU is provided, the apparatus being managed through a scheduling center, the apparatus comprising:

[0034] The configuration information acquisition module is used to obtain the configuration replication algorithm;

[0035] A module is created to receive instructions to create the first virtual machine.

[0036] The inspection module is used to check the image file corresponding to the first virtual machine and the current number of image copies;

[0037] The replica management module is used to determine whether to add a mirror replica based on the replica algorithm and the current number of mirror replicas. If it is necessary to add a mirror replica, a new mirror replica is created.

[0038] According to another aspect of the present invention, an apparatus for optimizing image file operations using a DPU is provided. The apparatus is managed by a scheduling center, which includes a configuration information acquisition module, a creation module, an inspection module, and a copy management module.

[0039] The configuration information acquisition module is used to acquire the configuration copy algorithm;

[0040] The creation module is used to receive instructions to create a first virtual machine;

[0041] The inspection module is used to check the image file corresponding to the first virtual machine and the current number of image copies;

[0042] The replica management module is used to determine whether to add a mirror replica based on the replica algorithm and the current number of mirror replicas. If it is necessary to add a mirror replica, a new mirror replica is created.

[0043] According to another aspect of the present invention, a DPU chip is provided, the DPU chip performing the method according to any of the preceding claims.

[0044] According to another aspect of the present invention, a DPU smart network card is provided, the DPU smart network card comprising: a DPU chip as described above and a plurality of interfaces, wherein the DPU chip communicates externally through the interfaces.

[0045] According to another aspect of the present invention, a computing device is provided, comprising: a DPU smart network interface card and a central processing unit as described above, wherein the DPU smart network interface card is used to process virtual machine data or external communication, and the central processing unit is used to process virtual machine data scheduled by the DPU smart network interface card.

[0046] According to an embodiment of the present invention, a configured replica algorithm is obtained. Upon receiving a command to create a first virtual machine, the image file corresponding to the first virtual machine and the current number of image replicas are checked. Based on the replica algorithm and the current number of image replicas, it is determined whether to add an image replica. If it is necessary to add an image replica, a new image replica is created, and the successfully created first virtual machine is started. The present invention creates image replicas based on image file blocks according to the replica algorithm, avoiding the allocation of a complete image space for each virtual machine. Operating on image replicas can effectively reduce disk usage, lower operational complexity and costs, increase data read / write speed, and improve data processing efficiency.

[0047] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit the invention. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below.

[0049] Figure 1 A flowchart illustrating a method for optimizing image file operations according to an example embodiment is shown.

[0050] Figure 2 A schematic diagram of the configuration center architecture according to an example embodiment is shown.

[0051] Figure 3 A schematic diagram of the DPU storage architecture according to an example embodiment is shown.

[0052] Figure 4 This diagram illustrates the overall architecture of the implementation of the optimized image file operation method according to an example embodiment.

[0053] Figure 5A schematic diagram of an apparatus for optimizing image file operations for a DPU, according to an example embodiment, is shown.

[0054] Figure 6 A schematic diagram of the scheduling center interface architecture according to an example embodiment is shown.

[0055] Figure 7 A block diagram of a computing device according to an exemplary embodiment is shown. Detailed Implementation

[0056] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that the invention will be thorough and complete, and the concept of the exemplary embodiments will be fully conveyed to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.

[0057] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the invention.

[0058] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0059] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0060] It should be understood that although the terms first, second, third, etc., may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of the present invention. As used herein, the term "and / or" includes all combinations of any one and more of the associated listed items.

[0061] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily essential for implementing the present invention, and therefore cannot be used to limit the scope of protection of the present invention.

[0062] In existing technologies, the cloud disk image storage solution used by the Data Processing Unit (DPU) to manage virtual machines (VMs) suffers from significant resource waste. Specifically, current implementations create a separate, complete cloud disk image for each VM. Whether these image data are stored on local storage devices or in a cloud image storage system, they consume a large amount of physical storage space. When the DPU needs to create a VM, the system locates the corresponding independent cloud disk image file based on the configuration information and starts the VM instance based on that image.

[0063] A deeper analysis of this storage model reveals that when multiple virtual machines use cloud disk images of the same operating system distribution, much of the basic data in each image file is identical. The actual differences lie in the modified data generated after the virtual machines run. Current technology stores a complete copy of the image for each virtual machine. This redundant storage not only results in a significant waste of storage resources but also directly leads to several prominent problems. For example, as the scale of virtual machines increases, the storage system needs to allocate a complete image space for each new instance, causing storage demand to grow linearly and leading to a surge in storage costs. A large number of duplicate image files increases the management difficulty of the storage system; operations such as backup, migration, and version updates all require separate processing of each copy, increasing operational complexity. Duplicate data occupies storage space that could be used for other services, reducing the overall resource utilization efficiency of the DPU. When multiple virtual machines start simultaneously, the storage system needs to repeatedly read data from the same base image, causing unnecessary read / write (IO) load.

[0064] Existing solutions have significant limitations. While the problems are not obvious in small- to medium-scale deployments, the waste of storage resources becomes severe when the number of virtual machines reaches hundreds or even thousands. Especially with the rapid expansion of cloud computing and virtualization environments, this storage inefficiency directly translates into significant cost increases, including hardware procurement costs, data center space costs, energy consumption costs, and operation and maintenance costs. To address these issues, a new solution is urgently needed.

[0065] To address this, the present invention proposes a method for optimizing image file operations, which avoids allocating a complete image space for each virtual machine, reduces disk usage, lowers operational complexity and costs, increases data read and write speed, and improves data processing efficiency.

[0066] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention.

[0067] Figure 1 A flowchart illustrating a method for optimizing image file operations according to an example embodiment is shown.

[0068] See Figure 1 In S101, the configured copy algorithm is obtained.

[0069] According to some implementations, the DPU has a list of multi-algorithm supported by the system by default. When configuring a new algorithm in the configuration center via an interface, it must be in the list supported by the DPU.

[0070] According to some embodiments, the configuration center supports configuring multiple functions, including configuring the replication algorithm, configuring the snapshot algorithm, and configuring the size of the mirror data block (see Figure 2 After the DPU initialization is complete, the above three configurations can be set through the configuration center.

[0071] According to some embodiments, a replication algorithm for each base image is configured in the DPU configuration center. This replication algorithm can improve the read speed of virtual machines (VMs) and prevent multiple VMs from reading the same copy simultaneously.

[0072] In S103, the instruction to create the first virtual machine is received.

[0073] In S105, check the image file corresponding to the first virtual machine and the current number of image copies.

[0074] In some implementations, the image file corresponding to the first virtual machine to be created and the current number of image replicas are checked. The number of replicas to be created is calculated based on the number of VMs corresponding to the image; each replica represents the same data block across multiple VMs (see [link to implementation]). Figure 3 ).

[0075] In S107, based on the replication algorithm and the current number of mirror replicas, it is determined whether to add a mirror replica. If it is necessary to add a mirror replica, a new mirror replica is created.

[0076] In some embodiments, the data block size of the image is configured in the DPU's configuration center. This data block size determines the data block size of the image replica and the image snapshot. The default block size is 4MB, but the specific size can be configured by the user. The DPU will split the image according to the block size; both snapshots and replicas are measured in blocks.

[0077] According to some embodiments, when a VM is created, the replication algorithm of the configuration center is used to calculate whether an image replica needs to be created. The creation of the image replica first obtains the configured data block size, then divides the image file into data blocks according to the data block size, and creates the image replica in units of those data blocks.

[0078] According to some embodiments, the image copy is the same data block among multiple virtual machines. The required number of image copies is calculated based on the number of virtual machines corresponding to the image file. If the current number of image copies is less than the required number, more image copies are added. The functional relationship between the number of virtual machines and the number of image copies is as follows:

[0079]

[0080] Where N can be configured and changed according to specific actual requirements, and N is a natural number.

[0081] In some implementations, determining the number of replicas typically involves considering multiple factors. A comprehensive evaluation of these factors is conducted, and the creation decision is made based on the specific application scenario and performance requirements. When a large number of virtual machines need to start simultaneously or access the same image file, increasing the number of replicas can help distribute the load, reduce the workload of each replica, thereby improving overall performance, preventing data loss, and enhancing system availability.

[0082] In some implementations, replicas are created to increase read speed when multiple VMs are reading the same data. Multiple replicas reduce mutual exclusion when multiple VMs read the same data simultaneously, thus increasing read speed.

[0083] In S109, the first virtual machine is started.

[0084] According to some embodiments, the first virtual machine data file includes an image file (i.e., a base image), an image copy, and an image snapshot. See also the overall architecture of this invention. Figure 4 .

[0085] According to some implementations, after the VM starts, for IO write data requests, a snapshot is generated according to the snapshot algorithm, and the modified and newly written data is saved.

[0086] According to some embodiments, after the first virtual machine starts, it obtains the configured snapshot algorithm. Upon receiving an IO write request from the first virtual machine, it searches the system index for the corresponding data block containing the data to be written. If the corresponding data block exists only in the image copy, it creates a corresponding image snapshot according to the snapshot algorithm, and finally updates the content of the image snapshot and the system index. The image snapshot is created on a per-data-block basis.

[0087] According to some embodiments, after receiving the IO write request from the first virtual machine, the system index is searched for the corresponding data block where the data to be written is located. If the corresponding data block exists in the image snapshot, the content of the image snapshot and the system index are directly updated.

[0088] According to some embodiments, when updating the snapshot content, the system index is also updated. Upon receiving an I / O write request from the VM, the system index (map) is consulted to find the corresponding replica or snapshot block for that data. If the data corresponds to a replica block, a snapshot is created according to the snapshot algorithm, and the snapshot content is updated, along with the system index (map).

[0089] According to some embodiments, a snapshot algorithm is configured in the DPU's configuration center, and then the base image is uploaded. The snapshot algorithm includes a copy-on-write algorithm and / or a redirect-on-write algorithm.

[0090] According to some embodiments, the copy-on-write algorithm copies the data of the image file and / or the image copy to a new location and performs the write operation at the original location. The redirect-on-write algorithm redirects the new data written by the write operation to a new location, while the original data remains unchanged; that is, any modification to the existing data will not overwrite the original data.

[0091] According to some implementations, snapshots are an important concept in virtualized storage, allowing users to save the state of data at a specific point in time. This is particularly useful when system backups, recovery, or testing of different software configurations are needed without affecting the original data. The two main techniques for implementing snapshots are Copy-On-Write (COW) and Redirect-On-Write (ROW).

[0092] Copy-on-Write (COW) is a method for creating snapshots where the snapshot shares these data blocks with the source volume, even if they haven't been modified. When a write operation occurs (i.e., data is modified), the COW mechanism first copies the original data to a new location and then performs the write operation at the original location. The advantage of this is that snapshot creation is very fast because it doesn't require copying the entire volume's data. Each write operation requires an additional step to copy the original data. COW's strength lies in its rapid snapshot creation; however, in environments with frequent writes, it may incur some performance overhead. It doesn't require additional storage space to create snapshots until data modification begins.

[0093] ROW is also a technique for creating snapshots, but it works slightly differently from COW. In ROW, newly written data is redirected to a new location, while the original data remains unchanged. This means any modifications to existing data will not overwrite the original data, thus maintaining snapshot consistency. Compared to COW, ROW reduces the performance overhead caused by write operations because it doesn't require copying old data before writing new data. ROW's key features are reduced performance impact from write operations, the need to allocate additional storage space for each snapshot to store newly written data, and the potential for more complex snapshot deletion due to the need to integrate different versions of data.

[0094] Both COW and ROW are effective methods for implementing snapshots, but they are suitable for different scenarios. If the application is very sensitive to write operation performance, ROW may be a better choice; while if snapshot creation speed and initial storage efficiency are more important, then COW may be more suitable.

[0095] In some implementations, snapshots are created to store only a portion of the data (block units), avoiding the storage of the entire image and saving storage space. If there is a request to modify or add content to a block of a replica, a snapshot of that block is required. When a VM makes a write request to the image, it first matches the corresponding replica or snapshot block. If the data corresponds to a block of a replica, a snapshot of that block of the replica is needed to store the corresponding written data.

[0096] According to some embodiments, when an IO read request from the first virtual machine is received, the system index is searched for the corresponding data block where the data to be read is located. If the corresponding data block exists in the image snapshot, the data is read from the corresponding image snapshot; if the corresponding data block does not exist in the image snapshot but exists in the image copy, the data is read from the corresponding image copy.

[0097] According to some implementations, when an I / O read request is received from a VM, the system's index (map) is used to look up the corresponding copy or snapshot block of the data, and then the data is read from the corresponding copy or snapshot.

[0098] According to some embodiments, after receiving an IO read data request initiated by the virtual machine, the data storage location is located, the location of the original data block where the data is located is determined, the read path is determined, and it is decided which data blocks to read from.

[0099] According to some embodiments, this invention, for scenarios where multiple VMs are launched on a DPU, can utilize a snapshot algorithm to eliminate the need to allocate a complete image space for each VM, significantly reducing disk usage. Based on a replication algorithm, multiple replicas are created for a single block of the image. When multiple VMs simultaneously send IO read requests, the IO pressure is distributed across multiple replicas, accelerating the IO performance of the front-end VMs. This invention enables the sharing of identical data areas within DPU image files, solving the current problem of multiple cloud disk images occupying excessive storage space.

[0100] Figure 5 A schematic diagram of an apparatus for optimizing image file operations for a DPU, according to an example embodiment, is shown.

[0101] See Figure 5 This invention provides an apparatus for optimizing image file operations using a DPU. The apparatus is managed by a scheduling center, which includes a configuration information acquisition module, a creation module, a checking module, and a copy management module.

[0102] According to some embodiments, the configuration information acquisition module is used to acquire the configured replica algorithm, the creation module is used to receive the instruction to create a first virtual machine, the checking module is used to check the image file corresponding to the first virtual machine and the current number of image replicas, and the replica management module is used to determine whether to add an image replica based on the replica algorithm and the current number of image replicas. If it is necessary to add an image replica, a new image replica is created.

[0103] According to some embodiments, the scheduling center also includes an image management module for managing image snapshots, such as creating and deleting them.

[0104] According to some embodiments, the DPU performs data operations on the device through a scheduling center. The scheduling center's functions include retrieving configuration information from a configuration center, creating VMs, deleting VMs, creating image snapshots, creating image copies, deleting image snapshots, and deleting image copies. The scheduling center provides external interfaces for creating and deleting VMs (see...). Figure 6 ).

[0105] According to some embodiments, the scheduling center is one of the key components in the cloud computing platform, mainly responsible for coordinating and managing the lifecycle and operation of virtual resources. The scheduling center obtains configuration information such as replicas and snapshots required to create VMs from the configuration center; the scheduling center calls the underlying virtualization platform to create virtual machine instances; the scheduling center can generate replicas based on existing images, which can be used to improve image availability, disaster recovery, or cross-region deployment; the snapshots created by the scheduling center are backups of the replicas, and when write operations are performed on a replica, the scheduling center creates a snapshot of the current replica based on the snapshot information.

[0106] According to some embodiments, the process of deleting a VM is as follows: receiving a command to delete a first virtual machine; shutting down the first virtual machine and deleting the information of the first virtual machine; checking the image file corresponding to the first virtual machine and determining whether to delete the image copy according to the configured copy algorithm; checking the image file corresponding to the first virtual machine and determining whether to delete the image snapshot according to the configured snapshot algorithm; and completing the deletion of the first virtual machine.

[0107] According to some embodiments, when the scheduling center receives an instruction to delete a VM, the scheduling center shuts down the VM, deletes the VM information, checks the image file corresponding to the VM, determines whether the replica needs to be deleted based on the configured replica algorithm, checks the image file corresponding to the VM, determines whether the snapshot needs to be deleted based on the configured snapshot algorithm, and finally completes the deletion of the VM.

[0108] According to some embodiments, the present invention uses a configuration center on the DPU for unified configuration, creates different numbers of replicas according to the replica algorithm, saves storage space, reduces the pressure of multiple VMs on IO read data requests for the same data area, reduces DPU cost, and reduces disk usage and improves performance by configuring different snapshot algorithms, thereby increasing the reading speed of large blocks of data.

[0109] According to another aspect of this application, the present invention also provides a DPU chip that performs the above-described method.

[0110] According to another aspect of this application, the present invention also provides a DPU smart network card, the DPU smart network card including the DPU chip as described above and multiple interfaces, the DPU chip communicating externally through the interfaces.

[0111] According to another aspect of this application, the present invention also provides a computing device, including a DPU smart network interface card and a central processing unit as described above, wherein the DPU smart network interface card is used to process virtual machine data or external communication, and the central processing unit is used to process virtual machine data scheduled by the DPU smart network interface card.

[0112] Figure 7 A block diagram of a computing device according to an exemplary embodiment of the present invention is shown.

[0113] like Figure 7 As shown, the computing device 30 includes a processor 12 and a memory 14. The computing device 30 may also include a bus 22, a network interface card 16, and an I / O interface 18. The processor 12, memory 14, network interface card 16, and I / O interface 18 can communicate with each other via the bus 22.

[0114] Processor 12 may include one or more general-purpose CPUs (Central Processing Units), microprocessors, or application-specific integrated circuits, for executing relevant program instructions. According to some embodiments, computing device 30 may also include a high-performance display adapter (GPU) 20 for accelerating processor 12.

[0115] Memory 14 may include a machine system readable medium in the form of volatile memory, such as random access memory (RAM), read-only memory (ROM), and / or cache memory. Memory 14 is used to store one or more programs containing instructions, as well as data. Processor 12 may read the instructions stored in memory 14 to perform the methods described above according to embodiments of the present invention.

[0116] The computing device 30 can also communicate with one or more networks via the network interface card 16. The network interface card 16 can be a DPU smart network card.

[0117] Bus 22 can include address bus, data bus, control bus, etc. Bus 22 provides a path for exchanging information between components.

[0118] It should be noted that, in specific implementations, the computing device 30 may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the device described above may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0119] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), network storage devices, cloud storage devices, or any type of medium or device suitable for storing instructions and / or data.

[0120] This invention also provides a computer program product comprising a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments.

[0121] Those skilled in the art will clearly understand that the technical solutions of the present invention can be implemented by means of software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware capable of independently performing or cooperating with other components to perform a specific function, wherein the hardware may be, for example, a field-programmable gate array (FPGA), an integrated circuit, etc.

[0122] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0123] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0124] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0125] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0126] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0127] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention.

[0128] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0129] Exemplary embodiments of the present invention have been specifically shown and described above. It should be understood that the present invention is not limited to the detailed structures, arrangements, or implementations described herein; rather, the present invention is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended provisions.

Claims

1. A method for optimizing image file operations in a DPU, characterized in that, The method includes: Obtain the configured replication algorithm; Receive the instruction to create the first virtual machine; Check the image file corresponding to the first virtual machine and the current number of image replicas; Based on the replication algorithm and the current number of image replicas, determine whether to add an image replica: Calculate the required number of image replicas based on the number of virtual machines corresponding to the image file, ensuring that the number of virtual machines is a multiple of the number of image replicas; if the current number of image replicas is less than the required number of image replicas, create a new image replica: Obtain the configured data block size; divide the image file into data blocks according to the data block size, and create the image replica in units of the data blocks; Start the first virtual machine; The snapshot algorithm is configured. After receiving the IO write request of the first virtual machine, the corresponding data block where the data to be written is located is found in the system index. If the corresponding data block only exists in the image copy, the corresponding image snapshot is created according to the snapshot algorithm, and the content of the image snapshot and the system index are updated. When an I / O read request is received from the first virtual machine, the system index is searched for the corresponding data block containing the data to be read. If the corresponding data block exists in the image snapshot, the data is read from the corresponding image snapshot. If the corresponding data block does not exist in the image snapshot but exists in the image copy, the data is read from the corresponding image copy.

2. The method according to claim 1, characterized in that, Creating the corresponding image snapshot includes: The image snapshot is created on a per-data-block basis.

3. The method according to claim 2, characterized in that, Also includes: Upon receiving the IO write request from the first virtual machine, the system index is searched for the corresponding data block containing the data to be written. If the corresponding data block exists in the image snapshot, the content of the image snapshot and the system index are updated directly.

4. The method according to claim 1, characterized in that, Also includes: Receive the command to delete the first virtual machine; Shut down the first virtual machine and delete its information; Check the image file corresponding to the first virtual machine, and determine whether to delete the image copy based on the configured copy algorithm; Check the image file corresponding to the first virtual machine, and determine whether to delete the image snapshot based on the configured snapshot algorithm; Complete the deletion of the first virtual machine.

5. An apparatus for optimizing image file operations using a DPU, characterized in that, The device is managed through a dispatch center, and the device includes: The configuration information acquisition module is used to obtain the configuration replication algorithm; A module is created to receive instructions to create the first virtual machine. The inspection module is used to check the image file corresponding to the first virtual machine and the current number of image copies; The replica management module is used to determine whether to add an image replica based on the replica algorithm and the current number of image replicas: It calculates the required number of image replicas based on the number of virtual machines corresponding to the image file, with the number of virtual machines being a multiple of the number of image replicas; if the current number of image replicas is less than the required number of image replicas, it creates a new image replica: it obtains the configured data block size; it divides the image file into data blocks according to the data block size, and creates the image replica in units of the data blocks; The image management module is used to obtain the configured snapshot algorithm. After receiving an IO write request from the first virtual machine, it searches for the corresponding data block containing the data to be written in the system index. If the corresponding data block exists only in the image replica, it creates a corresponding image snapshot according to the snapshot algorithm and updates the content of the image snapshot and the system index. When receiving an IO read request from the first virtual machine, it searches for the corresponding data block containing the data to be read in the system index. If the corresponding data block exists in the image snapshot, it reads the data in the corresponding image snapshot. If the corresponding data block does not exist in the image snapshot but exists in the image replica, it reads the data in the corresponding image replica.

6. A DPU chip, characterized in that, The DPU chip performs the method according to any one of claims 1-4.

7. A DPU smart network card, characterized in that, The DPU smart network card includes: the DPU chip according to claim 6 and multiple interfaces, wherein the DPU chip communicates externally through the interfaces.

8. A computing device, characterized in that, include: According to claim 7, the DPU smart network interface card and the central processing unit are used to process virtual machine data or external communication, and the central processing unit is used to process virtual machine data scheduled by the DPU smart network interface card.

Citation Information

Patent Citations

  • Backup agent deployment method and system and storage medium

    CN117785558A

  • Method and apparatus for virtual machine live storage migration in heterogeneous storage environment

    US20150234617A1