Method and device for controlling startup of virtual machine based on cloned cloud disk and electronic equipment

By downloading multiple snapshot copies and forming cloned cloud disks during the virtual machine startup process, the problem of cloud disk read hotspots was solved, and the performance of cloud disks and the startup speed of virtual machines were improved.

CN119025219BActive Publication Date: 2026-04-10BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING VOLCANO ENGINE TECH CO LTD
Filing Date
2024-08-14
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Cloud disks can easily create read hotspots during the rapid startup of virtual machines, leading to increased pressure on the storage cluster and reduced performance.

Method used

By receiving lazy loading requests from virtual machines, the target snapshot data is obtained and at least two snapshot copies are downloaded to form a cloned cloud disk. Data is loaded using the log files corresponding to multiple snapshot copies, thus avoiding read hotspot issues.

Benefits of technology

It improved the performance of cloud disks, reduced the pressure on storage clusters from read hotspots, and increased virtual machine startup speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025219B_ABST
    Figure CN119025219B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a virtual machine startup control method and device based on cloned cloud disks and electronic equipment. The method comprises receiving a lazy loading request sent by a virtual machine to a cloud disk of an elastic block storage, obtaining target snapshot data, and sending a snapshot download request to a mirror center to download at least two snapshot copies. The cloud disk is used to store data resources required for starting the virtual machine. The snapshot copy is mirror data of the data resources required for starting the virtual machine. The target snapshot data is data resources required for a target function of the running virtual machine. Each cloud disk is connected to a corresponding snapshot copy to obtain log files corresponding to the at least two snapshot copies respectively. The cloud disk loads the log files corresponding to the snapshot copies to form a cloned cloud disk, and starts the virtual machine based on the cloned cloud disk. By downloading multiple snapshot copies from the mirror center during lazy loading, the performance of the cloud disk is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the technical field of cloud computing, and particularly relate to a virtual machine startup control method and device based on cloned cloud disks and electronic equipment. BACKGROUND

[0002] Currently, there are a large number of elastic demands in cloud computing services, such as elastic computing services (ECS), and the like. The system can quickly start a large number of virtual machines through batch cloning according to the demands of users. In this process, in order to achieve the quick startup of the virtual machine, the system will use the lazy loading (Lazy load) technology to download the image data, and at the same time, synchronously download and load part of the block data in the virtual machine startup process to the corresponding cloud disk, so as to achieve the quick startup of the virtual machine. After the image data is downloaded, the data resources are loaded to the cloud disk through the image data, and the complete startup of the virtual machine is realized.

[0003] In the prior art, in the process of loading the data resources to the cloud disk through the downloaded image data, the problem of easy formation of read hot spots exists, thereby causing pressure to the storage cluster and reducing the performance of the cloud disk. SUMMARY

[0004] Embodiments of the present disclosure provide a virtual machine startup control method and device based on cloned cloud disks and electronic equipment to overcome the problem of easy formation of read hot spots in the cloud disk.

[0005] In a first aspect, embodiments of the present disclosure provide a virtual machine startup control method based on cloned cloud disks, comprising:

[0006] receiving a lazy loading request sent by a virtual machine to a cloud disk of elastic block storage, obtaining target snapshot data, and sending a snapshot download request to an image center to download at least two snapshot copies, wherein the cloud disk is used to store data resources required for starting the virtual machine, the snapshot copy is image data of the data resources required for starting the virtual machine, and the target snapshot data is data resources required for running a target function of the virtual machine; connecting each cloud disk to a corresponding snapshot copy to obtain log files corresponding to the at least two snapshot copies, respectively; loading the log files corresponding to the snapshot copies through the cloud disk to form a cloned cloud disk, and starting the virtual machine based on the cloned cloud disk.

[0007] In a second aspect, embodiments of the present disclosure provide a virtual machine startup control device based on cloned cloud disks, comprising:

[0008] The processing module is used to receive lazy loading requests sent by the virtual machine to the cloud disk of the elastic block storage, obtain target snapshot data, and send a snapshot download request to the image center to download at least two snapshot copies. The cloud disk is used to store the data resources required to start the virtual machine, the snapshot copy is the image data of the data resources required to start the virtual machine, and the target snapshot data is the data resources required to run the target function of the virtual machine.

[0009] A storage module is used to connect each of the cloud disks to the corresponding snapshot replicas to obtain log files corresponding to the at least two snapshot replicas respectively;

[0010] The loading module is used to load the log file corresponding to the snapshot copy through the cloud disk to form a cloned cloud disk, and to start the virtual machine based on the cloned cloud disk.

[0011] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory;

[0012] The memory stores computer-executed instructions;

[0013] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the virtual machine startup control method based on cloned cloud disks as described in the first aspect and various possible designs of the first aspect.

[0014] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the virtual machine startup control method based on a cloned cloud disk as described in the first aspect and various possible designs of the first aspect.

[0015] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the virtual machine startup control method based on a cloned cloud disk as described in the first aspect and various possible designs of the first aspect.

[0016] This embodiment provides a virtual machine startup control method, apparatus, and electronic device based on cloned cloud disks. It receives lazy loading requests from the virtual machine to a cloud disk in Elastic Block Storage, obtains target snapshot data, and sends snapshot download requests to an image center to download at least two snapshot copies. The cloud disk stores the data resources required to start the virtual machine, and the snapshot copies are image data of the data resources required to start the virtual machine. The target snapshot data is the data resources required to run the target function of the virtual machine. Each cloud disk is connected to its corresponding snapshot copy to obtain log files corresponding to the at least two snapshot copies. The log files corresponding to the snapshot copies are loaded onto the cloud disks to form cloned cloud disks, and the virtual machine is started based on these cloned cloud disks. By downloading multiple snapshot copies from the image center during lazy loading, multiple sets of log files corresponding to the snapshot copies are formed in the file storage system. This allows the cloud disk to obtain the required data resources from multiple sets of log files, forming cloned cloud disks, avoiding read hotspots and improving cloud disk performance. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This diagram illustrates an application scenario of the virtual machine startup control method based on a cloned cloud disk provided in this disclosure.

[0019] Figure 2 A flowchart illustrating the virtual machine boot control method based on cloned cloud disks provided in this disclosure embodiment. Figure 1 ;

[0020] Figure 3 for Figure 2 A flowchart illustrating the specific implementation of step S102 in the illustrated embodiment;

