A method, medium, and electronic device for hot migration of cloud servers

By using a hardware accelerator to compress and decompress dirty pages in memory during the hot migration of cloud servers, the problem of extended memory data transmission time during cloud server migration is solved, improving migration efficiency and business processing stability.

CN115269116BActive Publication Date: 2026-04-03CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-18
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

During the hot migration of cloud servers, when business pressure is high, a large number of dirty pages are generated in memory, which prolongs the time for sending memory data, affects processor performance, and leads to slow business processing and low migration efficiency.

Method used

Hardware accelerators are used to compress and decompress dirty pages in the memory of cloud hosts. By cooperating with the hardware accelerators of the source host and the destination host, hot migration is accelerated.

Benefits of technology

It reduces the time required for hot migration of cloud servers, improves migration efficiency, and ensures the continuity and stability of business processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115269116B_ABST
    Figure CN115269116B_ABST
Patent Text Reader

Abstract

This application provides a method, medium, and electronic device for hot migration of cloud servers, relating to the field of cloud computing virtualization technology. In the hot migration process of a cloud server, the source host responds to receiving a hot migration command and obtains compression method parameter information; if the compression method parameter information is a preset first parameter, then the dirty pages of the cloud server's memory are compressed using a first hardware accelerator on the source host to generate first memory compressed data; the first parameter indicates that accelerated hot migration is required; and based on the destination host address corresponding to the hot migration command, the compression method parameter information is sent to the destination host of the cloud server; if a first ready notification is received from the destination host, then the first memory compressed data is sent to the destination host, so that the destination host can decompress the first memory compressed data using a second hardware accelerator. This method can improve the efficiency of hot migration of cloud servers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing virtualization technology, and in particular to a method, medium, and electronic device for hot migration of cloud hosts. Background Technology

[0002] The hot migration feature of cloud servers is a core function to ensure uninterrupted business operations during data center upgrades and maintenance. The hot migration process involves completely saving the memory state of a cloud server on one server, sending it to another server, and resuming operation.

[0003] In related technologies, during the hot migration of cloud servers, when the cloud server is under heavy business pressure, a large number of dirty pages are generated in memory, and a large amount of memory data needs to be sent, which takes a long time. Virtualization components usually reduce processor performance to indirectly reduce the rate of dirty page generation. At this time, business processing is slow or stuttering occurs, and the efficiency of hot migration of cloud servers is low. Summary of the Invention

[0004] To address the existing technical problems, embodiments of this application provide a method, medium, and electronic device for hot migration of cloud hosts, which can accelerate the hot migration of dirty memory pages of cloud hosts, reduce the time consumption of hot migration of cloud hosts, and improve the efficiency of hot migration of cloud hosts.

[0005] To achieve the above objectives, the technical solution of this application embodiment is implemented as follows:

[0006] In a first aspect, embodiments of this application provide a method for hot migration of a cloud server, applied to the source host of the cloud server, comprising:

[0007] In response to receiving a hot migration command, obtain compression method parameter information;

[0008] If the compression method parameter information is a preset first parameter, then the dirty pages of the cloud host's memory are compressed by the first hardware accelerator of the source host to generate first memory compressed data; the first parameter indicates that accelerated hot migration is required; and based on the destination host address corresponding to the hot migration command, the compression method parameter information is sent to the destination host of the cloud host.

[0009] If a first ready notification is received from the target host, the first memory compressed data is sent to the target host so that the target host can decompress the first memory compressed data through the target host's second hardware accelerator.

[0010] This application provides a mechanism for hot migration of cloud hosts using a hardware accelerator. By using the hardware accelerator for compression, the hot migration of dirty memory pages of the cloud host can be accelerated, reducing the time spent on hot migration and improving the efficiency of hot migration.

[0011] In one optional embodiment, obtaining the compression method parameter information includes:

[0012] Receive a hot migration configuration file containing the compression method parameter information sent by the cloud host management platform;

[0013] Sending the compression method parameter information to the destination host machine of the cloud host includes:

[0014] The hot migration configuration file containing the compression method parameter information is sent to the destination host machine of the cloud host.

[0015] In an optional embodiment, the hot migration configuration file further includes accelerator card requirement parameter information; the step of compressing dirty pages of the cloud host's memory through the first hardware accelerator of the source host further includes:

[0016] Based on the accelerator card requirement parameters, it is determined that the first hardware accelerator of the source host machine matches the accelerator card requirement parameters.

[0017] In an optional embodiment, after receiving the hot migration command and obtaining the compression method parameter information, the method further includes:

[0018] If the compression method parameter information is a preset second parameter, then the dirty pages of the cloud host's memory are compressed by the CPU of the source host to generate second memory compressed data; the second parameter indicates that a regular hot migration is required; and the compression method parameter information is sent to the destination host of the cloud host based on the destination host address.

