Virtual machine live migration method and computing device
By acquiring evaluation metrics and adjusting performance parameters during the hot migration process, the contradiction between migration convergence and service performance in hyperconverged virtualization environments is resolved, achieving optimized management that maintains good service performance of virtual machines while satisfying migration convergence.
Patent Information
- Application Number
- CN202510728066.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-10-17
AI Technical Summary
In hyperconverged virtualization environments, there is a conflict between service performance and migration convergence during hot migration. Existing technologies often sacrifice service performance to ensure migration convergence, which affects the operation of virtual machine services.
By acquiring evaluation metrics, first and second evaluation values are determined. Based on these values, the performance parameters of the virtual machine are adjusted to accurately balance the relationship between migration convergence and business performance. An intelligent, efficient, and adaptive memory pre-copy method is adopted to optimize the hot migration process.
While ensuring migration convergence, maintain good business performance of virtual machines as much as possible, reduce the compression of business performance, and achieve optimization and refined management of the hot migration process.
Smart Images

Figure CN120803601A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of virtual machines, and particularly relates to a virtual machine live migration method and a computing device. BACKGROUND
[0002] In a hyper-converged virtualization environment, live migration is of great significance to business continuity and resource optimization.
[0003] However, the live migration process faces the contradiction between business performance and migration convergence. For example, in order to ensure migration convergence, business performance is often excessively sacrificed, resulting in a great impact on the business running of the virtual machine. SUMMARY
[0004] Embodiments of the present application provide a virtual machine live migration method and a computing device to accurately balance the relationship between migration convergence and virtual machine business performance, optimize the live migration process, and achieve fine management.
[0005] To achieve the above object, embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a virtual machine live migration method is provided, at least one service running on the virtual machine, and the method comprises:
[0007] In the process of executing live migration of the virtual machine, an evaluation index item is obtained, and a first evaluation value is determined based on a first service bandwidth and the evaluation index item; the first service bandwidth represents the service bandwidth of the virtual machine under the condition of migrating dirty page data using a first bandwidth; the first bandwidth is the bandwidth of the virtual machine satisfying the live migration convergence condition;
[0008] A second evaluation value is determined based on a second service bandwidth and the evaluation index item; the second service bandwidth is the actual service bandwidth of the virtual machine in the live migration process;
[0009] The performance parameter of the virtual machine is adjusted based on the first evaluation value and the second evaluation value.
[0010] As can be seen, in the embodiments of the present application, in view of the deficiencies of the existing live migration performance regulation technology in terms of accuracy, adaptability and virtual machine performance protection, an intelligent, efficient and adaptive memory pre-copy method for virtual machine live migration is constructed. In the process of each round of live migration, the business performance of the virtual machine is adjusted with the critical condition of the virtual machine satisfying the migration convergence as the target, which can accurately balance the relationship between migration convergence and virtual machine business performance, optimize the live migration process, and achieve fine management.
[0011] In a possible implementation manner, the live migration condition comprises: the first bandwidth is equal to the generation rate of the dirty page data; or the first bandwidth is greater than the generation rate of the dirty page data, and the difference between the first bandwidth and the generation rate of the dirty page data is less than a preset threshold.
[0012] It can be seen that the corresponding first bandwidth is determined based on the hot migration condition, the dirty page data is migrated using the first bandwidth, the hot migration condition is met, and the prediction score of the service performance of the virtual machine meeting the hot migration convergence is determined, so as to accurately balance the relationship between the migration convergence and the service performance of the virtual machine, and maintain the better service performance of the virtual machine as much as possible under the premise of meeting the migration convergence.
[0013] In a possible implementation, the first evaluation value is determined based on the first service bandwidth and the evaluation index item, including:
[0014] The characteristic value corresponding to each target index item is determined, wherein the target index item includes the service bandwidth index item and the evaluation index item;
[0015] The first score corresponding to each target index item is determined based on the target index item and the characteristic value corresponding to each target index item, wherein the target index item includes the service bandwidth index item and the evaluation index item, and the characteristic value represents the service performance of the target index item under the condition that the hot migration is not performed; and the first score corresponding to the service bandwidth index item is determined based on the first service bandwidth and the characteristic value corresponding to the service bandwidth index item.
[0016] The first scores corresponding to the target index items are weighted based on the weights corresponding to the target index items, to obtain the first evaluation value.
[0017] It can be seen that in the embodiments of the present application, it is considered that different virtual machines can be used to run different types of services, and there are differences in the occupation of different evaluation index items in the process of running a specific service. When evaluating the service performance of the virtual machine, not only the current values of the evaluation index items are considered, but also the corresponding characteristic values. Therefore, the calculated service performance can better reflect the advantages and disadvantages of the virtual machine running a specific service in combination with the service characteristics of the virtual machine.
[0018] When determining the first evaluation value, the characteristic values of the target index items are considered, so that the scores of the target index items can be more accurately calculated in combination with the service characteristics of the virtual machine. For the service bandwidth index item, the first service bandwidth is determined, the first service bandwidth represents the service bandwidth of the virtual machine under the condition that the dirty page data is migrated using the first bandwidth, and the first service bandwidth and the corresponding characteristic value are used to calculate the score of the service bandwidth index item. The score of the service bandwidth index item under the critical condition of meeting the migration convergence can be calculated, and the prediction value of the service performance of the virtual machine under the critical condition of meeting the migration convergence is predicted in combination with the real scores of other evaluation index items, thereby providing an accurate reference for subsequent adjustment of the service performance of the virtual machine.
[0019] In a possible implementation, the second evaluation value is determined based on the second service bandwidth and the evaluation index item, including:
[0020] determining a feature value corresponding to each target indicator item; wherein the target indicator items include a service bandwidth indicator item and an evaluation indicator item;
[0021] determining a second score corresponding to each target indicator item based on the target indicator item and the feature value corresponding to each target indicator item; the feature value represents service performance of the target indicator item under a condition that no hot migration is performed; wherein the second score corresponding to the service bandwidth indicator item is determined based on the second service bandwidth and the feature value corresponding to the service bandwidth indicator item;
[0022] weighting the second scores corresponding to the target indicator items based on the weights corresponding to the target indicator items, to obtain a second evaluation value.
[0023] It can be seen that in the embodiments of the present application, when determining the second evaluation value, the feature values of the target indicator items are considered, so that the scores of the target indicator items can be calculated more accurately in combination with the service characteristics of the virtual machine. For the service bandwidth indicator item, the real service bandwidth obtained by removing the real migration bandwidth is determined, and then the score of the service bandwidth is calculated based on the real service bandwidth and the corresponding feature value. The real service performance score of the virtual machine when running the service can be accurately evaluated.
[0024] In a possible implementation, the method further includes: performing normalization processing on the feature value corresponding to each target indicator item;
[0025] calculating the weight corresponding to each target indicator item based on the normalized feature value.
[0026] It can be seen that after the normalization processing is performed on the feature values corresponding to the target indicator items, the importance of different target indicator items when the virtual machine runs a specific service can be accurately measured, and then the corresponding weight is determined based on the importance. The evaluation value of the service performance obtained by weighting the scores of the target indicator items based on the weight can more accurately reflect the advantages and disadvantages of the virtual machine running the specific service.
[0027] In a possible implementation, determining the feature value corresponding to each target indicator item includes: for each target indicator item, determining a reference feature value matching a current time point as the feature value corresponding to the target indicator item based on reference feature values of a plurality of candidate time points determined in advance; wherein the reference feature values of the candidate time points are calculated by weighting the indicators of the services run by the virtual machine at a plurality of time points in a historical period.
[0028] It can be seen that in the embodiments of the present application, for each target indicator item, the reference feature values of different candidate time points can be calculated according to the real values of the target indicator items of the virtual machine in operation at the plurality of historical time points in the historical period. When calculating the reference feature values, higher weight is given to the data of the recent time points, so that the target indicator items of the virtual machine at the candidate time points can be more reflected. In the live migration process, the time-related feature values are considered when calculating the scores of the target indicator items, so that the differences in load performance of the virtual machine carrying the same service at different time periods are fully considered, and more accurate performance regulation is realized.
[0029] In a possible implementation, the performance parameter of the virtual machine is adjusted based on the first evaluation value and the second evaluation value, including: adjusting the performance parameter of the virtual machine based on the difference between the second evaluation value and the first evaluation value; in the case that the first evaluation value is higher than the second evaluation value, adjusting the performance parameter in the direction of improving the service performance of the virtual machine; in the case that the first evaluation value is lower than the second evaluation value, adjusting the performance parameter in the direction of reducing the service performance of the virtual machine.
[0030] It can be seen that in the embodiments of the present application, the service performance of the virtual machine is indirectly adjusted by adjusting the performance parameter. In the case that the first evaluation value is higher than the second evaluation value, the migration convergence can be currently met, and the performance parameter can be adjusted in the direction of improving the service performance of the virtual machine. In the case that the first evaluation value is lower than the second evaluation value, the migration convergence cannot be currently met, and the performance parameter can be adjusted in the direction of reducing the service performance of the virtual machine. Thus, the migration convergence and the service performance of the virtual machine are balanced, and the service performance of the virtual machine is maintained as good as possible on the premise of meeting the migration convergence.
[0031] In a possible implementation, the performance parameter of the virtual machine is adjusted based on the first evaluation value and the second evaluation value, including:
[0032] The adjustment degree of the performance parameter is determined based on the difference between the second evaluation value and the first evaluation value; wherein the adjustment degree is positively correlated with the difference;
[0033] The performance parameter of the virtual machine is adjusted based on the adjustment degree.
[0034] It can be seen that in the embodiments of the present application, the adjustment degree of the performance parameter is determined based on the difference between the second evaluation value and the first evaluation value. Blind adjustment is effectively avoided to prevent the service performance from being excessively compressed, and to ensure that the migration task is smoothly pushed forward in a complex environment. When the first evaluation value is much smaller than the second evaluation value, the service performance of the virtual machine can be quickly recovered, system resource waste is avoided, business response speed and processing capacity are improved, and user experience is improved.
[0035] In a possible implementation, before adjusting the service performance of the virtual machine, the method further includes:
[0036] determine whether the performance control condition is met based on the current real data migration bandwidth and the dirty page data generation rate, and if the performance control condition is met, execute the step of adjusting the service performance of the virtual machine;
[0037] If the dirty page data generation rate is less than the real data migration bandwidth, and the difference between the dirty page data generation rate and the real data migration bandwidth is less than the preset threshold, the performance control condition is not met.
[0038] If the dirty page data generation rate is less than the real data migration bandwidth, and the difference between the dirty page data generation rate and the real data migration bandwidth is greater than the preset threshold, or the dirty page data generation rate is greater than the real data migration bandwidth, the performance control condition is met.
[0039] It can be seen that in the embodiments of the present application, the primary goal is to ensure the convergence of live migration. When the convergence of live migration cannot be ensured, the performance control step is executed. When the convergence of live migration can be ensured, if the current service performance of the virtual machine is not excessively compressed, the step of adjusting the service performance of the virtual machine can not be executed. The number of control times can be reduced, which helps to improve the stability of the system.
[0040] In a possible implementation, the evaluation index item includes:
[0041] At least one of the CPU usage of the service, the memory usage of the service, the storage IOPS per second input / output operation times of the service, and the network IOPS of the service.
[0042] It can be seen that the virtual machine live migration method provided by the embodiments of the present application involves multiple aspects of index items, and can comprehensively and comprehensively evaluate the service performance of the virtual machine.
[0043] In a second aspect, a virtual machine live migration device is provided, which includes a function unit for executing any one of the methods provided in the first aspect, and the actions performed by each function unit are implemented by hardware or by hardware executing responsive software. For example, the virtual machine live migration device can include: a first determination module, configured to acquire an evaluation index item during the process of executing live migration of a virtual machine, and determine a first evaluation value based on a first service bandwidth and the evaluation index item; the first service bandwidth represents the service bandwidth of the virtual machine when migrating dirty page data using a first bandwidth; the first bandwidth is the bandwidth of the virtual machine that meets the live migration convergence condition. A second determination module is configured to determine a second evaluation value based on a second service bandwidth and the evaluation index item; the second service bandwidth is the actual service bandwidth of the virtual machine during the live migration process. An adjustment module is configured to adjust the performance parameter of the virtual machine based on the first evaluation value and the second evaluation value.
[0044] In a third aspect, a computing device is provided, comprising: a controller and a memory; the controller is coupled with the memory; the memory is configured to store computer program instructions; and the controller is configured to invoke the computer program instructions in the memory to execute any of the methods provided in the first aspect.
[0045] In a fourth aspect, a computer readable storage medium is provided, which stores computer executable instructions, when the computer executable instructions are run on a computing device, the computing device is caused to execute any of the methods provided in the first aspect.
[0046] In a fifth aspect, a computer program product is provided, which comprises: computer executable instructions, when the computer executable instructions are run on a computing device, the computing device is caused to execute any of the methods provided in the first aspect.
[0047] The technical effects brought by any of the implementation manners of the second aspect to the fifth aspect can refer to the technical effects brought by the different implementation manners of the first aspect, which will not be described herein. BRIEF DESCRIPTION OF DRAWINGS
[0048] Figure 1 A structural schematic diagram of a system architecture provided by an embodiment of the present application is provided.
[0049] Figure 2 A structural schematic diagram of a computing device provided by an embodiment of the present application is provided.
[0050] Figure 3 A flowchart of a virtual machine live migration method provided by an embodiment of the present application is provided.
[0051] Figure 4 A flowchart of determining a first evaluation value provided by an embodiment of the present application is provided.
[0052] Figure 5 A flowchart of determining a second evaluation value provided by an embodiment of the present application is provided.
[0053] Figure 6 Another flowchart of a virtual machine live migration method provided by an embodiment of the present application is provided.
[0054] Figure 7 A structural schematic diagram of a virtual machine live migration apparatus provided by an embodiment of the present application is provided. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present application will be described below with reference to the drawings.
[0056] In the description of the present application, unless otherwise specified, " / " represents that the objects before and after the correlation are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present application is only a description of the correlation of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural.
[0057] In addition, in the description of the present application, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or the like means any combination of the items, including any combination of single item or multiple items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.
[0058] In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, "first", "second" and the like are used to distinguish the same items or similar items with basically the same function and effect. The skilled in the art can understand that "first", "second" and the like do not limit the quantity and execution order, and "first", "second" and the like do not necessarily mean different. At the same time, in the embodiments of the present application, "exemplary" or "for example" means to represent as an example, illustration or explanation. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific manner, for understanding.
[0059] In the following, the related terms involved in the embodiments of the present application are briefly introduced.
[0060] Hyper-converged platform: a software and hardware integrated solution based on hyper-converged infrastructure architecture, which deeply integrates computing, storage, network and other resources through software definition technology, and provides services with unified management platform.
[0061] Virtual machine live migration technology: virtual machine live migration is to migrate a specified virtual machine in a running state on a source host to a destination host, and to ensure that the virtual machine service does not interrupt during migration. The implementation principle is to copy the source virtual machine memory and CPU, disk, network card and other device state data to the destination host, and to quickly restore and start the destination host.
[0062] Dirty page data generation rate: In the memory copying process of virtual machine live migration, new memory data (referred to as dirty page data) is continuously generated due to business running, and an iterative copying of dirty page data is adopted. In the last stage of live migration, the virtual machine is temporarily paused, the remaining dirty page data is quickly copied to the destination host, the network card traffic is switched to the destination host, and the virtual machine quickly resumes running on the destination host. In the memory copying process, the size of the dirty page data generated per unit time is the dirty page data generation rate.
[0063] The application scenario of the embodiment of the present application is exemplarily introduced below.
[0064] The embodiment of the present application can be applied to a hyper-converged scenario. Unlike the way that each device in a traditional IT (information technology) architecture is responsible for a specific function, in the hyper-converged scenario, computing, storage, network and other functions are integrated in one architecture, and through software-defined manner, these originally dispersed functions are uniformly managed to realize resource pooling, greatly simplifying the management difficulty of the IT architecture, reducing the number of hardware devices, reducing the cost, and at the same time, improving the utilization rate and flexibility of resources.
[0065] Computing virtualization is one of the core technologies of the hyper-converged scenario. By installing virtualization software on a physical server, multiple virtual machines are created, each of which has its own independent operating system, CPU, memory, storage and network resources, just like an independent physical server. These virtual machines are isolated from each other and do not interfere with each other, and even if one of the virtual machines fails, it will not affect the normal operation of other virtual machines.
[0066] In the hyper-converged scenario, live migration of virtual machines is often required. Live migration refers to the process of migrating a virtual machine from one physical host to another physical host without interrupting service in the running state of the virtual machine.
[0067] Live migration is divided into host configuration state synchronization, memory copying, virtual machine device state and disk data copying. Among them, memory copying includes three modes of pre-copy, post-copy and hybrid copy. Using post-copy or hybrid copy technology often needs to bear the risk of sharp decline in business performance, and the downtime is longer. The pre-copy mode can effectively reduce the downtime.
[0068] The memory pre-copying includes the following stages: 1) initial full copy. In this stage, the source host first completely copies all memory pages of the virtual machine to the target host. The virtual machine is still running on the source host, and memory data is generated, and all modified memory pages, i.e., dirty pages, are recorded. 2) iterative dirty page synchronization. In this stage, the virtual machine on the source host continues to run, and part of the memory is modified. The migration system iterates multiple times, and each time only the dirty page data modified after the last round of copying is transmitted. Ideally, after each iteration, the number of dirty pages decreases. 3) shutdown stage. When certain conditions are met, the iteration is stopped and the final synchronization process is entered, and the running of the virtual machine is suspended, and the remaining dirty page data is transmitted to the target host.
[0069] In the stage of iterative dirty page synchronization, if the dirty page data generation rate is high, it may not be possible to guarantee hot migration convergence, i.e., to enter the next stage.
[0070] In the related art, the rate at which the virtual machine generates dirty pages is controlled to be less than the migration copy rate to achieve hot migration convergence. For example, when it is found that hot migration convergence cannot be achieved, the CPU frequency is reduced to a certain extent to reduce the generation rate of dirty page data, and then the next round of migration is entered. If convergence still cannot be achieved, the degree of frequency reduction is continued to be added.
[0071] As can be seen, by blindly reducing the frequency, although hot migration convergence can ultimately be achieved, the business performance is greatly compressed, which has a very negative impact on the business running during the virtual machine hot migration process.
[0072] Therefore, embodiments of the present application provide a virtual machine hot migration method, and the inventive concept is that, in the process of hot migration of dirty page data by a virtual machine, on the one hand, an evaluation value of actual business performance of the virtual machine is determined, and on the other hand, under the premise of satisfying the hot migration convergence condition, an evaluation value of business performance of the virtual machine is predicted, which can be understood as a critical value of business performance under the premise of satisfying the hot migration convergence condition. Then, the performance parameters of the virtual machine are adjusted according to the two evaluation values, so that the real value of business performance is as close as possible to the predicted value. Thus, the relationship between migration convergence and virtual machine business performance is accurately balanced, the optimization of the hot migration process is achieved, and fine management is achieved. On the premise of guaranteeing hot migration convergence, the business performance is compressed as little as possible.
[0073] In the following, the system architecture of the embodiments of the present application is exemplarily introduced.
[0074] Figure 1 A schematic diagram of a system architecture provided by the embodiments of the present application is shown.
[0075] As shown in Figure 1 , in terms of hardware, the system architecture can include a first computing device 110 and a second computing device 120. The first computing device 110 is in communication connection with the second computing device 120.
[0076] The first computing device 110 can be one physical node in a hyper-converged scenario, and the second computing device 120 can be another physical node in the hyper-converged scenario.
[0077] At the software level, the first computing device 110 can run a plurality of virtual machines, each of which can be used to run a business. Figure 1 VM1 (virtual machine 1) and VM2 (virtual machine 2) are shown. The first computing device 110 can also be provided with an intelligent control module. The execution subject of the performance adjustment method of the virtual machine provided in the embodiments of the present application can be a computing device on which the virtual machine runs, and specifically can be an intelligent control module running on the computing device.
[0078] Figure 1 In the embodiment shown, the first computing device 110 is the source device for virtual machine live migration, and the second computing device 120 is the target device for virtual machine live migration.
[0079] When it is necessary to perform live migration on a certain virtual machine running on the first computing device 110, the intelligent control module of the first computing device 110 can execute the performance adjustment method provided in the embodiments of the present application.
[0080] It should be noted that in the embodiments of the present application, the process of live migration for different virtual machines is similar, and therefore, for ease of understanding, the following embodiments are described by taking a single virtual machine as an example.
[0081] Exemplarily, the first computing device 110 can be a server or a terminal device.
[0082] The server can be one physical or logical server, or two or more physical or logical servers sharing different responsibilities and cooperating with each other to realize the functions of the server.
[0083] Exemplarily, the server can be a blade server, a high-density server, a rack server or a tower server, an AI server, etc.
[0084] The terminal device can include an augmented reality (AR) device, a virtual reality (VR) device, a personal digital assistant (PDA), an ultra-mobile personal computer (UMPC), a tablet computer, a notebook computer, a netbook, a desktop computer, an all-in-one computer, etc.
[0085] It should be noted that the embodiments of the present application do not limit the device form of the computing device, and the above is only an exemplary description.
[0086] Exemplarily, the storage device included in the first computing device 110 can be a hard disk drive (HDD), a solid state disk (SSD), a redundant array of independent disks (RAID), or the like. Among them, the hard disk drive and the solid state disk can also be referred to as a disk.
[0087] It should be noted that the embodiments of the present application do not limit the device form of the storage device, and the above is only an exemplary description.
[0088] Figure 2 A structural schematic diagram of a computing device provided by an embodiment of the present application.
[0089] It should be noted that, Figure 2 The system architecture shown is only an exemplary description, and does not constitute a limitation on the system architecture of the computing device provided by the embodiments of the present application.
[0090] In the embodiments of the present application, the computing device can be a network device. The network device can include a server and the like. Among them, the server can be a physical server, or two or more physical servers sharing different responsibilities, and cooperating with each other to realize the functions of the server.
[0091] Exemplarily, the server can be a blade server, a high-density server, a rack server, or a tower server, etc. The terminal device can include a personal digital assistant (PDA), an ultra-mobile personal computer (UMPC), a notebook computer, a netbook, a desktop computer, an all-in-one computer, and the like.
[0092] Among them, the hardware part of the computing device includes a processor, a basic input output system (BIOS) chip, an out-of-band controller, and a memory, and the software part mainly includes BIOS, an out-of-band management module, and an operating system (OS), as Figure 2 shown.
[0093] The processor can include a central processing unit (CPU) including one or more CPU cores, and operations of processing data by the CPU are performed by the CPU cores. The more CPU cores included in the CPU, the faster the speed of processing data.
[0094] The BIOS chip is a chip disposed on the motherboard for initializing and detecting various hardware in the boot process of the computing device. The BIOS chip includes a flash memory area.
[0095] The out-of-band management module is located in the out-of-band controller, and the operating system is located in the processor.
[0096] The out-of-band management module can be a management unit of a non-service module. For example, the out-of-band management module can perform remote maintenance and management on the computing device through a dedicated data channel. The out-of-band management module is completely independent of the operating system of the computing device, and can communicate with the BIOS and the operating system through the out-of-band management interface of the computing device.
[0097] For example, the out-of-band management module can include a management unit of a running state of the computing device, a management system in the management chip, a baseboard management controller (BMC) of the computing device, a system management module (SMM), and the like. It should be noted that the specific form of the out-of-band management module is not limited in the embodiments of the present application, and the above is only an example.
[0098] The OS is a computer program for managing and controlling hardware and software resources of the computing device, and any other software must run under the support of the operating system. After the computing device is powered on, the BIOS first performs a series of operations such as self-checking and initialization, and then boots the OS for starting, so that the user can normally use the computing device.
[0099] The BIOS is a set of programs fixed to the BIOS chip on the motherboard in the computing device. The main function of the BIOS is to provide the computing device with the most basic and most direct hardware settings and controls.
[0100] The memory, also known as internal memory or main memory, is installed in the memory slot on the motherboard of the computing device.
[0101] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of system architecture and the appearance of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0102] For ease of understanding, the performance adjustment method of the virtual machine provided by the embodiments of the present application is exemplarily introduced below in combination with the above system architecture and the accompanying drawings.
[0103] Referring to Figure 3 The virtual machine live migration method provided by the embodiments of the present application can include the following steps:
[0104] S301: In the process of performing live migration of the virtual machine, an evaluation index item is obtained, and a first evaluation value is determined based on a first service bandwidth and the evaluation index item; the first service bandwidth represents a service bandwidth of the virtual machine in the case of migrating dirty page data using a first bandwidth; and the first bandwidth is a bandwidth at which the virtual machine meets a live migration convergence condition.
[0105] The virtual machine live migration method provided by the embodiments of the present application can be specifically applied to the second stage of memory pre-copying in the process of virtual machine live migration, that is, the stage of iterative dirty page synchronization. This stage is iteratively performed. Exemplarily, S301-S303 are executed in each round of memory pre-copying until a cutoff condition of memory pre-copying is met. Subsequently, the third stage, that is, the shutdown stage, is entered to complete copying of remaining dirty page data, copying of device states, and the like.
[0106] For ease of understanding, in the embodiments of the present application, only one round of memory pre-copying is taken as an example for detailed description.
[0107] In the embodiments of the present application, in the process of each round of memory pre-copying, the service performance of the virtual machine is predicted based on the first service bandwidth and the evaluation index item to obtain a first evaluation value, and the first evaluation value represents the service performance of the virtual machine in the case of migrating dirty page data using the first bandwidth.
[0108] The first bandwidth does not represent the real bandwidth of migrating dirty page data, but a bandwidth at which the virtual machine can meet the live migration convergence condition. Specifically, the dirty page data generation rate of the virtual machine in the live migration process is first monitored, and in order to meet the live migration condition, the migration of dirty page data needs to be performed using a bandwidth that is not less than the dirty page data generation rate.
[0109] Therefore, in the embodiments of the present application, the first bandwidth is set according to the dirty page data generation rate of the virtual machine, and needs to meet the live migration condition.
[0110] As a possible implementation manner of the embodiment of the present application, the first bandwidth is equal to the generation rate of the dirty page data; or, the first bandwidth is greater than the generation rate of the dirty page data, and the difference between the first bandwidth and the generation rate of the dirty page data is less than a preset threshold.
[0111] Specifically, the first bandwidth needs to be greater than or equal to the generation rate of the dirty page data, otherwise the dirty page data will be more and more, and the live migration convergence cannot be realized.
[0112] In addition, if the first bandwidth is much greater than the generation rate of the dirty page data, although the live migration convergence can be met, the migration bandwidth is occupied too much, the service bandwidth is compressed, and the service performance is compressed. Therefore, in the case that the first bandwidth is greater than the dirty page data, the difference between the first bandwidth and the generation rate of the dirty page data is set to be less than a preset threshold.
[0113] For example, the ratio between the first bandwidth and the generation rate of the dirty page data is between (1, 1.1).
[0114] The first bandwidth described above is not the real bandwidth used for migrating the dirty page data. When calculating the first evaluation value, the first service bandwidth represents the service bandwidth of the virtual machine in the case of migrating the dirty page data using the first bandwidth. Specifically, the bandwidth left after subtracting the first bandwidth from the total bandwidth measured is used as the first service bandwidth.
[0115] In the embodiment of the present application, the service bandwidth represents the bandwidth occupied by the virtual machine for running the service.
[0116] When calculating the first evaluation value, in addition to the service bandwidth index item, for each index item in other evaluation index items, the corresponding real value is used for evaluation.
[0117] In the embodiment of the present application, the evaluation index item can be set according to the demand. For example, at least one of the CPU usage rate of the service, the memory usage rate of the service, the storage IOPS (input / output operations per second) of the service, and the network IOPS of the service can be included.
[0118] Those skilled in the art can understand that the service of the virtual machine will occupy the resources corresponding to the index items in the running process, for example, the service bandwidth, the CPU usage rate, etc., and the value of the index item can represent the performance of the service running. For example, when the service runs well, it will occupy a larger service bandwidth, a larger CPU usage rate, etc. Conversely, it will occupy a smaller service bandwidth, a smaller CPU usage rate, etc. Therefore, the index item can be used to evaluate the service performance of the virtual machine.
[0119] It can be understood that the service bandwidth is also an index item for evaluating the service performance of the virtual machine. Since the service bandwidth is the index item focused in the embodiments of the present application, it is distinguished from other evaluation index items.
[0120] For the convenience of description, the target index item can be defined as an index item affecting the service performance of the virtual machine, and specifically includes the service bandwidth index item and the above evaluation index items.
[0121] In the evaluation of the first evaluation value of the virtual machine, in addition to the service bandwidth index item being calculated by using the virtual service bandwidth, for each of the evaluation index items, the corresponding real value is used for evaluation. The real value of each evaluation index item can be obtained by measurement.
[0122] Specifically, the memory pre-copy method for virtual machine live migration provided in the embodiments of the present application can be applied to a hyper-converged scenario, in which a hyper-converged software platform has integrated a related index collection function. For example, the hyper-converged software platform integrates libvirt (a kind of virtualization management software), which directly provides a function of monitoring various index items of the virtual machine. Alternatively, related vmtools (virtual machine tools) can be installed to obtain detailed virtual machine monitoring index information.
[0123] The above is only an example description, and the embodiments of the present application do not limit the way of obtaining the real value of each index item.
[0124] S302: determining a second evaluation value based on the second service bandwidth and the evaluation index items; the second service bandwidth is the actual service bandwidth of the virtual machine in the live migration process.
[0125] In addition, in the process of each round of memory pre-copy in the embodiments of the present application, the actual service performance of the virtual machine in the live migration process is evaluated according to the real value corresponding to each evaluation index item in the evaluation index items of the virtual machine and the actual service bandwidth of the virtual machine in the live migration process, and is represented by the second evaluation value.
[0126] In the evaluation of the actual service performance of the virtual machine, the real values of the above various target index items are used for evaluation. The real values of the various target index items can be obtained by measurement.
[0127] It should be noted that the determination of the second evaluation value and the determination of the first evaluation value can be periodic, and therefore the values of the above various index items can also be collected periodically.
[0128] S303: adjusting the performance parameter of the virtual machine based on the first evaluation value and the second evaluation value.
[0129] In the embodiments of the present application, the first evaluation value can be understood as a critical value that can guarantee the service performance of the virtual machine in the process of live migration to converge.
[0130] Therefore, in order to maintain the balance between the convergence of live migration and the service performance of the virtual machine, the service performance of the virtual machine is adjusted to target the real second evaluation value to the first evaluation value.
[0131] As described above, the virtual machine live migration method provided by the embodiments of the present application can be applied to the second stage of memory pre-copy in the process of virtual machine live migration, that is, the stage of iterative dirty page synchronization. This stage is iteratively performed, so in the process of each round of memory pre-copy, it can be judged whether the memory pre-copy cutoff condition is reached, and if the condition is not reached, the performance parameter of the virtual machine is adjusted based on the first evaluation value and the second evaluation value.
[0132] Specifically, in the process of each round of memory pre-copy of the virtual machine performing live migration, under the condition that the memory pre-copy cutoff condition is not reached, the performance parameter of the virtual machine is adjusted to target the second evaluation value to the first evaluation value, and the next round of memory pre-copy is entered, until the memory pre-copy cutoff condition is reached.
[0133] As can be seen, in the embodiments of the present application, in view of the deficiencies of the existing live migration performance regulation technology in precision, adaptability and virtual machine performance protection, an intelligent, efficient and adaptive memory pre-copy method for live migration is constructed. In the process of each round of live migration, the performance parameter of the virtual machine is adjusted to target the critical condition of the virtual machine meeting the migration convergence, which can accurately balance the relationship between migration convergence and virtual machine service performance, and realize the optimization and fine management of the live migration process.
[0134] In the embodiments of the present application, the performance parameter is used to represent the parameter that can affect the service performance.
[0135] For example, the performance parameter can include the CPU frequency of the virtual machine, the queue depth of storage I / O, and can also include the CPU frequency reduction degree. Among them, increasing the CPU frequency of the virtual machine and the queue depth of storage I / O can indirectly improve the service performance of the virtual machine. Increasing the CPU frequency reduction degree will indirectly reduce the service performance of the virtual machine.
[0136] As a possible implementation manner of the embodiments of the present application, in the case that the first evaluation value is higher than the second evaluation value, the current real migration bandwidth is greater than the dirty page data generation rate, that is, it can meet the migration convergence, in order to balance the migration convergence and the service performance of the virtual machine, the performance parameter is adjusted in the direction of improving the service performance of the virtual machine. For example, increasing the CPU frequency, or reducing the CPU frequency reduction degree, etc.
[0137] In a case where the first evaluation value is lower than the second evaluation value, the current real migration bandwidth is less than the dirty page data generation rate, migration convergence cannot be met, and the service performance of the virtual machine needs to be limited to suppress the dirty page data generation rate. Thus, the performance parameter is adjusted in a direction of reducing the service performance of the virtual machine.
[0138] It can be seen that, in the embodiment of the application, the service performance of the virtual machine is indirectly adjusted by adjusting the performance parameter. In a case where the first evaluation value is higher than the second evaluation value, migration convergence can be met at present, and the performance parameter can be adjusted in a direction of appropriately increasing the service performance of the virtual machine. In a case where the first evaluation value is lower than the second evaluation value, migration convergence cannot be met at present, and the performance parameter can be adjusted in a direction of appropriately reducing the service performance of the virtual machine. Thus, migration convergence and the service performance of the virtual machine are balanced, and the service performance of the virtual machine is maintained as good as possible on the premise of meeting migration convergence.
[0139] In the embodiment of the application, the process of determining the first evaluation value and the second evaluation value can refer to the characteristic value corresponding to each target indicator item. The target indicator item includes a service bandwidth indicator item and an evaluation indicator item. The characteristic value represents the service performance under the evaluation indicator item in a case where no hot migration is performed.
[0140] Specifically, different virtual machines can be used to run different service applications and bear different service functions, and thus there are differences in the occupancy of different target indicator items in the process of running services. For example, a DB (database) service virtual machine can exhibit high storage io and low cpu usage. A virtual machine bearing a network service can exhibit high network io and low storage and cpu usage.
[0141] Therefore, in the embodiment of the application, the service performance of the virtual machine is evaluated by comprehensively considering each target indicator item of the virtual machine. For a single target indicator item, the characteristic value corresponding to the target indicator item is considered.
[0142] The characteristic value corresponding to each target indicator item can be determined in advance.
[0143] As a possible implementation manner of the embodiment of the application, the historical values of the virtual machine to each target indicator item in the process of running services in a historical period are collected in advance, and the corresponding characteristic value is determined based on the historical values.
[0144] For example, for the indicator item of the memory usage rate of the service, the average value of the indicator item in a specific period of the historical period is calculated as the corresponding characteristic value.
[0145] In the embodiments of the present application, when evaluating each target index item, the current value and the characteristic value of the target index item are calculated. For example, the ratio of the current value to the characteristic value is calculated, and the evaluation score of the target index item is obtained based on the ratio.
[0146] It can be seen that, in the embodiments of the present application, considering that different virtual machines can be used to run different types of services, and there are differences in the occupancy of different target index items in the process of running a specific service, when evaluating the service performance of a virtual machine, not only the current value of each target index item is considered, but also the corresponding characteristic value. Therefore, the calculated service performance can better reflect the advantages and disadvantages of the virtual machine running a specific service in combination with the service characteristics of the virtual machine.
[0147] Referring to Figure 4 In the embodiments of the present application, the first evaluation value is determined based on the first service bandwidth and the evaluation index item, which can specifically include the following steps:
[0148] S401: Determine the characteristic value corresponding to each target index item; wherein the target index item includes a service bandwidth index item and an evaluation index item.
[0149] In the embodiments of the present application, the characteristic value corresponding to each target index item can be determined in advance, which can be determined according to the occupancy of the resources corresponding to each target index item when the virtual machine runs the service in the historical period.
[0150] S402: Determine the first score corresponding to each target index item based on the target index item and the characteristic value corresponding to each target index item; the characteristic value represents the service performance of the target index item under the condition that no hot migration is performed; wherein the first score corresponding to the service bandwidth index item is determined based on the first service bandwidth and the characteristic value corresponding to the service bandwidth index item.
[0151] In the embodiments of the present application, for the service bandwidth index item, the first score corresponding thereto is calculated based on the first service bandwidth and the characteristic value corresponding to the service bandwidth index item. The first service bandwidth represents the service bandwidth of the virtual machine under the condition that the dirty page data is migrated using the first bandwidth.
[0152] Specifically, during the running of the virtual machine, on the basis of the data bandwidth, the bandwidth used for migrating the dirty page data is removed, and the remaining bandwidth is used for running the service, which can be regarded as the service bandwidth.
[0153] As described above, the first bandwidth is not the bandwidth currently actually used for migrating the dirty page data, but is the bandwidth determined based on the generation rate of the dirty page data and capable of meeting the convergence of the hot migration, which is related to the generation rate of the dirty page data.
[0154] Therefore, on the basis of the data bandwidth, the bandwidth remaining after removing the first wideband is regarded as the service bandwidth of the virtual machine in the case of migrating dirty page data using the first bandwidth. It can be seen that the second service bandwidth is not the current real service bandwidth.
[0155] For example, when the first bandwidth occupation is equal to the generation rate of dirty page data, the first service bandwidth = total data bandwidth of the virtual machine - generation rate of dirty page data.
[0156] As described above, when evaluating each evaluation index item, the current value and the corresponding characteristic value of the evaluation index item are considered. In particular, for the service bandwidth index item, the current value used is not the real service bandwidth occupation value of the virtual machine, but the first service bandwidth. For example, the ratio of the first service bandwidth to the characteristic value corresponding to the service bandwidth index item is calculated, and the evaluation score of the service bandwidth index item is obtained based on the ratio.
[0157] For other index items except the service bandwidth index item, the corresponding evaluation score can be calculated based on the ratio of the real value to the characteristic value.
[0158] S403: The first scores corresponding to each target index item are weighted based on the weights corresponding to each target index item to obtain a first evaluation value.
[0159] In the embodiments of the present application, in order to further distinguish the importance of different target index items in the process of evaluating the service performance of the virtual machine, the weights corresponding to each target index item can be determined.
[0160] It can be seen that in the embodiments of the present application, when predicting the first evaluation value, the characteristic values of the target index items are considered, so that the scores of the target index items can be calculated more accurately in combination with the service characteristics of the virtual machine. For the service bandwidth index item, the first service bandwidth is determined, which represents the service bandwidth of the virtual machine in the case of migrating dirty page data using the first bandwidth. The first service bandwidth and the corresponding characteristic value are used to calculate the score of the service bandwidth index item. The score of the service bandwidth index item under the critical condition of meeting migration convergence can be calculated, and then the predicted value of the service performance of the virtual machine under the critical condition of meeting migration convergence is predicted in combination with the real scores of other evaluation index items, thereby providing an accurate reference for subsequent adjustment of the service performance of the virtual machine.
[0161] As a possible implementation manner of the embodiments of the present application, the weights corresponding to each target index item can be determined based on the characteristic values of the target index items.
[0162] Specifically, the characteristic value can represent the average performance of each target index item when the virtual machine runs a specific service for a long time, and therefore the size of the characteristic value can represent the occupation of different index items when the virtual machine runs a specific service.
[0163] The more a certain target indicator item occupies, the more important the target indicator item is to the business operation, and thus a greater weight can be set for the target indicator item when evaluating the business performance.
[0164] Since the target indicator items belong to different dimensions, it is impossible to directly compare the size relationship. Therefore, in the embodiments of the present application, in order to measure the size relationship of the feature values corresponding to the target indicator items and further evaluate the occupation of the virtual machine to different indicator items when running a specific business, the feature values of the target indicator items are normalized.
[0165] For example, for each target indicator item, a maximum value and a minimum value can be set in advance. According to the maximum value and the minimum value of each target indicator item, the current value of each target indicator item can be normalized to obtain an interval value, such as a value in the interval [0, 1].
[0166] In the embodiments of the present application, the maximum value and the minimum value can be set in various ways. For example, for a single target indicator item, the range of the target indicator item when the virtual machine runs the business in a period of time is counted, and then the maximum value and the minimum value are determined. Alternatively, the maximum value or the minimum value that each target indicator item can reach is evaluated by the technical personnel according to the actual operation of the business.
[0167] In the embodiments of the present application, the weight corresponding to each target indicator item can be calculated based on the normalized feature value.
[0168] For example, the normalized feature values of the target indicator items are summed to obtain a total feature value, and then the ratio of the normalized feature value of each target indicator item to the total feature value is calculated to obtain the weight corresponding to each target indicator item.
[0169] It can be seen that after the feature values corresponding to the target indicator items are normalized, the importance of different target indicator items when the virtual machine runs a specific business can be accurately measured, and then the corresponding weight is determined based on the importance. The evaluation value of the business performance obtained by weighting the scores of the target indicator items according to the weight can more accurately reflect the advantages and disadvantages of the virtual machine running the specific business.
[0170] Referring to Figure 5 In the embodiments of the present application, the second evaluation value is determined based on the second business bandwidth and the evaluation indicator item, which can include the following steps:
[0171] S501: Determine the feature value corresponding to each target indicator item; wherein the target indicator item includes a business bandwidth indicator item and an evaluation indicator item.
[0172] S502: Determine the second score corresponding to each target index item based on the target index item and the feature value corresponding to each target index item; the feature value represents the service performance of the target index item under the condition that no hot migration is performed; wherein the second score corresponding to the service bandwidth index item is determined based on the second service bandwidth and the feature value corresponding to the service bandwidth index item.
[0173] For other evaluation index items except the service bandwidth index item, the corresponding second score is also determined based on the actual index value in the hot migration process and the corresponding feature value. That is, for other evaluation index items except the service bandwidth index item, the second score is the same as the first score described above. Details are not described here.
[0174] For the service bandwidth index item, the second score represents the real score of the service bandwidth index item in the hot migration process.
[0175] Specifically, during the running of the virtual machine, on the basis of the data bandwidth, the bandwidth used for migrating dirty page data is removed, and the remaining bandwidth is used for running services, which can be regarded as service bandwidth.
[0176] For example, the actual bandwidth occupancy of the service = total data bandwidth of the virtual machine - bandwidth actually used for dirty page data migration.
[0177] In the embodiment of the application, the second score corresponding to the service bandwidth is calculated according to the actual bandwidth occupancy of the service and the feature value corresponding to the service bandwidth. The specific calculation process has been described above, and details are not described here.
[0178] S503: Weight the second scores corresponding to each target index item based on the weights corresponding to each target index item to obtain a second evaluation value.
[0179] The weights corresponding to each target index item are introduced above. The second scores of each target index item are weighted according to the weights, and the second evaluation value can be obtained.
[0180] It can be seen that in the embodiment of the application, when determining the second evaluation value, the feature values of each target index item are considered, so that the scores of each target index item can be calculated more accurately in combination with the service characteristics of the virtual machine. For the service bandwidth index item, the real service bandwidth obtained by removing the real migration bandwidth is determined, and then the score of the service bandwidth is calculated based on the real service bandwidth and the corresponding feature value. The real service performance score when the virtual machine runs services can be accurately evaluated.
[0181] In the embodiments of the present application, the feature value corresponding to each target indicator item can be determined based on the following manner: for each target indicator item, based on the reference feature values of the plurality of candidate time points determined in advance, a reference feature value matching the current time point is determined as the feature value corresponding to the target indicator item; wherein the reference feature value of the candidate time point is calculated based on the indicators of the business operated by the virtual machine at a plurality of time points in the historical period.
[0182] Even if the virtual machine continuously carries the same business, there can be a large difference in the occupancy of each target indicator item in different time periods. For example, in a one-day cycle, when the virtual machine operates the business in the daytime, a larger proportion of each indicator item needs to be occupied to maintain a good running condition due to the larger amount of business. When the virtual machine operates the business at night, a smaller proportion of each indicator item can be occupied to maintain a good running condition due to the smaller amount of business.
[0183] Therefore, when determining the feature values of each indicator item, the reference feature values of the plurality of candidate time points can be calculated in combination with the time point factor.
[0184] For example, in a one-day cycle, the candidate time points are set to the whole hours of each day, and then the reference feature values corresponding to each whole hour are calculated.
[0185] As a possible implementation manner of the embodiments of the present application, the reference feature values of each candidate time point are obtained by weighted calculation based on the indicators of the business operated by the virtual machine at a plurality of time points in the historical period.
[0186] Specifically, a higher weight can be given to the historical time points close to the candidate time points, and the reference feature value of the candidate time point is obtained by weighted operation on the average feature values corresponding to the plurality of historical time points.
[0187] For example, if the virtual machine i is in the first time T (including n sequentially ordered time points), for the target indicator item j, at the time point t k The recorded indicator value is P ij (t k ).
[0188] The time weight function
[0189] wherein t max represents the latest time point of the n sequentially ordered time points, and a represents a decay coefficient for controlling the speed of weight decay over time. The larger the a, the higher the weight of recent data and the greater the influence on the feature value.
[0190] For each candidate time point, the feature values corresponding to the plurality of historical time points before the candidate time point can be weighted and calculated based on the above manner to obtain the reference feature value of the candidate time point. It can be seen that different weights are given to different time points when calculating the reference feature value of the candidate time point, and the weight of recent data is higher, which can better reflect the current running situation of the virtual machine.
[0191] For example, during the live migration process, if the current time is 11:45, the feature value matching the current time needs to be determined. Since 12:00 is the closest to the current time among the candidate time points, the reference feature value corresponding to the candidate time point 12:00 is determined as the feature value matching the current time.
[0192] It can be seen that in the embodiments of the present application, for each target index item, the reference feature values of different candidate time points can be calculated according to the real values of the target index items of the virtual machine during the running of the business at the plurality of historical time points in the historical period. When calculating the reference feature value, higher weight is given to the data of the recent time point, so that the target index items of the virtual machine at the candidate time point can be better reflected. During the live migration process, the time-related feature value is considered when calculating the score of each target index item, so that the difference in load performance of the virtual machine carrying the same business at different time periods is fully considered, and more accurate performance regulation is achieved.
[0193] As a possible implementation manner of the embodiments of the present application, the performance parameters of the virtual machine are adjusted based on the first evaluation value and the second evaluation value, which can specifically include: determining the adjustment degree of the performance parameters based on the difference between the second evaluation value and the first evaluation value; wherein the adjustment degree is positively correlated with the difference. The performance parameters of the virtual machine are adjusted based on the adjustment degree.
[0194] Specifically, in the embodiments of the present application, the second evaluation value for representing the real running situation of the business performance of the virtual machine can be calculated, and the second evaluation value for representing the predicted running situation of the business performance of the virtual machine in the critical state meeting the live migration condition can also be predicted. In order to more accurately balance the business performance and the convergence of live migration, the adjustment degree of the performance parameters can be determined according to the difference between the second evaluation value and the first evaluation value.
[0195] Wherein, the greater the difference, the greater the degree of adjustment required, then the performance parameters such as the frequency of the CPU, the queue depth of the storage I / O, the frequency reduction degree of the CPU, etc. can be adjusted at a larger amplitude, so that the first evaluation value tends to approach the second evaluation value at a faster speed; correspondingly, the smaller the difference, the smaller the degree of adjustment required, then the performance parameters can be adjusted at a smaller amplitude.
[0196] It can be seen that, in the embodiment of the application, the adjustment degree of the performance parameter is determined based on the difference between the second evaluation value and the first evaluation value. Blind adjustment is effectively avoided to cause excessive compression of the service performance, and it is ensured that the migration task is smoothly promoted in a complex environment. When the first evaluation value is much smaller than the second evaluation value, the virtual machine service performance can be quickly recovered, system resource waste is avoided, the service response speed and processing capacity are improved, and the user experience is improved.
[0197] As a possible implementation manner of the embodiment of the application, before adjusting the service performance of the virtual machine, the method can further include:
[0198] Based on the current real data migration bandwidth and the generation rate of the dirty page data, it is determined whether the performance regulation condition is met. If the performance regulation condition is met, the step of adjusting the performance parameter of the virtual machine is performed.
[0199] When the generation rate of the dirty page data is less than the real data migration bandwidth, and the difference value ratio of the generation rate of the dirty page data and the real data migration bandwidth is less than a preset threshold, the performance regulation condition is not met.
[0200] When the generation rate of the dirty page data is less than the real data migration bandwidth, and the difference value ratio of the generation rate of the dirty page data and the real data migration bandwidth is greater than the preset threshold, or the generation rate of the dirty page data is greater than the real data migration bandwidth, the performance regulation condition is met.
[0201] Specifically, in order to reduce the regulation times as much as possible, in each round of live migration process, the step of adjusting the service performance of the virtual machine can be performed only when it is confirmed that performance regulation is needed.
[0202] Since ensuring live migration convergence is the primary task in the live migration process, in the case where the generation rate of the dirty page data is greater than the real data migration bandwidth, since the live migration convergence cannot be met, performance adjustment is needed, that is, the performance regulation condition is met.
[0203] For the case where the generation rate of the dirty page data is less than the real data migration bandwidth, the live migration convergence can be met. However, if the generation rate of the dirty page data is much smaller than the real data migration bandwidth, the service bandwidth will be excessively compressed, and then the service performance will be excessively compressed. Therefore, in the case where the generation rate of the dirty page data is less than the real data migration bandwidth, and the difference value ratio of the generation rate of the dirty page data and the real data migration bandwidth is greater than the preset threshold, the step of adjusting the service performance of the virtual machine is performed.
[0204] It can be seen that in the embodiments of the present application, the primary goal is to ensure the convergence of live migration. When the convergence of live migration cannot be ensured, the performance regulation step is performed. When the convergence of live migration can be ensured, if the service performance of the virtual machine is not excessively compressed at present, the step of adjusting the service performance of the virtual machine can not be performed. The number of regulation can be reduced, and the system stability can be improved.
[0205] For the convenience of understanding, the virtual machine live migration method provided by the embodiments of the present application is further introduced below in combination with the drawings.
[0206] Referring to Figure 6 , the live migration process of the virtual machine includes the following steps:
[0207] S601: Start the live migration pre-copy process.
[0208] After the host configuration state synchronization is completed, the process of memory pre-copying is entered.
[0209] S602: The source host suspends the write operation of the virtual machine.
[0210] S603: Obtain an initial snapshot of the virtual machine memory data.
[0211] S604: Copy the initial snapshot of the memory data to the target host.
[0212] In the memory pre-copying stage, the initial full copy is first performed, that is, the source host first completely copies all memory pages of the virtual machine to the target host, the write operation of the virtual machine needs to be suspended, then the initial snapshot of the virtual machine memory data is obtained, and then the snapshot data is copied to the target host.
[0213] S605: Restore the write operation of the virtual machine on the source host.
[0214] After the initial full copy is completed, the write operation of the virtual machine on the source host can be restored.
[0215] S606: Check whether the migration cutoff condition is met, if yes, perform S612; if no, perform S607.
[0216] After the initial full copy, the stage of iterative dirty page synchronization is entered.
[0217] In this stage, the migration system iterates multiple times, and only the dirty page data modified after the last round of copying is transmitted each time. After each iteration, it is checked whether the migration cutoff condition is met, if yes, the pre-copying is ended and the subsequent migration stage is entered.
[0218] If no, the next round of iteration is performed, that is, S607-S610 are performed.
[0219] S607: Obtain a new changed data block of the virtual machine memory.
[0220] S608: copying the new changed data block to the target host.
[0221] S609: obtaining a current service performance score and a predicted service performance score meeting the migration convergence condition.
[0222] In each iteration process, the new changed data block, i.e., the dirty page data, of the virtual machine memory is obtained, and the new changed data block is copied to the target host, i.e., the migration dirty page data. In the migration process, the service performance score (i.e., the second evaluation value) is obtained, and the predicted service performance score meeting the migration convergence condition (i.e., the first evaluation value) is obtained.
[0223] S610: determining whether performance regulation is needed, if yes, performing S611; if no, performing S606.
[0224] According to the performance regulation condition, it is determined whether performance regulation is needed, if yes, the service performance is regulated. If no, the next iteration is entered, i.e., S606 is re-executed.
[0225] S611: regulating the service performance.
[0226] In the case that the first evaluation value is higher than the second evaluation value, the performance parameter is adjusted in the direction of improving the service performance of the virtual machine; in the case that the first evaluation value is lower than the second evaluation value, the performance parameter is adjusted in the direction of reducing the service performance of the virtual machine, so that the second evaluation value tends to the first evaluation value.
[0227] S612: ending the pre-copying and entering a subsequent migration stage.
[0228] It can be seen that in the embodiment of the present application, in the process of each round of live migration, the service performance of the virtual machine is adjusted with the critical condition of the virtual machine meeting the migration convergence as the target, the relationship between the migration convergence and the service performance of the virtual machine is accurately balanced, and the optimization and fine management of the live migration process are realized.
[0229] The above mainly introduces the scheme provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, the virtual machine live migration device includes the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present text can be realized in the form of hardware or the combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. The professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0230] The embodiment of the present application can divide the function modules of the virtual machine live migration device according to the above method. For example, the virtual machine live migration device can include various function modules corresponding to various function divisions, or two or more functions can be integrated in one processing module. The above integrated module can be realized in the form of hardware or in the form of a software function module. It should be noted that the division of the modules in the embodiment of the present application is illustrative, and is only a logical function division. In actual implementation, another division mode can be used.
[0231] For example, Figure 7 A possible schematic diagram of the virtual machine live migration device involved in the above embodiment is shown. The virtual machine live migration device 700 can include a first determination module 701 configured to acquire an evaluation index item in the process of executing live migration of a virtual machine, and determine a first evaluation value based on a first service bandwidth and the evaluation index item. The first service bandwidth represents a service bandwidth of the virtual machine in the case of migrating dirty page data using a first bandwidth. The first bandwidth is a bandwidth at which the virtual machine satisfies a live migration convergence condition. A second determination module 702 is configured to determine a second evaluation value based on a second service bandwidth and the evaluation index item. The second service bandwidth is an actual service bandwidth of the virtual machine in the process of live migration. An adjustment module 703 is configured to adjust a performance parameter of the virtual machine based on the first evaluation value and the second evaluation value.
[0232] It can be seen that, in the embodiment of the present application, in view of the deficiencies of the existing live migration performance regulation technology in terms of precision, adaptability and virtual machine performance protection, an intelligent, efficient and self-adaptive memory pre-copy method for virtual machine live migration is constructed. In the process of each round of live migration, the service performance of the virtual machine is adjusted with the critical condition of satisfying the migration convergence of the virtual machine as the target, so as to accurately balance the relationship between the migration convergence and the service performance of the virtual machine, and realize the optimization and fine management of the live migration process.
[0233] Optionally, the first bandwidth is equal to the generation rate of the dirty page data, or the first bandwidth is greater than the generation rate of the dirty page data, and the difference between the first bandwidth and the generation rate of the dirty page data is less than a preset threshold.
[0234] It can be seen that, based on the determination of the corresponding first bandwidth according to the live migration condition, the migration of the dirty page data using the first bandwidth can satisfy the live migration condition, and then the predicted score of the service performance of the virtual machine satisfying the live migration convergence is determined, which is used to accurately balance the relationship between the migration convergence and the service performance of the virtual machine. Under the premise of satisfying the migration convergence, the service performance of the virtual machine is maintained as good as possible.
[0235] Optionally, the first determination module 701 is specifically configured to:
[0236] Determine the characteristic value corresponding to each target indicator item; wherein the target indicator item includes a service bandwidth indicator item and an evaluation indicator item;
[0237] Determining a first score corresponding to each target indicator item based on the target indicator item and the characteristic value corresponding to each target indicator item; wherein the target indicator item includes a service bandwidth indicator item and an evaluation indicator item; the characteristic value represents the service performance under the target indicator item when hot migration is not performed; wherein the first score corresponding to the service bandwidth indicator item is determined based on the first service bandwidth and the characteristic value corresponding to the service bandwidth indicator item;
[0238] Based on the weight corresponding to each target indicator item, the first score corresponding to each target indicator item is weighted to obtain a first evaluation value.
[0239] As can be seen, in the embodiments of the present application, considering that different virtual machines may be used to run different types of services, and that the occupancy of different evaluation indicators varies during the operation of specific services, when evaluating the service performance of a virtual machine, not only the current value of each evaluation indicator is considered, but also the corresponding characteristic value. This allows the calculated service performance to better reflect the quality of the virtual machine's operation of a specific service, taking into account the service characteristics of the virtual machine.
[0240] When predicting the first evaluation value, the characteristic values of each target indicator item are taken into account, so that the score of each target indicator item can be more accurately calculated in combination with the business characteristics of the virtual machine. For the business bandwidth indicator item, the first business bandwidth is determined. The first business bandwidth represents the business bandwidth of the virtual machine when the dirty page data is migrated using the first bandwidth. The first business bandwidth and the corresponding characteristic value are used to calculate the score of the business bandwidth indicator item. The score of the business bandwidth indicator item can be calculated under the critical conditions of meeting the migration convergence, and then combined with the actual scores of other evaluation indicators, the predicted value of the business performance of the virtual machine under the critical conditions of meeting the migration convergence is predicted, providing an accurate reference for the subsequent adjustment of the business performance of the virtual machine.
[0241] Optionally, the second determining module 702 is specifically configured to:
[0242] Determine the characteristic value corresponding to each target indicator item; wherein the target indicator item includes a service bandwidth indicator item and an evaluation indicator item;
[0243] Determine a second score corresponding to each target indicator item based on the target indicator item and the characteristic value corresponding to each target indicator item; the characteristic value represents the service performance under the target indicator item when hot migration is not performed; wherein the second score corresponding to the service bandwidth indicator item is determined based on the second service bandwidth and the characteristic value corresponding to the service bandwidth indicator item;
[0244] The second evaluation value is obtained by weighting the second scores corresponding to the target index items based on the weights corresponding to the target index items.
[0245] It can be seen that in the embodiments of the present application, when the second evaluation value is determined, the characteristic values of the target index items are considered, so that the scores of the target index items can be more accurately calculated in combination with the business characteristics of the virtual machine. For the business bandwidth index item, the real business bandwidth obtained by removing the real migration bandwidth is determined, and then the score of the business bandwidth is calculated based on the real business bandwidth and the corresponding characteristic value. The real business performance score when the virtual machine runs the business can be accurately evaluated.
[0246] Optionally, the apparatus further comprises a normalization module configured to:
[0247] normalize the characteristic value corresponding to each target index item;
[0248] calculate the weight corresponding to each target index item based on the normalized characteristic value.
[0249] It can be seen that after the characteristic values corresponding to the target index items are normalized, the importance of different target index items when the virtual machine runs a specific business can be accurately measured, and then the corresponding weight is determined based on the importance. The evaluation value of the business performance obtained by weighting the scores of the target index items based on the weight can more accurately reflect the advantages and disadvantages of the virtual machine running the specific business.
[0250] Optionally, the first determination module 701 comprises a determination sub-module, specifically configured to:
[0251] The characteristic value corresponding to each target index item is determined, comprising: for each target index item, determining the reference characteristic value matched with the current time point as the characteristic value corresponding to the target index item based on the reference characteristic values of the plurality of candidate time points determined in advance; wherein the reference characteristic values of the candidate time points are calculated by weighting the indexes of the virtual machine running the business at a plurality of time points in a historical period.
[0252] It can be seen that in the embodiments of the present application, for each target index item, the reference characteristic values of different candidate time points can be calculated according to the real values of the target index items when the virtual machine runs the business at a plurality of historical time points in a historical period. When calculating the reference characteristic values, higher weight is given to the data of the recent time points, so that the target index items of the virtual machine at the candidate time points can be more accurately reflected. In the live migration process, when the scores of the target index items are calculated, the time-related characteristic values are considered, so that the differences in load performance of the virtual machine carrying the same business at different time periods are fully considered, and more accurate performance regulation is achieved.
[0253] Optionally, the adjustment module 703 is specifically configured to:
[0254] based on the difference between the second evaluation value and the first evaluation value, adjusting the performance parameter of the virtual machine; in the case that the first evaluation value is higher than the second evaluation value, adjusting the performance parameter in the direction of improving the service performance of the virtual machine; in the case that the first evaluation value is lower than the second evaluation value, adjusting the performance parameter in the direction of reducing the service performance of the virtual machine.
[0255] It can be seen that, in the embodiments of the present application, the service performance of the virtual machine is indirectly adjusted by adjusting the performance parameter. In the case that the first evaluation value is higher than the second evaluation value, the migration convergence can be currently met, and the performance parameter can be adjusted in the direction of improving the service performance of the virtual machine. In the case that the first evaluation value is lower than the second evaluation value, the migration convergence cannot be currently met, and the performance parameter can be adjusted in the direction of reducing the service performance of the virtual machine. Thus, the migration convergence and the service performance of the virtual machine are balanced, and the service performance of the virtual machine is maintained as good as possible on the premise of meeting the migration convergence.
[0256] Optionally, the adjusting module 703 is specifically configured to:
[0257] based on the difference between the second evaluation value and the first evaluation value, determining the adjustment degree of the performance parameter; wherein the adjustment degree is positively correlated with the difference;
[0258] based on the adjustment degree, adjusting the performance parameter of the virtual machine.
[0259] It can be seen that, in the embodiments of the present application, the adjustment degree of the performance parameter is determined based on the difference between the second evaluation value and the first evaluation value. Blind adjustment is effectively avoided to prevent the service performance from being excessively compressed, and to ensure that the migration task is smoothly pushed forward in a complex environment. When the first evaluation value is much smaller than the second evaluation value, the service performance of the virtual machine can be quickly recovered, system resource waste is avoided, the business response speed and processing capacity are improved, and the user's use experience is improved.
[0260] Optionally, the device further includes a judging module, which is specifically configured to:
[0261] based on the current real data migration bandwidth and the generation rate of dirty page data, judging whether the performance control condition is met, and triggering the adjusting module if the performance control condition is met;
[0262] wherein, when the generation rate of dirty page data is less than the real data migration bandwidth, and the difference value ratio of the generation rate of dirty page data and the real data migration bandwidth is less than a preset threshold, the performance control condition is not met;
[0263] when the generation rate of dirty page data is less than the real data migration bandwidth, and the difference value ratio of the generation rate of dirty page data and the real data migration bandwidth is greater than the preset threshold, or the generation rate of dirty page data is greater than the real data migration bandwidth, the performance control condition is met.
[0264] It can be seen that in the embodiments of the present application, the primary goal is to ensure the convergence of the hot migration. When the convergence of the hot migration cannot be ensured, the performance regulation step is performed. When the convergence of the hot migration can be ensured, if the service performance of the virtual machine is not excessively compressed at present, the step of adjusting the service performance of the virtual machine can not be performed. The regulation frequency can be reduced, and the system stability can be improved.
[0265] Optionally, the evaluation index item includes at least one of the following:
[0266] The at least one of the following: the CPU usage rate of the service, the memory usage rate of the service, the storage IOPS (Input / Output Operations Per Second) of the service, and the network IOPS of the service.
[0267] It can be seen that the embodiments of the present application involve multiple aspects of index items, and the service performance of the virtual machine can be comprehensively and comprehensively evaluated.
[0268] The embodiments of the present application also provide a computing device, including a controller and a memory; the controller is coupled with the memory; the memory is used for computer program instructions; and the controller is used to call the computer program instructions in the memory to execute any one of the methods in the above embodiments.
[0269] The embodiments of the present application also provide a computer readable storage medium, which stores computer execution instructions. When the computer execution instructions run on the computing device, the computing device executes any one of the methods in the above embodiments.
[0270] The above description of the related content in any one of the computer readable storage media provided above and the beneficial effects can be referred to the corresponding embodiments above, and will not be repeated here.
[0271] The embodiments of the present application also provide a computer program product containing instructions. When the instructions run on the computing device, the computing device executes any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, all or part of the processes or functions according to the embodiments of the present application are generated. It should be noted that the above devices for storing computer instructions or computer programs provided by the embodiments of the present application, such as but not limited to, the above memory, computer readable storage medium and communication chip, etc., all have non-volatility (non-transitory).
[0272] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus.
[0273] The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or data storage device such as one or more servers, data centers, etc. integrated with one or more media. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, DVD), or semiconductor media (for example, solid state disk (SSD)) and the like.
[0274] Although the present application is described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of the application. Accordingly, the specification and drawings are to be regarded simply as illustrative of the present application as defined by the appended claims, and it is intended to cover any and all modifications, variations, combinations or equivalents that fall within the scope of the present application. Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for hot migration of a virtual machine, characterized in that: At least one service is running on the virtual machine, and the method includes: During the hot migration of the virtual machine, evaluation index items are obtained; Determining a first evaluation value based on a first service bandwidth and the evaluation index item; the first service bandwidth represents the service bandwidth of the virtual machine when the dirty page data is migrated using the first bandwidth; the first bandwidth is the bandwidth of the virtual machine that meets the hot migration convergence condition; Determining a second evaluation value based on a second service bandwidth and the evaluation index item, where the second service bandwidth is the actual service bandwidth of the virtual machine during the hot migration process; Based on the first evaluation value and the second evaluation value, a performance parameter of the virtual machine is adjusted.
2. The virtual machine live migration method according to claim 1, wherein: The thermal migration convergence conditions include: The first bandwidth is equal to the generation rate of the dirty page data; Alternatively, the first bandwidth is greater than a generation rate of the dirty page data, and a difference between the first bandwidth and the generation rate of the dirty page data is less than a preset threshold.
3. The virtual machine live migration method according to claim 1, wherein: The determining the first evaluation value based on the first service bandwidth and the evaluation index item includes: Determine a characteristic value corresponding to each target index item; wherein the target index item includes a service bandwidth index item and the evaluation index item; Determine a first score corresponding to each target indicator item based on the target indicator item and the characteristic value corresponding to each target indicator item; the characteristic value represents the service performance under the target indicator item when the hot migration is not performed; wherein the first score corresponding to the service bandwidth indicator item is determined based on the first service bandwidth and the characteristic value corresponding to the service bandwidth indicator item; Based on the weight corresponding to each of the target indicator items, the first scores corresponding to each of the target indicator items are weighted to obtain the first evaluation value.
4. The virtual machine live migration method according to claim 1, wherein: The determining the second evaluation value based on the second service bandwidth and the evaluation index item includes: Determine a characteristic value corresponding to each target index item; wherein the target index item includes a service bandwidth index item and the evaluation index item; Determine, based on the target indicator item and the characteristic value corresponding to each target indicator item, a second score corresponding to each target indicator item; the characteristic value represents the service performance under the target indicator item when the hot migration is not performed; wherein the second score corresponding to the service bandwidth indicator item is determined based on the second service bandwidth and the characteristic value corresponding to the service bandwidth indicator item; Based on the weight corresponding to each of the target indicator items, the second scores corresponding to each of the target indicator items are weighted to obtain the second evaluation value.
5. The virtual machine live migration method according to claim 3 or 4, characterized in that: The method further comprises: Normalizing the characteristic values corresponding to each target indicator item; Based on the normalized eigenvalues, the weight corresponding to each target indicator item is calculated.
6. The virtual machine live migration method according to claim 3 or 4, characterized in that: Determining the characteristic value corresponding to each target indicator item includes: For each of the target indicator items, based on the reference characteristic values of multiple predetermined candidate time points, the reference characteristic value that matches the current time point is determined as the characteristic value corresponding to the target indicator item; wherein, the reference characteristic value of the candidate time point is weightedly calculated based on the indicators of the virtual machine running business at multiple time points within a historical period.
7. The virtual machine live migration method according to claim 1, wherein: The adjusting the performance parameter of the virtual machine based on the first evaluation value and the second evaluation value includes: adjusting a performance parameter of the virtual machine based on a difference between the second evaluation value and the first evaluation value; When the first evaluation value is higher than the second evaluation value, adjusting the performance parameter in a direction of improving the service performance of the virtual machine; When the first evaluation value is lower than the second evaluation value, the performance parameter is adjusted in a direction of reducing the service performance of the virtual machine.
8. The virtual machine live migration method according to claim 1, wherein: The adjusting the performance parameter of the virtual machine based on the first evaluation value and the second evaluation value includes: determining an adjustment degree of the performance parameter based on a difference between the second evaluation value and the first evaluation value; wherein the adjustment degree is positively correlated with the difference; Based on the adjustment degree, a performance parameter of the virtual machine is adjusted.
9. The virtual machine live migration method according to claim 1, wherein: Before adjusting the performance parameters of the virtual machine, the method further includes: determining whether a performance control condition is met based on the current real data migration bandwidth and the generation rate of the dirty page data, and if the performance control condition is met, executing the step of adjusting the performance parameters of the virtual machine; When the dirty page data generation rate is less than the real data migration bandwidth, and the difference ratio between the dirty page data generation rate and the real data migration bandwidth is less than a preset threshold, the performance control condition is not met. When the dirty page data generation rate is less than the real data migration bandwidth, and the difference ratio between the dirty page data generation rate and the real data migration bandwidth is greater than the preset threshold, or the dirty page data generation rate is greater than the real data migration bandwidth, the performance control condition is met.
10. The method according to any one of claims 1 to 9, characterized in that The evaluation index items include: At least one of the following: CPU usage of the service, memory usage of the service, storage IOPS (input and output operations per second) of the service, and network IOPS of the service.
11. A computing device, characterized in that comprising a controller and a memory; the controller is coupled to the memory; The memory is used for computer program instructions; The controller is configured to call the computer program instructions in the memory to execute the method according to any one of claims 1 to 10.