[0021] Figure 4 This is a schematic diagram illustrating a process of connecting multiple snapshot copies to a cloud disk, as provided in an embodiment of the present disclosure.

[0022] Figure 5 A flowchart illustrating the virtual machine boot control method based on cloned cloud disks provided in this disclosure embodiment. Figure 2 ;

[0023] Figure 6 for Figure 5A flow chart of the specific implementation of step S204 in the illustrated embodiment;

[0024] Figure 7 For Figure 6 A flow chart of the specific implementation of step S2042 in the illustrated embodiment;

[0025] Figure 8 For Figure 5 A flow chart of the specific implementation of step S208 in the illustrated embodiment;

[0026] Figure 9 A structural block diagram of the virtual machine start control device based on the cloned cloud disk provided by the embodiment of the present disclosure;

[0027] Figure 10 A structural schematic diagram of an electronic device provided by the embodiment of the present disclosure;

[0028] Figure 11 A hardware structural schematic diagram of an electronic device provided by the embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] To make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are some but not all of the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present disclosure.

[0030] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0031] First, the technical terms in the prior art are introduced:

[0032] Virtual Machine (VM): refers to a complete computer system with complete hardware system function simulated by software, running in a completely isolated environment, provided by a cloud service provider to a cloud tenant.

[0033] Elastic Computing Service (ECS): A service provided by cloud services, used to dynamically expand and reduce computing resources (such as memory, bandwidth, infrastructure, etc.).

[0034] Elastic Block Storage (EBS): A service provided by cloud services, used to dynamically expand and reduce storage resources.

[0035] Node: A service machine in ECS and EBS

[0036] Cluster: A management unit in ECS and EBS, composed of multiple nodes

[0037] Availability Zone (AZ): A management unit of user-independent power and network resources in cloud computing, containing multiple clusters

[0038] Region: A management unit of a single region in cloud computing, containing multiple availability zones.

[0039] BlockDevice: A virtual block device provided by EBS, including empty disks and snapshot cloned cloud disks.

[0040] DeviceSegment: Cloud disks are divided into Segments according to a fixed size, such as 32GB.

[0041] Snapshot: A value-added service of EBS, which saves the instantaneous data snapshot of the cloud disk on the object storage.

[0042] SnapshotCopy: The storage form of snapshot data after downloading to the EBS cluster.

[0043] SnapshotSegment: Snapshot copies are divided into Segments according to a fixed size, such as 4GB.

[0044] Strip: Package block strip size (e.g. 32KB), strip quantity (e.g. 64).

[0045] Image: A single snapshot or a set of snapshots used to start a VM, with data stored in snapshot format.

[0046] ImageCenter: A module in ECS responsible for managing images.

[0047] Batch cloning: Batch creating cloud disks based on an image and running virtual machine instances based on cloud disks.

[0048] Lazyload: In the process of creating a virtual machine by mirroring and starting, the virtual machine can be started directly without waiting for the mirror data to be loaded to the cloud disk.

[0049] The application scenarios of the embodiments of the present disclosure are explained as follows:

[0050] Figure 1 An application scenario diagram of the virtual machine start control method based on cloned cloud disks provided by the embodiments of the present disclosure is shown in FIG. 1. The virtual machine start control method based on cloned cloud disks provided by the embodiments of the present disclosure can be applied to the application scenario of batch cloning and starting virtual machines. The execution subject of the present embodiment can be an elastic computing service or a physical machine, a server providing the elastic computing service, and an electronic device having a similar function.

[0051] In some embodiments, the physical machine, the server, and the like can implement the virtual machine start control method based on cloned cloud disks provided by the embodiments of the present disclosure by running various computer executable instructions or computer programs. For example, the computer executable instructions can be program-level commands, machine instructions, or software instructions. The computer program can be a native program or a software module in an operating system; can be a local application program, that is, a program that needs to be installed in an operating system to run, or a program running based on a browser environment. In summary, the above computer executable instructions can be any form of instructions, and the above computer programs can be any form of application programs, modules, or plug-ins, and the specific implementation form can be configured as needed. Further, in some embodiments, the physical machine, the server can be an independent physical server, can be a server cluster or a distributed system composed of multiple physical servers, can also be a cloud server providing cloud services, cloud storage, cloud communication, cloud database, cloud computing, cloud function, network service, middleware service, domain name service, security service, content delivery network (CDN), and big data and artificial intelligence platform, and the like basic cloud computing services.

[0052] Reference Figure 1As shown in the application scenario of batch cloning virtual machines, the cloud disks are quickly cloned and the virtual machines are started through the lazy loading technology, and the specific process is as follows: after the VM in the ECS cluster sends a lazy loading request to the cloud disk in the EBS cluster, on the one hand, the cloud disk in the EBS cluster sends a data reading request to the object storage unit to obtain the corresponding block data and write it into the cloud disk; on the other hand, the cloud disk in the EBS cluster sends a request to the image center (object storage unit) to download the snapshot copy. After the snapshot copy is downloaded, the data sharing of the snapshot copy is realized by generating a log (Log) file in the distributed file system, the cloud disk sends a file reading request for the log file of the snapshot copy to the distributed file system, so as to write the above log file into the cloud disk, and finally realize the cloning of the cloud disk and complete the starting process of the virtual machine.

[0053] In the prior art, in the cloud disk batch cloning scenario, after the snapshot copy is downloaded, it is shared to a large number of cloud disks at the same time, when these cloud disks simultaneously initiate data reading requests, the log data corresponding to the snapshot copy is easy to form a read hot spot, thereby causing pressure on the storage cluster and reducing the performance of the cloud disk.

[0054] The embodiment of the present disclosure provides a virtual machine starting control method based on cloned cloud disks to solve the above problems.

[0055] Reference Figure 2 , Figure 2 The flowchart of the virtual machine starting control method based on cloned cloud disks provided by the embodiment of the present disclosure is shown in Figure 1 The method of the embodiment can be applied in a server, and the virtual machine starting control method based on cloned cloud disks comprises the following steps.

[0056] Step S101: receiving a lazy loading request sent by a virtual machine to a cloud disk of an elastic block storage, obtaining target snapshot data, and sending a snapshot download request to an image center to download at least two snapshot copies, wherein the cloud disk is used to store data resources required for starting the virtual machine, the snapshot copy is image data of the data resources required for starting the virtual machine, and the target snapshot data is data resources required for a target function of the running virtual machine.

[0057] Step S102: connecting each cloud disk to a corresponding snapshot copy to obtain log files corresponding to the at least two snapshot copies respectively.