[0019] If a second ready notification is received from the destination host, the second memory compressed data is sent to the destination host so that the destination host can decompress the second memory compressed data using its CPU.

[0020] In one optional embodiment, the step of compressing dirty pages in the cloud host's memory via the first hardware accelerator of the source host further includes:

[0021] If it is determined that the first hardware accelerator of the source host machine does not match the accelerator card requirement parameter information, a first alarm message is generated; the first alarm message indicates that the accelerator card requirement parameter information and / or the first hardware accelerator need to be adjusted.

[0022] Secondly, embodiments of this application also provide a method for hot migration of a cloud server, applied to the destination host machine of the cloud server, including:

[0023] Receive compression method parameter information sent by the source host machine of the cloud server;

[0024] If the compression method parameter information is a preset first parameter, then a first ready notification information is sent to the source host; and the received first memory compressed data is decompressed through the second hardware accelerator of the destination host to complete the accelerated hot migration of the cloud host; the first parameter indicates that accelerated hot migration is required.

[0025] This application provides a mechanism for hot migration of cloud hosts using a hardware accelerator. By using a hardware accelerator for decompression, the hot migration of dirty memory pages of the cloud host can be accelerated, reducing the time consumed by hot migration of the cloud host and improving the efficiency of hot migration of the cloud host.

[0026] In one optional embodiment, the compression method parameter information sent by the source host of the receiving cloud host includes:

[0027] The source host machine of the cloud server sends a hot migration configuration file containing the compression method parameter information.

[0028] In an optional embodiment, the hot migration configuration file further includes accelerator card requirement parameter information; the step of sending a readiness notification to the source host further includes:

[0029] Based on the acceleration card requirement parameters, it is determined that the second hardware accelerator of the target host machine matches the acceleration card requirement parameters.

[0030] In an optional embodiment, after receiving the compression method parameter information sent by the source host of the cloud host, the method further includes:

[0031] If the compression method parameter information is a preset second parameter, then a second ready notification information is sent to the source host; and the received second memory compressed data is decompressed by the CPU of the destination host to complete the regular hot migration of the cloud host; the second parameter indicates that a regular hot migration is required.

[0032] In an optional embodiment, the step of decompressing the received first memory compressed data via the second hardware accelerator of the destination host machine further includes:

[0033] If it is determined that the second hardware accelerator of the target host machine matches the accelerator card requirement parameter information, a second alarm message is generated; the second alarm message indicates that the accelerator card requirement parameter information and / or the second hardware accelerator need to be adjusted.

[0034] Thirdly, embodiments of this application also provide a hot migration device for a cloud server, deployed on the source host of the cloud server, comprising:

[0035] The first information acquisition unit is used to acquire compression method parameter information in response to receiving a hot migration command;

[0036] The memory compression unit is configured to: if the compression method parameter information is a preset first parameter, compress the dirty pages of the cloud host's memory through the first hardware accelerator of the source host to generate first memory compression data; the first parameter indicates that accelerated hot migration is required; and send the compression method parameter information to the destination host of the cloud host based on the destination host address corresponding to the hot migration command.

[0037] The compressed data transmission unit is configured to send the first memory compressed data to the target host machine if it receives a first ready notification message from the target host machine, so that the target host machine can decompress the first memory compressed data through the second hardware accelerator of the target host machine.

[0038] In an optional embodiment, the first information acquisition unit is specifically used for:

[0039] Receive a hot migration configuration file containing the compression method parameter information sent by the cloud host management platform;

[0040] The memory compression unit is specifically used for:

[0041] The hot migration configuration file containing the compression method parameter information is sent to the destination host machine of the cloud host.

[0042] In an optional embodiment, the hot-migrating configuration file further includes accelerator card requirement parameter information; the memory compression unit is further configured to:

[0043] Before compressing the dirty pages of the cloud host's memory through the first hardware accelerator of the source host, the first hardware accelerator of the source host is determined to match the acceleration card requirement parameter information based on the acceleration card requirement parameter information.

[0044] In an optional embodiment, the memory compression unit is further configured to:

[0045] If the compression method parameter information is a preset second parameter, then the dirty pages of the cloud host's memory are compressed by the CPU of the source host to generate second memory compressed data; the second parameter indicates that a regular hot migration is required; and the compression method parameter information is sent to the destination host of the cloud host based on the destination host address.

[0046] The compressed data transmission unit is further configured to:

[0047] If a second ready notification is received from the destination host, the second memory compressed data is sent to the destination host so that the destination host can decompress the second memory compressed data using its CPU.

[0048] In an optional embodiment, the device further includes a first alarm unit, the first alarm unit being configured to:

[0049] Before compressing the dirty pages of the cloud host's memory through the first hardware accelerator of the source host, if it is determined that the first hardware accelerator of the source host does not match the acceleration card's requirement parameter information, a first alarm message is generated; the first alarm message indicates that the acceleration card's requirement parameter information and / or the first hardware accelerator need to be adjusted.

