A virtual machine online migration optimization method based on autoconverge-based speed limit threshold calculation
By optimizing virtual machine migration through autoconverge rate limit calculation, the problems of long migration time and high resource consumption were solved, and efficient and successful virtual machine migration was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CLOUD TECH CO LTD
- Filing Date
- 2023-12-13
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies require multiple iterations to find the rate-limiting threshold during virtual machine migration, resulting in long migration times, significant impact on customer business, high system resource consumption, and failure to migrate under high pressure.
An autoconverge-based rate limiting threshold calculation method is adopted. By establishing a rate limiting threshold calculation formula, the migration copy rate and the rate of dirty page generation in memory are obtained in real time. The migration status convergence is judged, and the rate limiting of the dirty page rate in memory is triggered, thereby optimizing the online migration process of virtual machines.
It significantly shortens migration time, reduces the impact on customer business, saves system resources, improves migration success rate, and avoids long-term negative impacts of migration on system performance.
Smart Images

Figure CN117850965B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the emerging information technology field of cloud computing virtualization, and is a virtual machine online migration optimization method based on autoconverge rate limit threshold calculation. Background Technology
[0002] In the field of virtualization in cloud computing, online (hot) migration of virtual machines is a crucial function frequently used by operations and maintenance personnel. In cloud computing applications, a single physical host may host several to hundreds of virtual machines. Each virtual machine is an independent and usable computer for the customer, usable like a regular PC. If too many virtual machines are hosted on a single physical host, it will impact the resources allocated to each virtual machine, thus affecting their performance. When the cloud management platform detects this, it needs to initiate online migration to move excess virtual machines from the heavily loaded physical host to a less loaded one. Additionally, when a potential fault is detected on a physical host that could affect customer services at any time, online migration is also necessary to move the virtual machine to a healthy physical host. Online virtual machine migration ensures that customer virtual machines do not need to be shut down during the migration process, allowing normal business operations. The migration only pauses for a very short, pre-defined period (typically a few hundred milliseconds) before completion, after which customer services can continue without interruption. The customer is virtually unaware that the online virtual machine migration is underway in the background. Virtual online migration technology is a very important basic function in cloud computing applications. On the one hand, it can help operation and maintenance personnel to effectively allocate the resources of the entire system. On the other hand, it is also an indispensable means of fault recovery and troubleshooting.
[0003] Among the existing publicly disclosed inventions, such as the patent application with publication number CN115480867A, a method, apparatus, and computer device for estimating hot migration time are disclosed. The method includes: firstly, obtaining the initial dirty page rate and migration bandwidth of the target virtual machine; performing a first-stage virtual iteration on the initial dirty page memory of the target virtual machine until the dirty page rate of the target virtual machine is less than a specified threshold; then determining a stable dirty page rate based on the dirty page rate of the last iteration in the first-stage virtual iteration; further performing a second-stage virtual iteration on the target virtual machine until the dirty page memory of the target virtual machine is less than the dirty page threshold; and finally summing the first virtual iteration time and the second virtual iteration time to determine the estimated total virtual migration time of the target virtual machine.
[0004] The aforementioned patent uses an iterative approach to find the speed limit threshold required to complete the migration. Under high memory pressure, many rounds of migration attempts will be made. In fact, these migrations are only to find a suitable speed limit threshold. The time-consuming memory migration work is unnecessary because before a suitable speed limit threshold is found, the migration attempts cannot achieve migration convergence and are actually meaningless to the migration progress itself. Summary of the Invention
[0005] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0006] This invention can eliminate multiple unnecessary rounds of actual migration, significantly saving migration time, reducing the impact on customer services during migration, saving system bandwidth usage, improving the success rate of online virtual machine migration under high pressure, and automatically identifying situations where current system resources cannot support the successful online migration of virtual machines under such pressure, thus avoiding the extreme situation of migration failing indefinitely and severely impacting customer services. To achieve the above objectives, the technical solution of this invention, a virtual machine online migration optimization method based on autoconverge rate limit threshold calculation, includes the following steps:
[0007] S1: Establish the speed limit threshold calculation formula based on the migration convergence condition of autoconverge;
[0008] S2: Calculate and obtain the virtual machine speed limit threshold value based on step S1;
[0009] S3: Real-time acquisition of virtual machine migration copy rate and memory dirty page generation rate, comparison of migration copy rate and memory dirty page generation rate, and convergence judgment of migration status.
[0010] S4: Triggers the rate-limiting threshold for dirty page rate in memory, limits the rate of the virtual machine, and optimizes the online hot migration process of the virtual machine.
[0011] Specifically, in S1, the establishment of the speed limit threshold calculation formula includes:
[0012] ;
[0013] in, For migration copy rate; This refers to the dirty page rate of memory.
[0014] This is the speed limit threshold; This is for the amount of data that still needs to be transmitted in the next round;
[0015] This is the minimum data volume threshold. The rate at which dirty pages are generated for the next round of memory processing;
[0016] This is the time cycle for the next round.
[0017] Specifically, the amount of data that still needs to be transmitted in the next round This includes: the amount of memory data that needs to be copied from the source virtual machine to the destination virtual machine in the next round of data migration. The calculation strategy is as follows:
[0018] ;
[0019] Minimum data size threshold This includes: the minimum amount of data that must be copied during migration to achieve convergence in the next migration round. The calculation strategy is as follows:
[0020] .
[0021] Specifically, in S2, the rate limiting threshold includes a percentage value representing the degree to which the rate of dirty page generation in virtual machine memory is limited. For example, a rate limiting threshold of 10 means that the virtual machine will work at 90% (1-10 / 100) of CPU efficiency, and the dirty page rate will also become 90% of its original rate. In autoconverge, limiting the runtime of the VCPU is used to limit the execution efficiency of the virtual machine CPU, thereby reducing the running efficiency of the guest virtual machine and thus reducing the rate of dirty page generation.
[0022] Specifically, in S3, the convergence judgment of the migration state includes: when the migration copy rate is faster than the rate of dirty memory page generation, and a certain proportional relationship is satisfied so that after the system completes a round of migration, it can complete the migration of the dirty memory pages newly generated by the virtual machine in the previous round of migration in one go within a preset virtual machine pause time.
[0023] Specifically, the migration copy rate includes the rate at which virtual machine memory is copied during hot migration, i.e., the amount of memory that can be copied from the source virtual machine to the destination virtual machine per second. When customer business is not so busy, the rate of dirty page generation is not so high, or the migration copy rate is large enough, hot migration can eventually be completed after several rounds of migration and short pauses. Imagine if the migration copy rate is only equal to or less than the rate of dirty page generation; theoretically, hot migration will never be completed. The migration copy rate must be greater than the rate of dirty page generation to allow the migration to eventually complete, and this state that guarantees the eventual completion of hot migration can be called the convergence state.
[0024] Specifically, the dirty page rate of memory This includes: the size of new dirty memory pages generated per unit time during virtual machine operation, the frequency of virtual machine memory modification, and the memory pressure of services within the virtual machine.
[0025] Specifically, in S4, the rate-limiting threshold for triggering the dirty page rate includes:
[0026] S411: Calculate and extract based on the speed limit threshold formula. ,in The percentage relationship between migration copy rate and dirty page rate is as follows: ;
[0027] S412: Proceed The default value is used to determine the next round of data migration transmission rate. The product of the data migration rate and the default value must be greater than or equal to the dirty page rate of memory.
[0028] Specifically, in S4, the optimization of the virtual machine online hot migration process includes the following specific steps:
[0029] S421: Based on the threshold value calculated by the aforementioned rate limiting threshold calculation formula, the virtual machine VCPU rate is limited to the corresponding degree, and the dirty page rate of the next round of memory is limited to the rate value that meets the convergence requirement.
[0030] S422: When the next round of migration is completed and convergence is achieved, immediately pause the virtual machine;
[0031] S423: Restore the virtual machine to operation on the destination virtual machine.
[0032] Specifically, in S421, the next round of dirty page rate of memory... The calculation strategy is as follows:
[0033] .
[0034] Compared with the prior art, the technical effects of the present invention are as follows:
[0035] 1. This invention calculates the most suitable rate limit based on the actual migration bandwidth of the current system and the pressure of customer services using a rate limit calculation formula. This allows the system to migrate at the appropriate rate limit from the beginning, rather than searching for the appropriate rate limit through continuous iterative migration attempts. This can greatly reduce invalid migrations, significantly shorten migration time in high-pressure scenarios, reduce the impact on customer services, and greatly save system computing and network bandwidth resources.
[0036] 2. This invention dynamically calculates the rate-limiting threshold based on specific environmental conditions. Compared to the previous solution, it can identify situations where current resources cannot support the completion of virtual machine migration from the outset and inform the upper-layer applications. The old method, however, could not do this and would only make ineffective attempts. This avoids: 1) Virtual machines being in a migration state for a long time, affecting virtual machine stability and performance. 2) Migration occupying network bandwidth and computing resources for a long time, affecting the overall performance of the system. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0038] Figure 1 This is a flowchart illustrating the overall process of virtual machine hot migration based on autoconverge according to the present invention.
[0039] Figure 2 This is a flowchart of a rate-limiting process for virtual machine hot migration based on autoconverge according to the present invention.
[0040] Figure 3 This is a flowchart of a virtual machine hot migration process based on autoconverge for calculating the rate limit threshold, according to the present invention.
[0041] Figure 4 This is an unoptimized version of the present invention, with 10G pressure applied inside an 8C32G virtual machine, and a schematic diagram of the MET test results.
[0042] Figure 5 This is an optimized version of the present invention, with an internal pressure of 10G on an 8C32G virtual machine, and a schematic diagram of the MET test results;
[0043] Figure 6This is an unoptimized version of the present invention, with an internal pressure of 30G on an 8C32G virtual machine, and a schematic diagram of the MET test results;
[0044] Figure 7 This is an optimized version of the invention, with an internal pressure of 30G on an 8C32G virtual machine. The diagram shows the MET test results.
[0045] Figure 8 This is a performance data comparison table between an unoptimized version of the present invention and the optimized version in this example;
[0046] Figure 9 This is a comparison chart of migration time between an unoptimized version of the present invention and the optimized version in this example;
[0047] Figure 10 This is a comparison table of storage access times between an unoptimized version of the present invention and the optimized version in this example. Detailed Implementation
[0048] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0049] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0050] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0051] Example 1:
[0052] Currently, QEMU is the most widely used open-source virtualization software on the GNU / Linux platform. QEMU virtual machine online migration uses the auto-convergence mode by default. A brief introduction to online virtual machine migration technology based on auto-convergence: The virtual machine needs to complete the first round of full memory migration. The migration target is all the memory of the virtual machine. During the migration process, the client's business continues to run and generates new memory data, which we call dirty page data. After completing the first round of full memory migration, the newly generated dirty page data during this migration is read through the kernel interface as the basis for the next round of data migration. It is then determined whether the remaining data can be copied in one go within a preset short time. If so, the virtual machine is paused and a final data migration is performed. If the condition is not met, it is determined whether rate limiting is needed. If rate limiting is needed, the virtual machine's CPU capacity is reduced to a predetermined percentage, so the rate of dirty page generation in the next round also decreases by the corresponding percentage, and the next round of memory data migration begins. After the second round is completed, it is checked whether convergence has occurred. If not, the rate limiting of the virtual machine will continue to increase according to the preset step size until convergence is finally achieved, the migration is completed, and the next round of migration begins. Alternatively, if the virtual machine experiences excessive memory pressure after reaching the agreed-upon maximum speed limit and still cannot converge, the migration will continue indefinitely. In this case, the services within the migrated virtual machine will become virtually unusable, and system bandwidth will be continuously consumed, significantly impacting customers. The overall process for virtual machine hot migration based on auto-convergence can be found in [reference needed]. Figure 1 As shown, the rate-limiting process based on auto-convergence hot migration can be referenced. Figure 2 As shown in the example, this paper proposes a new online virtual machine migration optimization method based on auto-convergence rate limit threshold calculation to address issues such as long migration times, high system resource consumption, significant impact on customers, and even migration failure under high pressure.
[0053] like Figure 1 , 2 As shown in Figure 3, an embodiment of the present invention provides a virtual machine online migration optimization method based on auto convergence rate limit calculation, as follows: Figure 1 As shown, the specific steps include the following:
[0054] S1: Establish the speed limit threshold calculation formula based on the migration convergence condition of auto convergence;
[0055] In S1, the establishment of the speed limit threshold calculation formula includes:
[0056] ;
[0057] in, For migration copy rate; This refers to the dirty page rate of memory.
[0058] This is the speed limit threshold; This is for the amount of data that still needs to be transmitted in the next round;
[0059] This is the minimum data volume threshold. The rate at which dirty pages are generated for the next round of memory processing;
[0060] This is the time cycle for the next round.
[0061] The amount of data that still needs to be transmitted in the next round This includes: the amount of memory data that needs to be copied from the source virtual machine to the destination virtual machine in the next round of data migration. The calculation strategy is as follows:
[0062] ;
[0063] Minimum data size threshold This includes: the minimum amount of data that must be copied during migration to achieve convergence in the next migration round. The calculation strategy is as follows:
[0064] .
[0065] S2: Calculate and obtain the virtual machine speed limit threshold value based on step S1;
[0066] In S2, the rate limiting threshold includes a percentage value representing the degree to which the rate of dirty page generation in virtual machine memory is limited. For example, a rate limiting threshold of 10 means that the virtual machine will work at 90% (1-10 / 100) of CPU efficiency, and the dirty page rate will also become 90% of its original rate. In auto convergence, limiting the runtime of the VCPU is used to limit the execution efficiency of the virtual machine CPU, thereby reducing the running efficiency of the guest virtual machine and thus reducing the rate of dirty page generation.
[0067] S3: Real-time acquisition of virtual machine migration copy rate and memory dirty page generation rate, comparison of migration copy rate and memory dirty page generation rate, and convergence judgment of migration status.
[0068] The migration copy rate includes the rate at which virtual machine memory is copied during hot migration, i.e., the amount of memory copied from the source virtual machine to the destination virtual machine per second. When customer workloads are not heavy and the rate of dirty page generation is not high, or when the migration copy rate is sufficiently high, hot migration can eventually be completed after several rounds of migration with short pauses. Imagine if the migration copy rate were merely equal to or less than the rate of dirty page generation; theoretically, hot migration would never complete. The migration copy rate must exceed the rate of dirty page generation to ensure the migration's eventual completion. This state, which guarantees the eventual completion of hot migration, is called the convergence state.
[0069] The memory dirty page rate This includes: the size of new dirty memory pages generated per unit time during virtual machine operation, the frequency of virtual machine memory modification, and the memory pressure of services within the virtual machine.
[0070] In S3, the convergence judgment of the migration state includes: when the migration copy rate is faster than the rate of dirty memory page generation, and a certain proportional relationship is satisfied so that after the system completes a round of migration, it can complete the migration of the dirty memory pages newly generated by the virtual machine in the previous round of migration in one go within a preset virtual machine pause time.
[0071] S4: Triggers the rate-limiting threshold for dirty page rate in memory, limits the rate of the virtual machine, and optimizes the online hot migration process of the virtual machine.
[0072] In S4, the rate-limiting threshold for triggering the dirty page rate includes:
[0073] S411: Calculate and extract based on the speed limit threshold formula. ,in The percentage relationship between migration copy rate and dirty page rate is as follows: ;
[0074] S412: Proceed The default value is used to determine the next round of data migration transmission rate. The product of the data migration rate and the default value must be greater than or equal to the dirty page rate of memory.
[0075] In S4, the optimization of the virtual machine online hot migration process includes the following specific steps:
[0076] S421: Based on the threshold value calculated by the aforementioned rate limiting threshold calculation formula, the virtual machine VCPU rate is limited to the corresponding degree, and the dirty page rate of the next round of memory is limited to the rate value that meets the convergence requirement.
[0077] S422: When the next round of migration is completed and convergence is achieved, immediately pause the virtual machine;
[0078] S423: Restore the virtual machine to operation on the destination virtual machine.
[0079] In S421, the next round of dirty page rate of memory The calculation strategy is as follows:
[0080] .
[0081] Example 2:
[0082] The implementation of this invention involves replacing the original iterative trial method with the speed limit threshold calculation method of this example, and modifying the corresponding QEMU online migration code based on the optimized migration process of this example.
[0083] like Figure 4 , 5 Sections 6, 7, 8, 9, and 10 mainly illustrate the feasibility of this solution and its optimization points compared to the current method through comparative analysis of test data before and after optimization.
[0084] Test environment:
[0085] Host machine: 64-core Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz, 512GB RAM, one gigabit network card, one 10 gigabit network card, CentOS 7.6 operating system.
[0086] Virtual machine: 8-core CPU, 32GB RAM, Virtual machine operating system: CentOS 7.6
[0087] Testing tools:
[0088] The MET testing tool is a tool developed to support QEMU for testing QEMU hot migration performance. It can calculate migration time and the memory access performance of customer services during the migration process, and the test results can be displayed graphically. The stress.out memory pressure tool can generate corresponding memory pressure based on input parameters. For example, writing 10GB of memory data per second will generate a memory pressure of 10GB / s.
[0089] Test data:
[0090] Online migration test scenario 1: A 10GB / s memory load is applied to the virtual machine, with a maximum virtual machine pause time of 300ms and a migration network bandwidth of 1000MB / s. Performance test data for the unoptimized version of MET migration can be found here. Figure 4 The optimized version of MET migration performance test data for this patent can be found here. Figure 5 .
[0091] Online migration test scenario 2: A memory load of 30GB / s is applied to the virtual machine, with a maximum virtual machine pause time of 300ms and a migration network bandwidth of 1000MB / s. Performance test data for the unoptimized version of MET migration can be found here. Figure 6 The optimized version of MET migration performance test data for this patent can be found here. Figure 7 .
[0092] Performance Metrics Explanation: The time taken to update 1GB of memory (ms / GB) refers to the time required to update 1GB of memory space, expressed in milliseconds. A lower value indicates better memory performance.
[0093] From the overall experimental data, such as Figure 8 As shown, with the increase in virtual machine memory pressure (more frequent memory usage and updates), the migration time of this patented solution is significantly shorter than the original auto-convergence solution. For example, when the memory pressure is 30GB / s, the original solution takes 497 seconds to complete the migration, while this patented solution only takes 93.7 seconds, making it almost 5 times faster. Meanwhile, as a performance indicator of the time taken to update 1GB of memory—a measure of the performance of internal virtual machine memory access—this patented solution achieves 28.9K, slightly better than 30.4K, and significantly better than other solutions in this metric. Under slightly higher pressure, such as 10GB / s memory pressure, the time taken to update 1GB of memory with this patented solution is 11.2K, which is also significantly better than the unoptimized version's 25.4K! Figure 9 and Figure 10 The charts show a comparison of migration time before and after optimization, and a comparison of virtual machine storage access time. Gray represents the data before optimization, and black represents the data after optimization in this example. The two charts clearly show that the optimization effect in this example is quite significant.
[0094] In summary, this patented solution not only significantly shortens migration time but also reduces the impact on customer business during the migration process. Furthermore, other experiments have shown that migration fails under extreme memory pressure or when system migration bandwidth is limited; switching to this patented version for hot migration under the same conditions successfully completes the migration, thus improving the success rate of online migration.
[0095] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0096] It should be understood that determining B based on A does not mean determining B solely based on A; it also means determining B based on A and / or other information.
[0097] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired network and / or wireless network. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives (SSDs).
[0098] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0099] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0100] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only one method, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0101] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0102] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0103] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0104] In summary, compared with the prior art, the technical effects of the present invention are as follows:
[0105] 1. This invention calculates the most suitable rate limit based on the actual migration bandwidth of the current system and the pressure of customer services using a rate limit calculation formula. This allows the system to migrate at the appropriate rate limit from the beginning, rather than searching for the appropriate rate limit through continuous iterative migration attempts. This can greatly reduce invalid migrations, significantly shorten migration time in high-pressure scenarios, reduce the impact on customer services, and greatly save system computing and network bandwidth resources.
[0106] 2. This invention dynamically calculates the rate-limiting threshold based on specific environmental conditions. Compared to the previous solution, it can identify situations where current resources cannot support the completion of virtual machine migration from the outset and inform the upper-layer applications. The old method, however, could not do this and would only make ineffective attempts. This avoids: 1) Virtual machines being in a migration state for a long time, affecting virtual machine stability and performance. 2) Migration occupying network bandwidth and computing resources for a long time, affecting the overall performance of the system.
[0107] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A virtual machine online migration optimization method based on auto convergence-based rate limit threshold calculation, characterized in that: The method includes the following specific steps: S1: Establish the speed limit threshold calculation formula based on the migration convergence condition of auto convergence; S2: Calculate and obtain the virtual machine speed limit threshold value based on step S1; S3: Real-time acquisition of virtual machine migration copy rate and memory dirty page generation rate, comparison of migration copy rate and memory dirty page generation rate, and convergence judgment of migration status. S4: Triggers the rate-limiting threshold for dirty page rate in memory, limits the rate of the virtual machine, and optimizes the online hot migration process of the virtual machine; In S1, the establishment of the speed limit threshold calculation formula includes: ; in, For migration copy rate; This refers to the dirty page rate of memory. This is the speed limit threshold; This is for the amount of data that still needs to be transmitted in the next round; This is the minimum data volume threshold. The rate at which dirty pages are generated for the next round of memory processing; For the next round of time cycle; The amount of data that still needs to be transmitted in the next round This includes the amount of memory data that needs to be copied from the source virtual machine to the destination virtual machine in the next round of data migration. Minimum data size threshold This includes: the minimum amount of data that must be copied during migration in order to achieve migration convergence in the next migration round; In S3, the convergence judgment of the migration state includes: when the migration copy rate is faster than the rate of dirty memory page generation, and a certain ratio is satisfied so that after the system completes a round of migration, it can complete the migration of the dirty memory pages newly generated by the virtual machine in the previous round of migration in one go within a preset virtual machine pause time. In S4, the rate-limiting threshold for triggering the dirty page rate includes: S411: Calculate and extract based on the speed limit threshold formula. ,in The percentage relationship between migration copy rate and dirty page rate is as follows: ; S412: Proceed The default value is used to determine the data migration rate in the next round. The product of the data migration rate and the default value must be greater than or equal to the dirty page rate of memory. In S4, the optimization of the virtual machine online hot migration process includes the following specific steps: S421: Based on the threshold value calculated by the aforementioned rate limiting threshold calculation formula, the virtual machine VCPU rate is limited to the corresponding degree, and the dirty page rate of the next round of memory is limited to the rate value that meets the convergence requirement. S422: When the next round of migration is completed and convergence is achieved, immediately pause the virtual machine; S423: Restore the virtual machine to operation on the destination virtual machine.
2. The virtual machine online migration optimization method based on auto convergence rate limit calculation according to claim 1, characterized in that, In S2, the speed limiting threshold value This includes: the rate limit on the rate at which dirty pages are generated in virtual machine memory, expressed as a percentage.
3. The virtual machine online migration optimization method based on auto convergence rate limit calculation according to claim 1, characterized in that, The migration copy rate This includes the rate at which virtual machine memory is copied during live migration of virtual machines, i.e., the amount of memory that can be copied from the source virtual machine to the destination virtual machine per second.
4. The virtual machine online migration optimization method based on auto convergence rate limit calculation according to claim 3, characterized in that, The memory dirty page rate This includes: the size of new dirty memory pages generated per unit time during virtual machine operation, the frequency of virtual machine memory modification, and the memory pressure of services within the virtual machine.