[0058] Step S103: loading the log files corresponding to the snapshot copies through the cloud disks to form cloned cloud disks, and starting the virtual machine based on the cloned cloud disks.

[0059] Exemplarily, reference is made to Figure 1The application scenario diagram shown, the cloud disk is a functional unit for storing data resources required for starting a virtual machine, wherein the data resources include, for example, operating systems, application programs, configuration files, and other data required for running a virtual machine. The cloud disk is located in the elastic block storage and can be elastically increased or deleted as needed. When a virtual machine in the elastic computing service cluster starts, it needs to load the corresponding resource data into the cloud disk, and therefore sends a data loading request to the cloud disk located in the elastic block storage to instruct the cloud disk to load the resource data. In a scenario where the virtual machine is started based on the lazy loading technology, the virtual machine sends a lazy loading request to the cloud disk located in the elastic block storage. After receiving the lazy loading request, the cloud disk, on one hand, obtains the block data corresponding to the target function of running the virtual machine, i.e., the target snapshot data, from the external object storage unit according to the current start state and stage of the virtual machine, and specifically implements the method by sending a data reading request for the target snapshot data to the object storage unit, receiving the target snapshot data returned by the object storage unit, and writing the target snapshot data into the cloud disk to start the target function of the virtual machine based on the target snapshot data in the cloud disk. On the other hand, the cloud disk sends a snapshot download request to the image center to download at least two snapshot copies. The snapshot copy is a snapshot data format, which is an image data of the data resources required for starting the virtual machine. The snapshot copy is a necessary resource for cloning the cloud disk, and its specific implementation method is not described herein.

[0060] It should be noted that the snapshot download request from the cloud disk to the image center in the step of the embodiment downloads at least two snapshot copies from the image center. Meanwhile, each cloud disk is connected to a corresponding snapshot copy to obtain a log file corresponding to the snapshot copy. The log file is another data storage format of the snapshot copy, which is stored in a distributed file storage system and then distributed by the file storage system to realize sharing of the snapshot copy. In a possible implementation manner, as shown in Figure 3 The specific implementation of step S102 includes the following steps.

[0061] Step S1021: sending an image data reading request to the distributed file storage system through the cloud disk;

[0062] Step S1022: obtaining a log file corresponding to the snapshot copy through the file storage system and sending it to the corresponding cloud disk.

[0063] Exemplarily, the file storage system can be a distributed file storage server, which is arranged inside or outside the device as the execution subject of the embodiment. After sending the mirror data reading request to the file storage system through the cloud disk, the file storage system retrieves the corresponding snapshot copy, and based on the data transmission strategy of the distributed system, returns to the corresponding cloud disk, so that the cloud disk obtains the connected snapshot copy log file.

[0064] After that, the cloud disk loads the log file to form a cloned cloud disk. The cloned cloud disk is a virtual block device formed by loading the data resource corresponding to the snapshot copy, and the content carried by the cloned cloud disk is a "clone" of the data provided by the snapshot service, and finally realizes the purpose of cloning and starting the virtual machine.

[0065] Based on the above introduction, after receiving the lazy loading request, the focus of driving the virtual machine to start can be divided into two execution stages. The first execution stage is before the snapshot copy download is completed. The process of driving the partial function of the virtual machine to run and start is to obtain the target snapshot data from the object storage unit and write the target snapshot data into the cloud disk, that is, the lazy loading stage. The second execution stage is after the snapshot copy download is completed. The cloud disk sends a data request to the file storage system to obtain the log file corresponding to the snapshot copy, and forms a cloned cloud disk by loading the log file.

[0066] Among them, the read traffic control during the first execution stage is different from the read traffic control after the snapshot copy download is completed in the second execution stage. Since the main read in the lazy loading stage is read from the memory Cache or read from the object storage, the traffic is only related to the number of nodes of the cluster, and the traffic of the lazy loading stage can be completely scattered on all nodes, and all cloud disks in the lazy loading stage share the same bandwidth. However, in the second execution stage after the snapshot copy download is completed, although it can be scattered on all nodes, the traffic of a single data block will be limited by the service thread and the hard disk bandwidth, thereby affecting the read performance of the cloud disk. In the embodiment, since multiple snapshot copies are stored in the elastic block storage, multiple log files corresponding to the snapshot copies are formed in the file storage system, which is equivalent to increasing the total bandwidth resource supply, thereby reducing the influence of bandwidth resource limitation on data transmission performance when the cloud disk accesses the log file, thereby improving the performance of the cloud disk.

[0067] Figure 4 A process diagram of connecting multiple snapshot copies by the cloud disk provided by the embodiment of the disclosure is shown in FIG. 1. Figure 4As shown, the cloud disk sends a download request to the image center, and then downloads multiple snapshot backups in the elastic block storage (EBS cluster). The snapshot backups are stored in the distributed file storage system in the form of log files. During the process of continuously creating cloud disks (Device in the figure), each cloud disk is connected to the corresponding snapshot backup, and obtains the corresponding log file through the distributed file storage system, so that each cloud disk can load the log file with a larger read traffic to quickly complete cloud disk cloning and improve the performance of the cloud disk.

[0068] In this embodiment, after receiving the lazy loading request sent by the virtual machine in the elastic computing service cluster to the cloud disk located in the elastic block storage, the target snapshot data is obtained, and a snapshot download request is sent to the image center to download at least two snapshot copies. The cloud disk is used to store data resources required to start the virtual machine, the snapshot copy is the image data of the data resources required to start the virtual machine, and the target snapshot data is the data resources required for the target function of the running virtual machine. Each cloud disk is connected to the corresponding snapshot copy to obtain the log file corresponding to the snapshot copy. The virtual machine is started based on the cloned cloud disk formed by loading the log file corresponding to the snapshot copy through the cloud disk. By downloading multiple snapshot copies from the image center during lazy loading, multiple sets of log files corresponding to the snapshot copies are formed in the file storage system, so that the cloud disk can obtain the required data resources from the multiple sets of log files to form a cloned cloud disk, avoid the read hotspot problem of the cloud disk, and improve the performance of the cloud disk.

[0069] Reference Figure 5 , Figure 5 The flowchart of the virtual machine startup control method based on the cloned cloud disk provided by the embodiment of the present disclosure is shown in Figure 2 The embodiment of the present disclosure is based on the embodiment shown in Figure 2 The embodiment of the present disclosure is based on the embodiment shown in