[0050] Fourthly, embodiments of this application also provide a hot migration device for a cloud server, deployed on the destination host machine of the cloud server, comprising:

[0051] The second information acquisition unit is used to receive compression method parameter information sent by the source host machine of the cloud host;

[0052] The memory decompression unit is used to: send a first ready notification to the source host if the compression method parameter information is a preset first parameter; and decompress the received first memory compressed data through the second hardware accelerator of the destination host to complete the accelerated hot migration of the cloud host; the first parameter indicates that accelerated hot migration is required.

[0053] In one optional embodiment, the second information acquisition unit is specifically used for:

[0054] The source host machine of the cloud server sends a hot migration configuration file containing the compression method parameter information.

[0055] In an optional embodiment, the hot-migrating configuration file further includes accelerator card requirement parameter information; the memory decompression unit is further configured to:

[0056] Before sending a readiness notification to the source host, the second hardware accelerator of the destination host is determined to match the accelerator card requirement parameter information based on the accelerator card requirement parameter information.

[0057] In an optional embodiment, the memory decompression unit is further configured to:

[0058] If the compression method parameter information is a preset second parameter, then a second ready notification information is sent to the source host; and the received second memory compressed data is decompressed by the CPU of the destination host to complete the regular hot migration of the cloud host; the second parameter indicates that a regular hot migration is required.

[0059] In an optional embodiment, the device further includes a second alarm unit, the second alarm unit being used for:

[0060] Before the first memory compressed data is decompressed by the second hardware accelerator of the destination host, if it is determined that the second hardware accelerator of the destination host matches the acceleration card requirement parameter information, a second alarm message is generated; the second alarm message indicates that the acceleration card requirement parameter information and / or the second hardware accelerator need to be adjusted.

[0061] Fifthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements either the hot migration method for a cloud host under the first aspect or the hot migration method for a cloud host under the second aspect.

[0062] Sixthly, embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the computer program is executed by the processor, the processor enables the processor to implement the cloud host hot migration method of the first aspect or the cloud host hot migration method of the second aspect.

[0063] In a seventh aspect, an embodiment of this application provides a computer program product comprising computer instructions stored in a computer-readable storage medium; when a processor of a computer device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, causing the computer device to perform the steps of the cloud host hot migration method of the first aspect or the cloud host hot migration method of the second aspect.

[0064] The technical effects of any of the implementation methods in aspects three through seven can be found in the technical effects of the corresponding implementation methods in aspects one through two, and will not be repeated here. Attached Figure Description

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

[0066] Figure 1 A flowchart illustrating a method for hot migration of a cloud server provided in this application embodiment;

[0067] Figure 2 A flowchart illustrating another method for hot migration of a cloud host provided in this application embodiment;

[0068] Figure 3 This is a schematic diagram of the structure of a hot migration device for a cloud host provided in an embodiment of this application;

[0069] Figure 4 A schematic diagram of another cloud host hot migration device provided in an embodiment of this application;

[0070] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0071] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0072] It should be noted that the terms "comprising" and "having" and their variations used in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.

[0073] The following are explanations of some of the words that appear in the text:

[0074] (1) Hardware Accelerator: A hardware accelerator is an acceleration engine that provides hardware acceleration solutions. Its main functions include encryption / decryption and accelerated data compression. Also known as a hardware card, a hardware accelerator can significantly reduce CPU consumption and improve processor efficiency. The hardware accelerator shields the application layer from its internal implementation details, allowing users to quickly migrate existing services through a standard interface. In the embodiments of this application, the hardware accelerator can be a dedicated chip independent of the CPU, or it can be a chip accelerator subsystem integrated into the CPU.

[0075] The hot migration feature of cloud servers is a core function to ensure uninterrupted business operations during data center upgrades and maintenance. The hot migration process involves completely saving the memory state of a cloud server on one server, sending it to another server, and resuming operation.

[0076] In related technologies, during the hot migration of cloud servers, when the cloud server is under heavy business pressure, a large number of dirty pages are generated in memory, and a large amount of memory data needs to be sent, which takes a long time. Virtualization components usually reduce processor performance to indirectly reduce the rate of dirty page generation. At this time, business processing is slow or stuttering occurs, and the efficiency of hot migration of cloud servers is low.

[0077] To address existing technical problems, this application provides a method for hot migration of cloud servers, applied to the source host machine of the cloud server, including:

[0078] In response to receiving a hot migration command, obtain compression method parameter information;