[0070] Step S201: receiving a lazy loading request sent by a virtual machine in an elastic computing service cluster to a cloud disk located in an elastic block storage.

[0071] Step S202: obtaining target snapshot data through an object storage unit, and starting a target function of the virtual machine based on the target snapshot data in the cloud disk. The target snapshot data is the data resources required for the target function of the running virtual machine.

[0072] Step S203: obtaining traffic data and delay data of the cloud disk.

[0073] Step S204: determining a target number of snapshot copies according to the traffic data and the delay data of the cloud disk.

[0074] Exemplarily, in this embodiment, before sending the snapshot download request to the mirror center, the number of downloaded snapshot copies is determined first. Since the number of cloud disks created by the user / virtual machine (the number of created disks) is uncertain, how to determine the appropriate number of snapshot copies will directly affect the performance of the final cloud disk. Specifically, the traffic data is data representing the current real-time traffic of the cloud disk, for example, 30 megabits per second (Mb / s). The delay data is data representing the delay duration of the cloud disk, for example, 39 microseconds (μs). In one possible implementation, the target number of snapshot copies can be determined by directly comparing the traffic data and the delay data of the cloud disk with the size relationship of the corresponding traffic threshold and the delay threshold. For example, the greater the amount by which the traffic data of the cloud disk exceeds the traffic threshold (i.e., the traffic is too large), the more the target number of snapshot copies, or the greater the increase in the current number of snapshot copies; and / or the greater the amount by which the delay data of the cloud disk exceeds the delay threshold (i.e., the delay is too large), the more the target number of snapshot copies, or the greater the increase in the current number of snapshot copies.

[0075] In one possible implementation, as shown in Figure 6 the specific implementation of step S204 includes:

[0076] Step S2041: Obtain the number of cloud disks located in the elastic block storage.

[0077] Step S2042: Determine the target number of snapshot copies according to the number of cloud disks, the traffic data of each cloud disk, and the delay data of each cloud disk.

[0078] Exemplarily, in another possible implementation, the number of cloud disks currently located in the elastic block storage, i.e., the number of created disks, and the traffic data and delay data of each disk can be combined to comprehensively calculate an optimized target number, so that the number of snapshot copies is more reasonable. For example, according to the traffic data and the delay data, the average traffic required by a single cloud disk is evaluated, and then the total traffic required by the cloud disks is obtained in combination with the number of cloud disks; and then, according to the ratio of the total traffic required by the cloud disks to the traffic that can be provided by a single snapshot copy, the number of snapshot copies is obtained.

[0079] Further, in another possible implementation, as shown in Figure 7 the specific implementation of step S2042 includes:

[0080] Step S2042A: Determine the delay ratio according to the delay data of each cloud disk and the cloud disk delay threshold.

[0081] Step S2042B: Obtain the average traffic of a single cloud disk according to the delay ratio and the current traffic limiting value of each cloud disk.

[0082] Step S2042C: obtaining the number of cloud disks that can be connected by a single snapshot copy according to the ratio of the traffic provided by the single snapshot copy to the average traffic.

[0083] Step S2042D: obtaining the target number according to the number of cloud disks and the number of cloud disks that can be connected by a single snapshot copy.

[0084] Exemplarily, after the lazy loading request is sent, if the multiple snapshots are simultaneously created, the multiple disks of the multiple snapshots can share the lazy loading bandwidth. In this scenario, the cloud disk bandwidth of a single snapshot copy cannot trigger the traffic threshold of the expanded copy, but the actual traffic required by the cloud disk is still large. Therefore, when the traffic is scattered during the lazy loading period, the lazy loading traffic is considered to be distributed to each cloud disk to ensure the smoothness of the traffic, and the delay can be converted based on the traffic throttling. Specifically, when the throttling is insufficient to support the traffic of the cloud disk, the average delay rises accordingly, and we can deduce from the delay how much traffic the cloud disk needs to support to determine how many copies are needed. Assuming that the current throttling is 30 MB / s, the average delay of the cloud disk that has not triggered throttling is 400 us, when the throttling occurs, the average delay rises to 800 us, and the IO is in the queue, the expected traffic required is about 60 MB / s.

[0085] Based on the above example, the amount of traffic required can be inferred based on the lazy loading throttling and the cloud disk delay, and the number of copies can be confirmed. Specifically, formula (1) is used to calculate the number of cloud disks that can be connected by a single snapshot copy As shown in formula (1):

[0086] (1)

[0087] Wherein, X is the average delay that has not triggered throttling;

[0088] Y is the average delay of the current single cloud disk;

[0089] V is the throttling of the current single cloud disk;

[0090] S is the traffic provided by a single copy;

[0091] Z is the traffic usage coefficient;

[0092] T is the time;

[0093] n is the number of cloud disks.

[0094] First, according to the ratio of the delay data of each cloud disk to the delay threshold of the cloud disk in the case where the flow limiting is not triggered, the delay ratio, that is, Y / X, is obtained. Then, according to the accumulated value of the product of the delay ratio and the current flow limiting value of each cloud disk, the average flow of a single cloud disk is obtained, that is, the product of the delay ratio and the flow limiting V of a single cloud disk is calculated, and the accumulated sum is obtained by accumulating all cloud disks. Then, the average flow of each cloud disk according to the accumulated value of the product of the delay ratio and the current flow limiting value of each cloud disk is obtained by dividing the accumulated sum by the number of cloud disks n. The average flow of the cloud disk when it is running stably is obtained. Then, the product of the actual flow that a single snapshot copy can provide and the use coefficient Z is calculated, Z is, for example, 0.8, representing the actual usage rate, and the actual flow that a single snapshot copy can provide is obtained. Then, the ratio of the actual flow to the average flow is calculated, and the connection number is obtained. Finally, according to the ratio of the number of cloud disks to the connection number of the cloud disks that a single snapshot copy can connect, the target number is obtained. For example, the actual flow that a single snapshot copy can provide is 1000 Mb / S, the average flow of a single cloud disk is 50 Mb / S, and the connection number of the cloud disks that a single snapshot copy can connect is 20. The current number of cloud disks is 100, and the target number is obtained by using the ratio of the current number of cloud disks 100 to the connection number 20.

[0095] Further, in a possible implementation, the connection number is also required to be controlled within a proper range, that is, less than the maximum connection number and greater than the minimum connection number. The maximum connection number can be determined by the minimum set flow value of a single cloud disk, and the minimum connection number can be determined by the maximum set flow value of a single cloud disk, which will not be described here.

[0096] Step S205: A first snapshot download request is sent to the mirror center to download a target number of snapshot copies from the mirror center.

[0097] It should be noted that the step of sending the first snapshot download request to the mirror center in the embodiment can be repeatedly executed multiple times. That is, in the process of executing lazy loading of the cloud disk, the real-time target number of snapshot copies is determined according to the number of cloud disks, the flow data of each cloud disk, and the delay data of each cloud disk, so as to realize dynamic adjustment of the snapshot copies.

[0098] Step S206: Each cloud disk is connected to the corresponding snapshot copy to obtain the log file corresponding to the snapshot copy.

[0099] Step S207: The log file corresponding to the snapshot copy is loaded by the cloud disk to form a cloned cloud disk, and the virtual machine is started based on the cloned cloud disk.

[0100] Optionally, the embodiment further includes:

[0101] Step S208: setting the traffic upper limit of the cloud disk according to the traffic data and the delay data of the cloud disk.

[0102] In a possible implementation, while dynamically setting the snapshot copy, the traffic upper limit of the cloud disk can be further dynamically set according to the traffic data and the delay data of the cloud disk, so as to avoid the problem of too large or too small traffic of a single cloud disk, and improve the utilization rate of the cloud disk bandwidth. For example, the traffic data of the cloud disk is S, and the delay data is D. Specifically:

[0103] When S=traffic upper limit and D>X, the traffic upper limit of the cloud disk is increased;

[0104] When S<traffic upper limit and D=X, the traffic upper limit of the cloud disk is decreased;

[0105] When S<traffic upper limit and D>X, the traffic upper limit of the cloud disk is not adjusted.

[0106] Wherein, X is a delay threshold of the cloud disk. Through the above manner, the adjustment of the traffic upper limit can be realized.

[0107] Exemplarily, as shown in Figure 8 , the specific implementation of step S208 includes:

[0108] Step S2081: obtaining the current traffic upper limit of each cloud disk.

[0109] Step S2082: determining a target cloud disk according to the size relationship between the traffic data of the cloud disk and a preset flow limiting value, and the size relationship between the delay data and the delay threshold.

[0110] Step S2083: updating the current traffic upper limit of the target cloud disk according to the mean square error of the delay data of the target cloud disk.

[0111] Exemplarily, first, the delay data of the cloud disk is represented as X. After obtaining the current traffic upper limit of each cloud disk, the cloud disk whose traffic upper limit needs to be increased and the cloud disk whose traffic upper limit needs to be decreased can be determined as the target cloud disk through the manner in the above example. The process will not be repeated here. Then, the mean square error of the delay of all target cloud disks is calculated. If the mean square error is less than a mean square error threshold, no adjustment is performed. If the mean square error is greater than the mean square error threshold, adjustment is performed. The specific implementation of the mean square error threshold can be set according to business needs, which is not limited here.

[0112] Further, it further includes:

[0113] S2080A: obtaining a service basis coefficient, the service basis coefficient being used to represent a service level corresponding to the virtual machine.

[0114] S2080B: Obtain the delay threshold according to the service basis coefficient and the average delay of each cloud disk.

[0115] Further, in order to consider the priority dimension of the user, in the steps of the embodiment, the cloud disk delay threshold can be adjusted by further increasing the weight coefficient. The higher the priority of the user, the lower the weight coefficient, so that important users and services can obtain a greater elasticity coefficient. Exemplarily, the priority includes three levels: high: basis coefficient 0.8, Mid: basis coefficient 0.9, Low: basis coefficient 1.0. The cloud disk delay threshold combined with the service level is defined by calculating the basis coefficient and the average delay. Thus, the performance of the cloud disk corresponding to important users and services is improved.

[0116] In the embodiment, the implementation manners of steps S201 and S202 are the same as those of steps S101 and S102 in the embodiment of the disclosure Figure 2 described above, and will not be repeated here.

[0117] Corresponding to the virtual machine startup control method based on the cloned cloud disk in the above embodiment, the virtual machine startup control method based on the cloned cloud disk is provided. Figure 9 A structural block diagram of the virtual machine startup control device based on the cloned cloud disk is provided for the embodiment of the disclosure. The method introduced in the above embodiment can be executed by the virtual machine startup control device based on the cloned cloud disk. The device can be realized in the form of software and / or hardware, and the device can be integrated in an electronic device having a certain data processing function. The electronic device can include but is not limited to a mobile terminal with large data processing capability, and a desktop computer, a supercomputer and other fixed terminals with large data processing capability.

[0118] For ease of illustration, only parts related to the embodiments of the disclosure are shown. For parts not related to the embodiments of the disclosure, refer to Figure 9 The virtual machine startup control device based on the cloned cloud disk 3 comprises:

[0119] The processing module 31 is configured to, after receiving a lazy loading request sent by a virtual machine in an elastic computing service cluster to a cloud disk located in an elastic block storage, acquire target snapshot data, and send a snapshot download request to a mirror center to download at least two snapshot copies, wherein the cloud disk is used to store data resources required for starting the virtual machine, the snapshot copy is mirror data of the data resources required for starting the virtual machine, and the target snapshot data is data resources required for a target function of the running virtual machine.

[0120] The storage module 32 is configured to connect each cloud disk to a corresponding snapshot copy to obtain a log file corresponding to the snapshot copy.

[0121] The loading module 33 is configured to load the log file corresponding to the snapshot copy through the cloud disk to form a cloned cloud disk, and start the virtual machine based on the cloned cloud disk.

[0122] According to one or more embodiments of the present disclosure, when the target snapshot data is acquired, the processing module 31 is specifically configured to: send a data reading request for the target snapshot data to the object storage unit; receive the target snapshot data and write the target snapshot data into the cloud disk; the method further comprises: based on the target snapshot data in the cloud disk, starting the target function of the virtual machine.

[0123] According to one or more embodiments of the present disclosure, after the target snapshot data is acquired, the processing module 31 is further configured to: acquire traffic data and delay data of the cloud disk; determine the target number of snapshot copies according to the traffic data and the delay data of the cloud disk; when the snapshot download request is sent to the mirror center, the processing module 31 is specifically configured to: send a first snapshot download request to the mirror center to download the target number of snapshot copies from the mirror center.

[0124] According to one or more embodiments of the present disclosure, when the target number of snapshot copies is determined according to the traffic data and the delay data of the cloud disk, the processing module 31 is specifically configured to: acquire the number of cloud disks located in the elastic block storage; determine the target number of snapshot copies according to the number of cloud disks, the traffic data of each cloud disk and the delay data of each cloud disk.