[0079] If the compression method parameter information is a preset first parameter, then the dirty pages of the cloud host's memory are compressed using the first hardware accelerator of the source host to generate first compressed memory data; the first parameter indicates that accelerated hot migration is required; and based on the destination host address corresponding to the hot migration command, the compression method parameter information is sent to the destination host of the cloud host; if a first ready notification is received from the destination host, then the first compressed memory data is sent to the destination host, so that the destination host can decompress the first compressed memory data using its second hardware accelerator. This method provides a mechanism for hot migration of cloud hosts using a hardware accelerator. By using a hardware accelerator for compression, the hot migration of dirty pages of the cloud host's memory can be accelerated, reducing the time consumed by the hot migration of the cloud host and improving the efficiency of the hot migration of the cloud host.

[0080] The technical solutions provided in the embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0081] This application provides a method for hot migration of cloud servers, applied to the source host machine of the cloud server, such as... Figure 1 As shown, it includes the following steps:

[0082] Step S101: In response to receiving the hot migration command, obtain the compression method parameter information.

[0083] In some embodiments of this application, the source host machine of the cloud server is equipped with Libvirt and QEMU components.

[0084] In practice, the hot migration command can be received through the Libvirt component on the source host of the cloud server. Upon receiving the hot migration command, the source host calls the migrate interface of the Libvirt component to obtain compression method parameter information. The hot migration command can be sent from the cloud server management platform to the running cloud server.

[0085] In one optional embodiment, obtaining compression method parameter information includes:

[0086] Receive the hot migration configuration file containing compression method parameters sent by the cloud host management platform.

[0087] For example, the source host of the cloud server responds to the hot migration command Instruct_01 sent by the cloud server management platform and receives the hot migration configuration file accelerator.xml, which contains compression method parameter information mold_info, sent by the cloud server management platform.

[0088] Step S102: If the compression method parameter information is the preset first parameter, then the dirty pages of the cloud host's memory are compressed by the first hardware accelerator of the source host to generate the first memory compression data; the first parameter indicates that accelerated hot migration is required; and based on the destination host address corresponding to the hot migration command, the compression method parameter information is sent to the destination host of the cloud host.

[0089] For example, assuming the preset first parameter is "hard", if the compression method parameter information mold_info is "hard", then the dirty pages of the cloud host's memory are compressed by the first hardware accelerator Hardware Accelerator_1 of the source host to generate the first memory compressed data Data1; the first parameter "hard" indicates that accelerated hot migration is required; and based on the destination host address corresponding to the hot migration command Instruct_01, the compression method parameter information mold_info is sent to the destination host of the cloud host.

[0090] In one optional embodiment, obtaining compression method parameter information specifically involves receiving a hot migration configuration file containing compression method parameter information sent by the cloud host management platform; sending the compression method parameter information to the target host of the cloud host includes:

[0091] Send the hot migration configuration file, which contains compression method parameters, to the destination host machine of the cloud server.

[0092] For example, the source host of the cloud server responds to the hot migration command Instruct_01 sent by the cloud server management platform, receives the hot migration configuration file accelerator.xml containing the compression method parameter information mold_info sent by the cloud server management platform, and then sends the hot migration configuration file accelerator.xml containing the compression method parameter information mold_info to the destination host of the cloud server.

[0093] In one optional embodiment, the hot migration configuration file further includes accelerator card requirement parameter information; prior to compressing dirty pages of the cloud host's memory using a first hardware accelerator on the source host, the following steps are also included:

[0094] Based on the accelerator card requirement parameters, it is determined that the first hardware accelerator of the source host machine matches the accelerator card requirement parameters.

[0095] In practice, the source host machine can read the accelerator card requirement parameters from the hot migration configuration file by calling the `hardwareAccelerator()` interface of the Libvirt component. These requirements parameters contain information about available hardware accelerators. After reading the requirements, the source host machine can store this information in the QEMU component's compression module, `Compressor`. The QEMU component then calls the `compress_threads_save_setup` interface to determine if the source host machine's first hardware accelerator matches the required parameters stored in `Compressor`, thus determining its availability. If the first hardware accelerator matches the requirements, it is determined that the first hardware accelerator is available.

[0096] In the embodiments of this application, when it is determined that the first hardware accelerator is available, the first hardware accelerator can be made ready.

[0097] For example, the hot migration configuration file accelerator.xml also includes the accelerator card requirement parameter information Hard_card_de_In; before compressing the dirty pages of the cloud host's memory through the first hardware accelerator Hardware Accelerator_1 of the source host, the following operations are performed: based on the accelerator card requirement parameter information Hard_card_de_In, it is determined that the first hardware accelerator Hardware Accelerator_1 of the source host matches the accelerator card requirement parameter information Hard_card_de_In.

[0098] Step S103: If a first ready notification is received from the target host, the first memory compressed data is sent to the target host so that the target host can decompress the first memory compressed data through the target host's second hardware accelerator.

[0099] For example, if the source host receives the first ready notification information Run_ok_1 sent by the destination host, it sends the first memory compressed data Data1 to the destination host so that the destination host can decompress the first memory compressed data Data1 through the destination host's second hardware accelerator HardwareAccelerator_2.