[0125] According to one or more embodiments of the present disclosure, when the target number of snapshot copies is determined according to the number of cloud disks, the traffic data of each cloud disk and the delay data of each cloud disk, the processing module 31 is specifically configured to: determine the delay ratio according to the delay data of each cloud disk and the cloud disk delay threshold; obtain the average traffic of a single cloud disk according to the cumulative value of the product of the delay ratio and the current flow limiting value of each cloud disk; obtain the connection number of the cloud disk that a single snapshot copy can connect according to the ratio of the traffic provided by a single snapshot copy to the average traffic; obtain the target number according to the number of cloud disks and the connection number of the cloud disk that a single snapshot copy can connect.

[0126] According to one or more embodiments of the present disclosure, the storage module 32 is specifically configured to: send a mirror data reading request to the distributed file storage system through the cloud disk; acquire the log file corresponding to the snapshot copy through the file storage system and send it to the corresponding cloud disk.

[0127] According to one or more embodiments of the present disclosure, before each cloud disk is connected to the corresponding snapshot copy to obtain the log file corresponding to the snapshot copy, the processing module 31 is further configured to: acquire traffic data and delay data of the cloud disk; set the traffic upper limit of the cloud disk according to the traffic data and the delay data of the cloud disk.

[0128] According to one or more embodiments of this disclosure, when the processing module 31 sets the traffic limit of a cloud disk based on the traffic data and latency data of the cloud disk, it is specifically used to: obtain the current traffic limit of each cloud disk; determine the target cloud disk based on the relationship between the traffic data of the cloud disk and the preset traffic limit value, and the relationship between the latency data and the latency threshold, and set the current traffic limit of the target cloud disk.

[0129] According to one or more embodiments of this disclosure, the processing module 31 is further configured to: obtain a service base coefficient, which is used to characterize the service level corresponding to the virtual machine; and obtain a latency threshold based on the service base coefficient.

[0130] The processing module 31, storage module 32, and loading module 33 are connected sequentially. The virtual machine startup control device 3 based on a cloned cloud disk provided in this embodiment can execute the technical solution of the above-described method embodiment, and its implementation principle and technical effects are similar; therefore, they will not be described again here.

[0131] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as... Figure 10 As shown, the electronic device 4 includes:

[0132] Processor 41, and memory 42 communicatively connected to processor 41;

[0133] Memory 42 stores instructions executed by the computer;

[0134] The processor 41 executes computer execution instructions stored in the memory 42 to achieve, for example, Figures 2-8 The virtual machine startup control method based on cloned cloud disks in the illustrated embodiment.

[0135] Optionally, the processor 41 and the memory 42 are connected via a bus 43.

[0136] For relevant instructions, please refer to the corresponding text. Figures 2-8 The relevant descriptions and effects of the steps in the corresponding embodiments are understood, and will not be elaborated on here.

[0137] This disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement this disclosure. Figures 2-8 The virtual machine startup control method based on cloned cloud disk provided in any of the corresponding embodiments.

[0138] This disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements this disclosure. Figures 2-8 The virtual machine startup control method based on cloned cloud disk provided in any of the corresponding embodiments.

[0139] To achieve the above-mentioned embodiments, the embodiments of the present disclosure further provide an electronic device.

[0140] Reference Figure 11 , which shows a structural diagram of an electronic device 900 suitable for implementing the embodiments of the present disclosure, which can be a terminal device or a server. Among them, the terminal device can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDA), tablet computers (PAD), portable multimedia players (PMP), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 11 The electronic device shown is only an example and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.

[0141] As Figure 11 shown, the electronic device 900 can include a processing device (such as a central processor, a graphics processor, etc.) 901, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 902 or programs loaded from a storage device 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0142] Generally, the following devices can be connected to the I / O interface 905: input devices 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909. The communication devices 909 can allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 11 The electronic device 900 with various devices is shown, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices can be alternatively implemented or provided.

[0143] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.

[0144] Note that the computer readable medium described above in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination thereof. The computer readable storage medium may, for example, be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device. In the present disclosure, the computer readable signal medium can include a data signal carried in a baseband or as part of a carrier wave, in which the computer readable program code is carried. Such a propagated data signal can take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer readable medium can be transmitted by any suitable medium, including, but not limited to, wire, cable, RF (radio frequency), or the like, or any suitable combination of the above.

[0145] The computer readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device and be not assembled in the electronic device.

[0146] The computer readable medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods illustrated by the embodiments described above.

[0147] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0148] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It is also noted that each block in the block diagrams and / or flow diagrams and combinations of blocks in the block diagrams and / or flow diagrams can be implemented by special-purpose hardware-based systems that perform the specified functions or operations, or combinations of special-purpose hardware and computer instructions.

[0149] The units or modules described in the embodiments of the present disclosure can be implemented by means of software, or by means of hardware. In some cases, the name of the unit or module does not constitute a limitation on the unit itself.

[0150] The functions described above in the specification of the present disclosure can be performed at least in part by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Program-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.

[0151] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0152] In a first aspect, according to one or more embodiments of the present disclosure, a virtual machine startup control method based on a cloned cloud disk is provided, comprising:

[0153] After receiving a lazy loading request sent by a virtual machine in an elastic computing service cluster to a cloud disk located in an elastic block storage, target snapshot data is obtained, and a snapshot download request is sent to a mirror center to download at least two snapshot copies, wherein the cloud disk is used to store data resources required for starting the virtual machine, the snapshot copy is mirror data of the data resources required for starting the virtual machine, and the target snapshot data is data resources required for a target function of the running virtual machine; each cloud disk is connected to a corresponding snapshot copy to obtain log files corresponding to the at least two snapshot copies respectively; the snapshot copy corresponding log files are loaded through the cloud disk to form a cloned cloud disk, and the virtual machine is started based on the cloned cloud disk.

[0154] According to one or more embodiments of the present disclosure, obtaining the target snapshot data comprises: sending a data reading request for the target snapshot data to an object storage unit; receiving the target snapshot data and writing the target snapshot data into the cloud disk; the method further comprises: starting the target function of the virtual machine based on the target snapshot data in the cloud disk.