[0100] The method described in the above embodiments provides a mechanism for hot migration of cloud hosts using hardware accelerators. By using hardware accelerators for compression, the hot migration of dirty memory pages of cloud hosts can be accelerated, reducing the time required for hot migration and improving the efficiency of hot migration.

[0101] In an optional embodiment, after obtaining the compression method parameter information in response to receiving the hot migration command, the method further includes:

[0102] If the compression method parameter information is the preset second parameter, then the dirty pages of the cloud host's memory are compressed by the CPU of the source host to generate the second memory compressed data; the second parameter indicates that a regular hot migration is required; and the compression method parameter information is sent to the destination host of the cloud host based on the destination host address.

[0103] If a second readiness notification is received from the destination host, the second memory compressed data is sent to the destination host so that the destination host can decompress the second memory compressed data using its CPU.

[0104] For example, assume the preset second parameter is "soft". In response to receiving the hot migration command Instruct_01, after obtaining the compression method parameter information mold_info, the process further includes: if the compression method parameter information mold_info is "soft", then compressing the dirty pages of the cloud host's memory using the CPU of the source host to generate second memory compressed data Data2; the second parameter "soft" indicates that a regular hot migration is required; and sending the compression method parameter information mold_info to the cloud host's destination host based on the destination host address Destination_IP; then, if the second readiness notification information Run_ok_2 is received from the destination host, then sending the second memory compressed data Data2 to the destination host so that the destination host decompresses the second memory compressed data Data2 using its CPU.

[0105] In one alternative embodiment, the dirty pages of the cloud host's memory are compressed via a first hardware accelerator on the source host, prior to which the following steps are also included:

[0106] If it is determined that the first hardware accelerator of the source host machine does not match the accelerator card requirement parameter information, a first alarm message is generated; the first alarm message indicates that the accelerator card requirement parameter information and / or the first hardware accelerator need to be adjusted.

[0107] In one optional embodiment, the hot migration method for cloud servers further includes: obtaining hot migration time information in response to a user's time query command.

[0108] In specific implementations, some embodiments may use a live migration assessment tool, such as the get_stat interface, to evaluate the time status of the live migration. In other embodiments, general-purpose time tools, such as the time command, may also be used to observe the live migration time and the operation of services.

[0109] The cloud host hot migration method provided in the above embodiments of this application is applied to the source host of the cloud host. In response to receiving a hot migration command, it obtains compression method parameter information. If the compression method parameter information is a preset first parameter, it compresses the dirty pages of the cloud host's memory using the first hardware accelerator of the source host to generate first memory compressed data. The first parameter indicates that accelerated hot migration is required. Based on the destination host address corresponding to the hot migration command, it sends the compression method parameter information to the destination host of the cloud host. If a first ready notification is received from the destination host, it sends the first memory compressed data to the destination host so that the destination host can decompress the first memory compressed data using its second hardware accelerator. This method provides a mechanism for hot migration of cloud hosts using a hardware accelerator. By using a hardware accelerator for compression, it can accelerate the hot migration of dirty pages of the cloud host's memory, reduce the time consumed by hot migration, and improve the efficiency of hot migration.

[0110] Figure 2 This application illustrates a flowchart of another cloud server hot migration method provided in an embodiment of the present application, applied to the target host machine of the cloud server, such as... Figure 2 As shown, it includes the following steps:

[0111] Step S201: Receive compression method parameter information sent by the source host machine of the cloud host.

[0112] In some embodiments of this application, the target host machine of the cloud server is equipped with Libvirt and QEMU components.

[0113] In practice, this can be achieved by using the Libvirt component on the destination host machine of the cloud server to receive compression method parameter information sent by the source host machine. For example, the destination host machine can call the migrate interface of the Libvirt component set on the destination to obtain the compression method parameter information.

[0114] For example, the destination host of the cloud server can receive the compression method parameter information mold_info sent by the source host of the cloud server.

[0115] In one optional embodiment, receiving compression method parameter information sent by the source host of the cloud host specifically means receiving a hot migration configuration file containing compression method parameter information sent by the source host of the cloud host.

[0116] For example, the destination host of the cloud server can receive the compression method parameter information mold_info sent by the source host of the cloud server. Specifically, the destination host receives the hot migration configuration file accelerator.xml containing the compression method parameter information mold_info sent by the source host of the cloud server.

[0117] Step S202: If the compression method parameter information is the preset first parameter, then send a first ready notification information to the source host; and decompress the received first memory compressed data through the second hardware accelerator of the destination host to complete the accelerated hot migration of the cloud host; the first parameter indicates that accelerated hot migration is required.

[0118] For example, assuming the preset first parameter is "hard", if the compression method parameter information mold_info is "hard", then the first ready notification information Run_ok_1 is sent to the source host; and the second hardware accelerator Hardware Accelerator_2 of the destination host is used to decompress the received first memory compressed data Data1 to complete the accelerated hot migration of the cloud host; the first parameter "hard" indicates that accelerated hot migration is required.

[0119] In an optional embodiment, the hot migration configuration file further includes accelerator card requirement parameter information; and before sending a readiness notification to the source host, it also includes:

[0120] Based on the accelerator card requirement parameters, it is determined that the second hardware accelerator of the target host machine matches the accelerator card requirement parameters.

[0121] For example, the hot migration configuration file accelerator.xml also includes the accelerator card requirement parameter information Hard_card_de_In; before sending the ready notification information Run_ok_1 to the source host, the following operations are performed: based on the accelerator card requirement parameter information Hard_card_de_In, it is determined that the second hardware accelerator Hardware Accelerator_2 of the destination host matches the accelerator card requirement parameter information Hard_card_de_In.

[0122] In practice, the destination host machine can read the accelerator card requirement parameters from the hot migration configuration file by calling the `hardwareAccelerator()` interface of the Libvirt component set on the destination host machine. These accelerator card requirement parameters contain information about available hardware accelerators. After reading the accelerator card requirement parameters from the hot migration configuration file, the destination host machine can store this information in the `UnCompressor` decompression module of the QEMU component set on the destination host machine. The QEMU component calls the `compress_threads_save_setup` interface, and based on the accelerator card requirement parameters stored in the `UnCompressor` decompression module, determines whether the destination host machine's second hardware accelerator matches the accelerator card requirement parameters, thus determining whether the second hardware accelerator is available. If the destination host machine's second hardware accelerator matches the accelerator card requirement parameters, then the second hardware accelerator is considered available.

[0123] It should be noted that in the embodiments of this application, the process by which the target host determines whether the second hardware accelerator of the target host matches the accelerator card requirement parameter information based on the accelerator card requirement parameter information can be similar to the process by which the source host determines whether the first hardware accelerator of the source host matches the accelerator card requirement parameter information based on the accelerator card requirement parameter information. The similarities will not be repeated here.

[0124] In one optional embodiment, after receiving the compression method parameter information sent by the source host of the cloud server, the method further includes:

[0125] If the compression method parameter information is the preset second parameter, then a second ready notification information is sent to the source host; and the received second memory compressed data is decompressed by the CPU of the destination host to complete the regular hot migration of the cloud host; the second parameter indicates that a regular hot migration is required.

[0126] For example, assume the preset second parameter is "soft". After receiving the compression method parameter information mold_info sent by the source host of the cloud host, the following steps can also be performed: if the compression method parameter information mold_info is "soft", then send the second ready notification information Run_ok_2 to the source host; and decompress the received second memory compressed data Data2 through the CPU pair of the destination host to complete the regular hot migration of the cloud host; the second parameter "soft" indicates that a regular hot migration is required.

[0127] In one optional embodiment, the received first memory compressed data is decompressed via a second hardware accelerator on the destination host machine, prior to which the following steps are also included:

[0128] If the second hardware accelerator of the target host machine is determined to match the accelerator card requirement parameters, a second alarm message is generated; the second alarm message indicates that the accelerator card requirement parameters and / or the second hardware accelerator need to be adjusted.

[0129] The method of this embodiment is applied to the target host machine of the cloud server, and provides a mechanism for hot migration of the cloud server through a hardware accelerator. By using the hardware accelerator for decompression, the hot migration of dirty memory pages of the cloud server can be accelerated, reducing the time consumption of hot migration of the cloud server and improving the efficiency of hot migration of the cloud server.

[0130] and Figure 1 The cloud server hot migration method shown is based on the same inventive concept, and this application also provides a cloud server hot migration device in its embodiments. Since this device is the subject of this application... Figure 1 The device corresponding to the cloud server hot migration method shown is similar in principle to this method, and therefore its implementation can be found in [reference needed]. Figure 1 The implementation of the above methods, where repetition is required, will not be repeated.

[0131] Figure 3 This application provides a schematic diagram of the structure of a cloud server hot migration device according to an embodiment of the present application. Figure 3 As shown, the hot migration device for the cloud host includes a first information acquisition unit 301, a memory compression unit 302, and a compressed data transmission unit 303.

[0132] The first information acquisition unit 301 is used to acquire compression method parameter information in response to receiving a hot migration command;

[0133] The memory compression unit 302 is used to: if the compression method parameter information is a preset first parameter, compress the dirty pages of the cloud host's memory through the first hardware accelerator of the source host to generate first memory compression data; the first parameter indicates that accelerated hot migration is required; and send the compression method parameter information to the destination host of the cloud host based on the destination host address corresponding to the hot migration command.