[0155] According to one or more embodiments of the present disclosure, after obtaining the target snapshot data, the method further comprises: obtaining traffic data and delay data of the cloud disk; determining a target number of snapshot copies according to the traffic data and the delay data of the cloud disk; sending a snapshot download request to the mirror center, comprising: sending a first snapshot download request to the mirror center to download the target number of snapshot copies from the mirror center.

[0156] According to one or more embodiments of the present disclosure, the target number of snapshot copies is determined according to the traffic data and the delay data of the cloud disks, comprising: obtaining the number of cloud disks located in the elastic block storage; and determining the target number of snapshot copies according to the number of cloud disks, the traffic data of each cloud disk and the delay data of each cloud disk.

[0157] According to one or more embodiments of the present disclosure, the target number of snapshot copies is determined according to the number of cloud disks, the traffic data of each cloud disk and the delay data of each cloud disk, comprising: determining a delay ratio according to the delay data of each cloud disk and a cloud disk delay threshold; obtaining an average traffic of a single cloud disk according to the delay ratio and a current traffic limiting value of each cloud disk; obtaining a connection number of cloud disks that can be connected by a single snapshot copy according to a ratio of the traffic provided by a single snapshot copy to the average traffic; and obtaining the target number according to the number of cloud disks and the connection number of cloud disks that can be connected by a single snapshot copy.

[0158] According to one or more embodiments of the present disclosure, each cloud disk is connected to a corresponding snapshot copy to obtain log files corresponding to at least two snapshot copies, comprising: sending a mirror data reading request to a distributed file storage system by a cloud disk; and obtaining log files corresponding to a snapshot copy by the file storage system and sending the log files to the corresponding cloud disk.

[0159] According to one or more embodiments of the present disclosure, before each cloud disk is connected to a corresponding snapshot copy to obtain log files corresponding to at least two snapshot copies, the method further comprises: obtaining traffic data and delay data of the cloud disks; and setting a traffic upper limit of the cloud disks according to the traffic data and the delay data of the cloud disks.

[0160] According to one or more embodiments of the present disclosure, the traffic upper limit of the cloud disks is set according to the traffic data and the delay data of the cloud disks, comprising: obtaining a current traffic upper limit of each cloud disk; determining a target cloud disk and setting a current traffic upper limit of the target cloud disk according to a size relationship between the traffic data of the cloud disk and a preset traffic limiting value, and a size relationship between the delay data and a delay threshold.

[0161] According to one or more embodiments of the present disclosure, the method further comprises: obtaining a service basis coefficient, the service basis coefficient being used to represent a service level corresponding to the virtual machine; and obtaining a delay threshold according to the service basis coefficient.

[0162] In a second aspect, according to one or more embodiments of the present disclosure, a virtual machine startup control device based on cloned cloud disks is provided, comprising:

[0163] The processing module is configured to, after receiving a lazy loading request sent by a virtual machine in an elastic computing service cluster to a cloud disk located in the elastic block storage, acquire target snapshot data, and send a snapshot download request to the image center to download at least two snapshot copies, wherein the cloud disk is configured to store data resources required to start the virtual machine, the snapshot copy is image data of the data resources required to start the virtual machine, and the target snapshot data is data resources required for a target function of the running virtual machine.

[0164] The storage module is configured to connect each cloud disk to a corresponding snapshot copy to obtain log files corresponding to the at least two snapshot copies respectively.

[0165] The loading module is configured to load the log files corresponding to the snapshot copies through the cloud disk, form a cloned cloud disk, and start the virtual machine based on the cloned cloud disk.

[0166] According to one or more embodiments of the present disclosure, when the processing module acquires the target snapshot data, the processing module is specifically configured to send a data reading request for the target snapshot data to the object storage unit, receive the target snapshot data, and write the target snapshot data into the cloud disk. The method further includes starting the target function of the virtual machine based on the target snapshot data in the cloud disk.

[0167] According to one or more embodiments of the present disclosure, after acquiring the target snapshot data, the processing module is further configured to acquire traffic data and delay data of the cloud disk, determine a target number of snapshot copies according to the traffic data and the delay data of the cloud disk, and when the processing module sends the snapshot download request to the image center, the processing module is specifically configured to send a first snapshot download request to the image center to download the target number of snapshot copies from the image center.

[0168] According to one or more embodiments of the present disclosure, when the processing module determines the target number of snapshot copies according to the traffic data and the delay data of the cloud disk, the processing module is specifically configured to acquire a cloud disk number of the cloud disk located in the elastic block storage, and determine the target number of snapshot copies according to the cloud disk number, the traffic data of each cloud disk, and the delay data of each cloud disk.

[0169] According to one or more embodiments of the present disclosure, when the processing module determines the target number of snapshot copies according to the cloud disk number, the traffic data of each cloud disk, and the delay data of each cloud disk, the processing module is specifically configured to determine a delay ratio according to the delay data of each cloud disk and a cloud disk delay threshold, obtain an average traffic of a single cloud disk according to the delay ratio and a current traffic limiting value of each cloud disk, obtain a connection number of cloud disks that can be connected by a single snapshot copy according to a ratio of traffic provided by a single snapshot copy to the average traffic, and obtain the target number according to the cloud disk number and the connection number of cloud disks that can be connected by a single snapshot copy.

[0170] According to one or more embodiments of the present disclosure, the storage module is specifically configured to: send a mirror data reading request to a distributed file storage system through a cloud disk; and obtain a log file corresponding to a snapshot copy through the file storage system and send the log file to the corresponding cloud disk.

[0171] According to one or more embodiments of the present disclosure, before connecting each cloud disk to a corresponding snapshot copy to obtain log files corresponding to the at least two snapshot copies respectively, the processing module is further configured to: obtain traffic data and delay data of the cloud disks; and set an upper limit of traffic of the cloud disks according to the traffic data and the delay data of the cloud disks.

[0172] According to one or more embodiments of the present disclosure, when setting the upper limit of traffic of the cloud disks according to the traffic data and the delay data of the cloud disks, the processing module is specifically configured to: obtain a current upper limit of traffic of each cloud disk; determine a target cloud disk according to a size relationship between the traffic data of the cloud disk and a preset flow limiting value and a size relationship between the delay data of the cloud disk and a delay threshold value, and set the current upper limit of traffic of the target cloud disk.

[0173] According to one or more embodiments of the present disclosure, the processing module is further configured to: obtain a service basis coefficient, the service basis coefficient being used to represent a service level corresponding to the virtual machine; and obtain the delay threshold value according to the service basis coefficient.