[0134] The compressed data transmission unit 303 is used to send the first memory compressed data to the destination host machine if it receives the first ready notification information sent by the destination host machine, so that the destination host machine can decompress the first memory compressed data through the second hardware accelerator of the destination host machine.

[0135] In an optional embodiment, the first information acquisition unit 301 is specifically used for:

[0136] Receive a hot migration configuration file containing compression method parameters sent by the cloud server management platform;

[0137] Memory compression unit 302 is specifically used for:

[0138] Send the hot migration configuration file, which contains compression method parameters, to the destination host machine of the cloud server.

[0139] In an optional embodiment, the hot-migrating configuration file further includes accelerator card requirement parameter information; the memory compression unit 302 is also used for:

[0140] Before compressing the dirty pages of the cloud host's memory through the first hardware accelerator of the source host, the matching of the first hardware accelerator of the source host with the acceleration card requirement parameter information is determined based on the acceleration card requirement parameter information.

[0141] In an optional embodiment, the memory compression unit 302 is further configured to:

[0142] If the compression method parameter information is the preset second parameter, then the dirty pages of the cloud host's memory are compressed by the CPU of the source host to generate the second memory compressed data; the second parameter indicates that a regular hot migration is required; and the compression method parameter information is sent to the destination host of the cloud host based on the destination host address.

[0143] The compressed data transmission unit 303 is also used for:

[0144] If a second readiness notification is received from the destination host, the second memory compressed data is sent to the destination host so that the destination host can decompress the second memory compressed data using its CPU.

[0145] In an optional embodiment, the device further includes a first alarm unit 304, the first alarm unit 304 being configured to:

[0146] Before compressing the dirty pages of the cloud host's memory through the first hardware accelerator of the source host, if it is determined that the first hardware accelerator of the source host does not match the accelerator card's requirement parameter information, a first alarm message is generated; the first alarm message indicates that the accelerator card's requirement parameter information and / or the first hardware accelerator need to be adjusted.

[0147] and Figure 2 The cloud server hot migration method shown is based on the same inventive concept. This application also provides another cloud server hot migration device in its embodiments. Since this device is the subject of this application... Figure 2 The device corresponding to the cloud server hot migration method shown is similar in principle to this method, and therefore its implementation can be found in [reference needed]. Figure 2The implementation of the above methods, where repetition is required, will not be repeated.

[0148] Figure 4 This illustration shows a schematic diagram of another cloud server hot migration device provided in an embodiment of this application, which is deployed on the target host machine of the cloud server, such as... Figure 4 As shown, the hot migration device for the cloud host includes a second information acquisition unit 401 and a memory decompression unit 402.

[0149] The second information acquisition unit 401 is used to receive compression method parameter information sent by the source host machine of the cloud host.

[0150] The memory decompression unit 402 is used to: send a first ready notification to the source host if the compression method parameter information is a preset first parameter; and decompress the received first memory compression data through the second hardware accelerator of the destination host to complete the accelerated hot migration of the cloud host; the first parameter indicates that accelerated hot migration is required.

[0151] In an optional embodiment, the second information acquisition unit 401 is specifically used for:

[0152] Receive the hot migration configuration file containing compression method parameters sent by the source host machine of the cloud server.

[0153] In an optional embodiment, the hot-migrating configuration file further includes accelerator card requirement parameter information; the memory decompression unit 402 is also used for:

[0154] Before sending a readiness notification to the source host, the second hardware accelerator of the destination host is determined to match the accelerator card requirement parameters based on the accelerator card requirement parameters.

[0155] In an optional embodiment, the memory decompression unit 402 is further configured to:

[0156] If the compression method parameter information is the preset second parameter, then a second ready notification information is sent to the source host; and the received second memory compressed data is decompressed by the CPU of the destination host to complete the regular hot migration of the cloud host; the second parameter indicates that a regular hot migration is required.

[0157] In an optional embodiment, the device further includes a second alarm unit 403, the second alarm unit being used for:

[0158] Before decompressing the received first memory compressed data through the second hardware accelerator of the destination host, if it is determined that the second hardware accelerator of the destination host matches the acceleration card requirement parameter information, a second alarm message is generated; the second alarm message indicates that the acceleration card requirement parameter information and / or the second hardware accelerator need to be adjusted.

[0159] Based on the same inventive concept as the above-described method embodiments, this application also provides an electronic device. In some possible implementations, the electronic device according to the present invention can be as follows: Figure 5 As shown, it includes a memory 501, a communication module 503, and one or more processors 502. Among them,

[0160] Memory 501 is used to store computer programs executed by processor 502. Memory 501 stores computer programs that can run on the processor, which, when executed by the processor, cause the processor to perform the steps in the cloud host hot migration method according to various exemplary embodiments of the present invention described above. For example, the processor can perform actions such as... Figure 1 Steps S101-S103 shown, or performed as follows Figure 2 The steps S201-S202 are shown in the diagram. The memory 501 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0161] Memory 501 may be volatile memory, such as random-access memory (RAM); memory 501 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 501 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 501 may be a combination of the above-mentioned memories.

[0162] Processor 502 may include one or more central processing units (CPUs) or digital processing units, etc. Processor 502 is used to implement the above-described hot migration method for cloud hosts when calling computer programs stored in memory 501.

[0163] The communication module 503 is used to communicate with terminal devices and other servers.

[0164] This application does not limit the specific connection medium between the memory 501, communication module 503, and processor 502 described above. This disclosure embodiment... Figure 5 The memory 501 and the processor 502 are connected via a bus 504, and the bus 504 is in Figure 5 The connections between other components are shown in thick lines only and are not intended to be limiting. The 504 bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0165] This application also provides a computer storage medium storing computer-executable instructions for implementing the hot migration method of a cloud host according to any embodiment of this application.

[0166] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the hot migration method for a cloud host as described in the above embodiments. The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0167] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for hot migration of a cloud server, applied to the source host of the cloud server, characterized in that, include: In response to receiving a hot migration command, the compression method parameter information is obtained; the hot migration command is received through the Libvirt component on the source host machine of the cloud host; If the compression method parameter information is a preset first parameter, then the dirty pages of the cloud host's memory are compressed through the first hardware accelerator of the source host to generate first memory compressed data; The first parameter indicates the need for accelerated thermal migration; And based on the destination host address corresponding to the hot migration command, the compression method parameter information is sent to the destination host of the cloud host; If a first readiness notification is received from the destination host, the first memory compressed data is sent to the destination host so that the destination host can decompress the first memory compressed data through the destination host's second hardware accelerator; After receiving the hot migration command and obtaining the compression method parameter information, the response further includes: If the compression method parameter information is a preset second parameter, then the dirty pages of the cloud host's memory are compressed by the CPU of the source host to generate second memory compressed data; the second parameter indicates that a regular hot migration is required; and the compression method parameter information is sent to the destination host of the cloud host based on the destination host address. If a second ready notification is received from the destination host, the second memory compressed data is sent to the destination host so that the destination host can decompress the second memory compressed data using its CPU.

2. The method according to claim 1, characterized in that, The acquisition of compression method parameter information includes: Receive a hot migration configuration file containing the compression method parameter information sent by the cloud host management platform; Sending the compression method parameter information to the destination host machine of the cloud host includes: The hot migration configuration file containing the compression method parameter information is sent to the destination host machine of the cloud host.

3. The method according to claim 2, characterized in that, The hot migration configuration file also includes accelerator card requirement parameter information; the step of compressing dirty pages in the cloud host's memory using the first hardware accelerator of the source host machine, prior to which the following steps are also included: Based on the accelerator card requirement parameters, it is determined that the first hardware accelerator of the source host machine matches the accelerator card requirement parameters.

4. A method for hot migration of a cloud server, applied to the destination host machine of the cloud server, characterized in that, include: Receive compression method parameter information sent by the source host machine of the cloud server; The process of receiving compression method parameter information sent by the source host of the cloud host is to receive the compression method parameter information sent by the source host of the cloud host through the Libvirt component on the destination host of the cloud host. If the compression method parameter information is a preset first parameter, then a first ready notification information is sent to the source host machine; And through the second hardware accelerator of the target host machine, the received first memory compressed data is decompressed to complete the accelerated hot migration of the cloud host. The first parameter indicates the need for accelerated thermal migration; After receiving the compression method parameter information sent by the source host machine of the cloud host, the method further includes: If the compression method parameter information is a preset second parameter, then a second ready notification information is sent to the source host; and the received second memory compressed data is decompressed by the CPU of the destination host to complete the regular hot migration of the cloud host; the second parameter indicates that a regular hot migration is required.

5. The method according to claim 4, characterized in that, The compression method parameter information sent by the source host machine of the received cloud host includes: The source host machine of the cloud server sends a hot migration configuration file containing the compression method parameter information.

6. The method according to claim 5, characterized in that, The hot migration configuration file also includes accelerator card requirement parameter information; prior to sending the readiness notification information to the source host, the process also includes: Based on the acceleration card requirement parameters, it is determined that the second hardware accelerator of the target host machine matches the acceleration card requirement parameters.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program; when the computer program is executed by a processor, it implements the method of any one of claims 1 to 3 or the method of any one of claims 4 to 6.

8. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the computer program is executed by the processor, it implements the method of any one of claims 1 to 3 or the method of any one of claims 4 to 6.

Citation Information

Patent Citations

  • System and method for realizing virtual machine thermal migration optimization processing based on acceleration card

    CN109918174A

  • Method, device and equipment for automatically selecting thermal migration acceleration scheme of virtual machine

    CN113886012A