[0174] In a third aspect, according to one or more embodiments of the present disclosure, an electronic device is provided, which includes: at least one processor and a memory.

[0175] The memory stores computer-executed instructions.

[0176] The at least one processor executes the computer-executed instructions stored in the memory, so that the at least one processor performs the virtual machine startup control method based on the cloned cloud disk as described in the first aspect and various possible designs of the first aspect.

[0177] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer readable storage medium is provided, and the computer readable storage medium stores computer-executed instructions, when a processor executes the computer-executed instructions, the virtual machine startup control method based on the cloned cloud disk as described in the first aspect and various possible designs of the first aspect is implemented.

[0178] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, the virtual machine startup control method based on the cloned cloud disk as described in the first aspect and various possible designs of the first aspect is implemented.

[0179] The above description merely illustrates the preferred embodiments of the disclosure and a principle for applying the technologies. It is understood by those skilled in the art that the disclosed scope of the disclosure is not limited to the technical solutions formed by the specific combinations of the technical features described above, and should also cover other technical solutions formed by the combinations of the technical features described above or their equivalent features without departing from the disclosed concept. For example, the technical solutions formed by the mutual replacement of the above-described features and the technical features with similar functions disclosed in the disclosure (but not limited to) can be used.

[0180] Further, although operations are depicted in a particular, sequential order, this should not be understood as requiring or implying that the operations are performed in the order illustrated or sequentially. In certain circumstances, multitasking and parallel processing can be advantageous. Likewise, although specific implementation details are included for the purpose of providing a thorough disclosure, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination.

[0181] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims

1. A method for controlling the start of a virtual machine based on a cloned cloud disk, characterized in that, The method comprises the following steps: receiving a lazy loading request sent by a virtual machine to a cloud disk of elastic block storage, obtaining target snapshot data, and obtaining traffic data and delay data of the cloud disk, determining a target number of snapshot copies according to the traffic data and the delay data of the cloud disk, and sending a snapshot download request to a mirror center to download the target number of snapshot copies, wherein the cloud disk is used to store data resources required for starting the virtual machine, the snapshot copy is mirror data of the data resources required for starting the virtual machine, the target snapshot data is data resources required for a target function of the virtual machine, and the target number is at least two; connecting each cloud disk to a corresponding snapshot copy to obtain log files corresponding to the at least two snapshot copies based on bandwidth resources of a distributed file storage system, wherein the log files are stored in the distributed file storage system and are obtained based on mirror data reading requests of the cloud disk to the distributed file storage system; loading the log files corresponding to the snapshot copies through the cloud disk to form a cloned cloud disk, and starting the virtual machine based on the cloned cloud disk; wherein the target number of snapshot copies is determined according to the traffic data and the delay data of the cloud disk, which comprises: obtaining a cloud disk number of the cloud disk located in the elastic block storage; and determining the target number of snapshot copies according to the cloud disk number, the traffic data of each cloud disk, and the delay data of each cloud disk.

2. The method of claim 1, wherein, The method further comprises: sending a data reading request for target snapshot data to an object storage unit; receiving the target snapshot data and writing the target snapshot data into the cloud disk; The method further comprises: starting a target function of the virtual machine based on the target snapshot data in the cloud disk.

3. The method of claim 1, wherein, The target number of snapshot copies is determined according to the cloud disk number, the traffic data of each cloud disk, and the delay data of each cloud disk, which comprises: determining a delay ratio according to the delay data of each cloud disk and a cloud disk delay threshold; obtaining an average traffic of a single cloud disk according to the delay ratio and a current traffic limiting value of each cloud disk; obtaining a connection number of cloud disks that can be connected by a single snapshot copy according to a ratio of traffic provided by the single snapshot copy to the average traffic; obtaining the target number according to the cloud disk number and the connection number of cloud disks that can be connected by the single snapshot copy.

4. The method of claim 1, wherein, Before the cloud disks are connected to the corresponding snapshot copies to obtain the log files corresponding to the at least two snapshot copies based on the bandwidth resources of the distributed file storage system, the method further comprises: setting a traffic upper limit of the cloud disk according to the traffic data and the delay data of the cloud disk.

5. The method of claim 4, wherein, The traffic upper limit of the cloud disk is set according to the traffic data and the delay data of the cloud disk, which comprises: obtaining a current traffic upper limit of each cloud disk; determining a target cloud disk and setting a current traffic upper limit of the target cloud disk according to a size relationship between the traffic data of the cloud disk and a preset traffic limiting value, and a size relationship between the delay data and a delay threshold.

6. The method of claim 5, wherein, The method further comprises: Obtaining a service basis coefficient, the service basis coefficient being used to represent a service level corresponding to the virtual machine; Obtaining the delay threshold according to the service basis coefficient and average delays of the cloud disks.

7. A virtual machine startup control apparatus based on a cloned cloud disk, characterized by comprising: Comprise: A processing module is configured to receive a lazy loading request sent by a virtual machine to a cloud disk of elastic block storage, obtain target snapshot data, and obtain traffic data and delay data of the cloud disk, determine a target number of snapshot copies according to the traffic data and the delay data of the cloud disk, and send a snapshot download request to a mirror center to download the target number of snapshot copies, wherein the cloud disk is used to store data resources required for starting the virtual machine, the snapshot copy is mirror data of the data resources required for starting the virtual machine, the target snapshot data is data resources required for running a target function of the virtual machine, and the target number is at least two; A storage module is configured to connect each cloud disk to a corresponding snapshot copy respectively, to obtain log files corresponding to the at least two snapshot copies respectively based on bandwidth resources of a distributed file storage system, wherein the log files are stored in the distributed file storage system and are obtained based on mirror data reading requests of the cloud disk to the distributed file storage system; A loading module is configured to load the log files corresponding to the snapshot copies through the cloud disk, form a cloned cloud disk, and start the virtual machine based on the cloned cloud disk. The processing module is specifically configured to obtain a cloud disk number of cloud disks located in the elastic block storage, and determine the target number of snapshot copies according to the cloud disk number, traffic data of each cloud disk, and delay data of each cloud disk.

8. An electronic device, comprising: Comprise: A processor and a memory; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the virtual machine startup control method based on a cloned cloud disk according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and when the processor executes the computer execution instructions, the computer execution instructions are used to implement the virtual machine startup control method based on a cloned cloud disk according to any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the virtual machine startup control method based on a cloned cloud disk according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Distributed system data loading method and device

    CN110018878A

  • Data processing method and device and electronic equipment

    CN114077574A