Resource scheduling evaluation method and device, equipment, storage medium and product
By computing the virtual machine migration score and benefits, the problem of inaccurate migration path returns during virtual machine migration is solved, and the accuracy of virtual machine migration decisions and optimal optimization of resource utilization is achieved.
Patent Information
- Application Number
- CN202411165326.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-11-22
AI Technical Summary
The existing technology cannot accurately reflect the migration benefits on the migration path when migrating virtual machines, resulting in inaccurate migration decisions.
By obtaining the virtual machine migration path, calculating the migration score, generating a migration score list, combining the initial migration score and preset income calculation rules, determining the performance resource status and benefits of the virtual machine after migration, and providing a percentage conversion to visually display the score.
Improve the accuracy and efficiency of virtual machine migration decisions, ensuring optimal performance optimization of resource utilization after migration.
Smart Images

Figure CN119003093A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a resource scheduling evaluation method, device, equipment, storage medium and product. Background Art
[0002] Different from the traditional computing model, cloud computing uses virtualization technology to provide users with elastic resource services on demand. Virtualization technology is one of the key technologies in the field of cloud computing. It can virtualize the physical resources of a physical machine into multiple virtual machines (VMs). The physical resources are provided to each virtual machine in the form of a virtual resource pool by the virtualization platform, and the physical resources are shared between virtual machines.
[0003] In related technologies, the virtual machine migration path can be determined by host load indicators and pre-set thresholds. However, the above method alone cannot accurately reflect the migration benefits before and after the virtual machine migration on different migration paths, resulting in an inability to make accurate migration decisions. Summary of the invention
[0004] In view of this, embodiments of the present application provide a resource scheduling evaluation method, apparatus, device, storage medium and product, which can improve the accuracy of resource scheduling.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a resource scheduling evaluation method, the method comprising:
[0007] Obtaining a migration path of a target virtual machine on a source host, wherein the migration path includes a list of migration hosts corresponding to the target virtual machine;
[0008] For each migration host in the migration host list, determining a migration score after the target virtual machine is migrated to the migration host;
[0009] A migration score list is generated based on each of the migration scores, wherein the migration score represents the performance resource status of the target virtual machine after the migration.
[0010] In some embodiments, the method further comprises:
[0011] Obtaining an initial migration score of the target virtual machine before migration corresponding to the source host;
[0012] For each migration score in the migration score list, determining a migration benefit of the target virtual machine after migration based on the initial migration score, the migration score and a preset migration benefit calculation rule;
[0013] Based on the migration benefits, a migration benefit list is generated.
[0014] In some embodiments, the method further comprises:
[0015] Convert the migration score list based on the percentage conversion rule to generate a percentage migration score list;
[0016] In response to the display instruction information, the percentage migration score list is displayed.
[0017] In some embodiments, the performance resources of the target virtual machine include one or more of the following: CPU resources, memory resources, network resources, and storage resources, and determining, for each migration host in the migration host list, a migration score of the target virtual machine to the migration host includes:
[0018] Obtaining a CPU score of the CPU resources of the target virtual machine after migration, a memory score of the memory resources of the target virtual machine after migration, a network score of the network resources of the target virtual machine after migration, and a storage score of the storage resources of the target virtual machine after migration;
[0019] The migration score is generated based on one or more of the CPU score, the memory score, the network score, and the storage score and a weighting rule.
[0020] In some embodiments, the method further comprises:
[0021] Obtaining the CPU usage rate of the target virtual machine after migration and the CPU demand of the target virtual machine after migration;
[0022] The CPU score is determined based on the CPU usage of the target virtual machine, the CPU demand of the target virtual machine, a CPU correction coefficient, and a CPU score rule.
[0023] In some embodiments, the method further comprises:
[0024] Get the CPU usage of the migrated host and the CPU demand of the migrated host after migration;
[0025] The CPU usage of the target virtual machine is generated based on the CPU usage of the migration host, the CPU usage of the migration host, and the CPU demand of the target virtual machine.
[0026] In some embodiments, the method further comprises:
[0027] Determine that the CPU demand of the migrated host after the migration is less than or equal to the CPU demand of the migrated host before the migration, and the first ratio is greater than the second ratio, or determine that the CPU demand of the migrated host after the migration is greater than the CPU demand of the migrated host before the migration, and the first ratio is less than or equal to the second ratio,
[0028] Then, based on the correction rule, the CPU usage of the migration host before the migration, the CPU demand of the migration host after the migration, and the CPU demand of the migration host before the migration, the CPU usage of the migration host after the migration is generated;
[0029] The first ratio is the ratio of the CPU usage of the migration host before migration to the CPU demand of the migration host before migration, and the second ratio is the ratio of the CPU usage of the migration host after migration to the CPU demand of the migration host after migration.
[0030] In some embodiments, the method further comprises:
[0031] Obtaining a memory usage value of the target virtual machine, a memory requirement value of the target virtual machine, a swap partition usage value of the target virtual machine after migration, and a homepage interruption count of the target virtual machine after migration;
[0032] The memory score is generated based on the memory usage value of the target virtual machine, the memory requirement value of the target virtual machine, the swap partition usage value of the migrated target virtual machine, the home page interruption times, the memory correction coefficient and the memory scoring rule.
[0033] In some embodiments, the method further comprises:
[0034] Generating a third data transmission ratio of the target virtual machine after the migration based on the first data transmission ratio of the source host and the second data transmission ratio of the migration host;
[0035] generating the network score based on the third data transmission ratio and the network scoring rule;
[0036] Among them, the first data transmission ratio is the ratio of the packet loss rate and the error packet rate of the source host data packet, the second data transmission ratio is the ratio of the packet loss rate and the error packet rate of the migration host, and the third data transmission ratio is the ratio of the error packet error rate and the packet loss rate of the target virtual machine data packet.
[0037] In some embodiments, the method further comprises:
[0038] The storage score is generated based on the replica status of the target virtual machine on the migration host after the migration and the storage score rule.
[0039] In a second aspect, an embodiment of the present application provides a resource scheduling evaluation device, the device comprising:
[0040] An acquisition module, used to acquire a migration path of a target virtual machine on a source host, wherein the migration path includes a list of migration hosts corresponding to the target virtual machine;
[0041] A determination module, configured to determine, for each migration host in the migration host list, a migration score after the target virtual machine is migrated to the migration host;
[0042] A generation module is used to generate a migration score list based on each of the migration scores, wherein the migration score represents the performance resource status of the target virtual machine after the migration.
[0043] In a third aspect, an embodiment of the present application provides a resource scheduling evaluation device, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein:
[0044] The processor is used to execute the steps of the method described in the first aspect when running a computer program.
[0045] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0046] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0047] The technical solution provided in the embodiment of the present application obtains the migration path of the target virtual machine on the source host, wherein the migration path includes a migration host list corresponding to the target virtual machine; for each migration host in the migration host list, determines the migration score of the target virtual machine after migrating to the migration host; and generates a migration score list based on each migration score, wherein the migration score represents the performance resource status of the target virtual machine after the migration.
[0048] In this way, for each migration host, the migration score of the target virtual machine after migrating to the migration host is determined, and a migration scoring scheme for the virtual machine migration scenario is established. The migration score can be used as an effective measurement indicator for subsequent cluster dynamic resource scheduling, as well as a reference indicator for resource dimensions when scheduling virtual machine migration, thereby improving the accuracy of resource scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A schematic diagram of a flow chart of a resource scheduling evaluation method provided in an embodiment of the present application;
[0050] Figure 2 A schematic diagram of the external architecture of the migration estimation and scoring service deployment in an application example of this application;
[0051] Figure 3 A schematic diagram showing the change of the CPU usage of the destination host with the CPU demand in an application example of this application;
[0052] Figure 4 A schematic diagram of the composition structure of the overall score of a virtual machine in an application example of this application;
[0053] Figure 5 A schematic diagram of the effect of virtual machine migration estimated performance scoring in an application example of this application;
[0054] Figure 6 This is a schematic diagram of the effect of estimating the performance benefit of virtual machine migration (automatic scheduling) in an application example of this application;
[0055] Figure 7 A schematic diagram of the effect of estimating the performance benefit of virtual machine migration (manual scheduling) in an application example of this application;
[0056] Figure 8 A schematic diagram of the structure of a resource scheduling evaluation device provided in an embodiment of the present application;
[0057] Fig. 9 A schematic diagram of the structure of a resource scheduling evaluation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0060] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations:
[0061] CPU Score: A score that presents the CPU performance status in a percentage format. It is calculated based on relevant indicators such as CPU usage, demand, over-provisioning, and overload.
[0062] Memory Score: A form of memory performance status presented in a percentage, calculated based on actual physical memory used, swap memory used, memory over-allocation and overload, and other related indicators.
[0063] Network Score: A score that presents network performance in percentage, calculated based on indicators such as error rate and packet loss rate.
[0064] Storage Score: A form of storage performance status presented in a percentage, calculated based on indicators such as whether the storage has backups and storage utilization.
[0065] VM Score: A score that presents the performance status of a VM in a percentage format. It is calculated based on the VM's CPU score, memory score, network score, and storage score.
[0066] CPU usage: refers to the percentage of workload of the computer's central processing unit (CPU) in a specific period of time. It indicates the ratio of the time the CPU is executing tasks to the total time. The higher the CPU usage, the more tasks the CPU is executing, while the lower the usage, the less CPU is idle. The CPU usage can reflect the performance of the computer system. When the CPU usage is continuously high, it may cause problems such as slow system response, extended task execution time, or system crashes.
[0067] CPU Demand: refers to the CPU resources required for normal execution of an application. When CPU resources are sufficient, that is, when there is no resource competition, this value is equal to the CPU utilization rate. When CPU resources are insufficient, that is, when there is resource competition, this value is greater than the CPU utilization rate.
[0068] CPU Cores: Refers to the number of processor cores in a central processing unit (CPU). Each processor core can execute instructions independently, so having more processor cores can increase the processing power and efficiency of a computer. For example, a CPU with four processor cores can execute four threads simultaneously, completing tasks faster than a CPU with only two processor cores.
[0069] Memory Used Percent: refers to the percentage of memory used in a computer system to the total memory. The higher the memory usage, the tighter the memory resources in the system, which may cause problems such as slow system operation or crash.
[0070] VM Memory Config: refers to the memory size pre-configured by the user for the virtual machine before it is powered on. It is the total memory size of the virtual machine, and the actual memory used is generally less than the total memory.
[0071] VM Memory Demand: refers to the actual physical memory size required by the virtual machine process running on the host.
[0072] Memory Swap Used Percent: refers to the percentage of the swap partition size used in the system to the total swap partition size. Swap partition is a virtual memory technology used to temporarily store part of the memory data on the hard disk to free up physical memory space when the physical memory is insufficient. When the swapped data needs to be accessed, the system will read it back into the physical memory. Therefore, the swap partition usage reflects the current tension of the system's physical memory. If the swap partition usage is too high, it may cause the system to respond slowly or even freeze.
[0073] Major Page Fault Per Second: This measures the number of major page faults that occur per second. A major page fault is an error that occurs when the operating system needs to access a page in virtual memory, but the page is not currently in physical memory. This usually requires reading the page from disk, which is a relatively slow operation that can cause system performance to degrade.
[0074] Network Packet Drop Percent: refers to the proportion of data packets lost during network transmission due to various reasons. The higher the network packet loss rate, the worse the network transmission quality, which may lead to problems such as increased network delays and slower data transmission speeds.
[0075] The Network Packet Error Percent refers to the proportion of data packets that have errors during transmission due to various reasons during network transmission. The higher the network packet error rate, the worse the network transmission quality, which may lead to data transmission errors, data loss and other problems.
[0076] Aggregated Replica: Aggregated Replica and non-aggregated Replica are two different options for creating virtual machines in a virtualized environment. Aggregated Replica refers to storing all files of a virtual machine (including virtual disks, configuration files, etc.) in the same location. Aggregated Replica can also improve the migration efficiency of virtual machines, because all files of a virtual machine are in the same location, making it easier to migrate a virtual machine from one physical host to another.
[0077] Non-Aggregated Replica: A non-aggregated replica of a virtual machine means storing the files of the virtual machine in different locations, such as local disks or different shared storage devices. This method can reduce the load on the storage device because the files of the virtual machine can be scattered across multiple storage devices. However, the fault tolerance and availability of a non-aggregated replica of a virtual machine are poor because if one of the storage devices fails, the virtual machine may not be able to continue running.
[0078] The present application embodiment provides a resource scheduling evaluation method, such as Figure 1 As shown, the method comprises the following steps:
[0079] Step 110: Obtain a migration path of the target virtual machine on the source host, where the migration path includes a list of migration hosts corresponding to the target virtual machine.
[0080] Here, in the process of virtual machine migration in a cloud computing environment, the source host is the physical host currently hosting the target virtual machine. The source host includes multiple virtual machines, and the target virtual machine is one or more of the multiple virtual machines. For the target virtual machine, it corresponds to one or more candidate hosts that may be migrated, and these candidate hosts that may be migrated constitute a migration host list.
[0081] Here, the migration path of the target virtual machine includes a list of migration hosts corresponding to the target virtual machine. In practical applications, the migration path of the target virtual machine can be calculated based on the migration data of the target virtual machine based on a DRS (Distributed Resource Scheduler) scheduling service.
[0082] Step 120: For each migration host in the migration host list, determine a migration score after the target virtual machine is migrated to the migration host.
[0083] Here, since the performance, resource usage, network status and compatibility with the target virtual machine of the migration host and the source host will affect the operating efficiency and stability of the virtual machine after migration, the migration score of the target virtual machine after migrating to the migration host is calculated for each migration host in the migration host list.
[0084] Step 130: Generate a migration score list based on each migration score, where the migration score represents the performance resource status of the target virtual machine after migration.
[0085] Here, for each migration host, the migration score of the target virtual machine after migration to the migration host can be determined. The migration score represents the performance resource status of the target virtual machine after migration, and a migration score list is generated based on each migration score. In this way, based on the migration score list, the user can clearly understand the migration score of the target virtual machine after migration to the migration host and make corresponding migration decisions.
[0086] In this way, for each migration host, the migration score of the target virtual machine after migrating to the migration host is determined, and a migration scoring scheme for the virtual machine migration scenario is established. The migration score can be used as an effective measurement indicator for subsequent cluster dynamic resource scheduling, as well as a reference indicator for resource dimensions when scheduling virtual machine migration, thereby improving the accuracy of resource scheduling.
[0087] In some embodiments, the method further comprises:
[0088] Obtaining an initial migration score of the target virtual machine corresponding to the source host before migration;
[0089] For each migration score in the migration score list, based on the initial migration score, the migration score and a preset migration benefit calculation rule, determine the migration benefit of the target virtual machine after the migration;
[0090] Based on each migration benefit, a migration benefit list is generated.
[0091] It is understandable that before migration, the target virtual machine runs on the source host, and the initial migration score corresponding to the source host before the migration of the target virtual machine is obtained. The initial migration score represents the performance resource state of the target virtual machine on the source host before migration.
[0092] It is understandable that for each migration score in the migration score list, the migration benefit of the target virtual machine after migration is determined based on the initial migration score, the migration score and the preset migration benefit calculation rule. The migration benefit represents the benefit of the target virtual machine after migration. Exemplarily, the migration benefit calculation rule may be to calculate the difference between the migration score and the initial migration score. If the post-migration score is higher than the initial migration score, the difference between the two is the migration benefit. A positive migration benefit indicates that the migration of the target virtual machine to the migration host brings positive benefits; conversely, if the post-migration score is lower than the initial migration score, the migration benefit is negative, indicating that the performance of the target virtual machine after migration is reduced or the resource utilization efficiency is not high.
[0093] Here, a migration benefit list is created based on each migration benefit. In this way, users can judge whether the current path is really suitable for migration and whether the migration is profitable based on the generated migration benefit list, and further determine the corresponding migration plan, which provides an effective measurement indicator for subsequent cluster dynamic resource scheduling and a reference indicator for resource dimensions when virtual machine scheduling migration, thereby improving the accuracy of resource scheduling to ensure that the target virtual machine can achieve the best performance optimization and resource utilization effect after migrating to the new host.
[0094] In some embodiments, the method further comprises:
[0095] The migration score list is converted based on the percentage conversion rule to generate a percentage migration score list;
[0096] In response to the display instruction information, a list of migration scores based on a percentage system is displayed.
[0097] It is understandable that in order to ensure that the user can clearly and intuitively see the actual score before the virtual machine migration and the estimated score after the migration, the embodiment of the present application converts the migration score list based on the percentage conversion rule, generates a percentage migration score list, and displays the percentage migration score list in response to the display instruction information. In this way, the intuitiveness of the migration score is improved, and the user is better provided with clear and transparent migration evaluation results, which improves the accuracy of resource scheduling while also improving the efficiency of migration decision-making.
[0098] In some embodiments, the performance resources of the target virtual machine include one or more of the following: CPU resources, memory resources, network resources, and storage resources. For each migration host in the migration host list, determining a migration score for migrating the target virtual machine to the migration host includes:
[0099] Obtaining a CPU score of a CPU resource of the target virtual machine after migration, a memory score of a memory resource of the target virtual machine after migration, a network score of a network resource of the target virtual machine after migration, and a storage score of a storage resource of the target virtual machine after migration;
[0100] A migration score is generated based on one or more of a CPU score, a memory score, a network score, and a storage score and a weighted rule.
[0101] It is understandable that the performance resources of the target virtual machine include one or more of the following: CPU resources, memory resources, network resources, and storage resources. Accordingly, the migration scores corresponding to these resources after the migration are obtained: for each migration host, the CPU resources obtained by the target virtual machine after the migration of the target virtual machine are estimated and obtained, and the CPU score of the CPU resources is determined. Similarly, the memory resources that the target virtual machine will obtain after the migration of the target virtual machine are considered, and the memory score corresponding to the memory resources is obtained. The network performance of the target virtual machine on the migration host is evaluated after the migration of the target virtual machine, so as to give a network score. The storage and speed of the target virtual machine are considered after the migration of the target virtual machine to determine the storage score of the storage resource.
[0102] It is understandable that different resources may have different importance for different virtual machines. For example, some services may be extremely dependent on CPU processing power, while others may be more concerned with memory capacity or network throughput. Therefore, when generating the final migration score, a weighting rule is adopted, that is, to assign corresponding weight values to one or more of the above four scores, and then multiply each score by their respective weights and sum them up, so as to obtain a migration score that fully reflects the overall performance of the target virtual machine on the migration host.
[0103] In this way, by obtaining the scores corresponding to the above-mentioned resources and calculating one or more of the above-mentioned scores based on weighted rules, a migration score is generated, thereby ensuring that the performance resources of all aspects of the target virtual machine are reasonably considered, improving the accuracy of the migration score, and then making the best decision, thereby improving the accuracy of resource scheduling.
[0104] In some embodiments, the method further comprises:
[0105] Obtain the CPU usage rate and CPU demand of the target virtual machine after migration;
[0106] A CPU score is determined based on the CPU usage of the target virtual machine, the CPU demand of the target virtual machine, the CPU correction factor, and the CPU score rule.
[0107] Here, in the embodiment of the present application, the CPU usage is the CPU time actually obtained by the target virtual machine, and the CPU demand is the CPU time that the target virtual machine expects to obtain.
[0108] It should be noted that the CPU correction factor includes the CPU over-provisioning factor and CPU overload factor of the migration host. For the CPU over-provisioning factor, the more cores all virtual machines on the migration host have, the greater the over-provisioning ratio and the greater the possibility of resource competition. However, the configured number of cores is not the number of used cores, and it does not necessarily cause performance degradation. For the CPU overload factor, the CPU load on the migration host load The higher (h) is, the greater the impact on the performance of the virtual host, so the corresponding virtual machine score is lower.
[0109] It should be noted that the CPU scoring rule can be expressed by the following formula:
[0110]
[0111] Among them, S cpu (v) is the CPU score of the target VM after migration, CPU used (v) is the CPU usage of the target virtual machine after migration, CPU demand (v) is the CPU demand of the target virtual machine after migration, m1 is the CPU over-provisioning coefficient of the migration host, and m2 is the CPU overload coefficient of the migration host.
[0112] In the above formula, if the actual CPU time is closer to the expected time, the score is higher; conversely, if the actual CPU time is less than the expected time, the score is lower. The higher the CPU over-provisioning ratio and CPU overload ratio of the host where the virtual machine is located, the larger these two items are, and the lower the calculated score is.
[0113] In some embodiments, the migration host CPU over-allocation coefficient m1 may be determined based on the following formula:
[0114]
[0115] Among them, α is the weight coefficient, CPU cores (v) Configure the CPU core usage for a single virtual machine running on the migration host, ∑ v∈h CPU cores (v) is the total CPU configuration of all virtual machines running on the migration host. cores (h) is the CPU core usage of the migration host.
[0116] For m1, the more cores all virtual machines on the host have, the greater the over-provisioning ratio, and the greater the possibility of resource competition. However, the configured number of cores is not the number of cores used, which does not necessarily cause performance degradation. Therefore, the weight value α is temporarily set to 0.03, which has a slight impact on the overall score. The CPU over-provisioning ratio of the host is calculated by the total number of CPUs configured for all virtual machines running above∑ v∈h CPU cores(v) Divided by the number of CPU cores on the host cores (h) It is found that when the over-allocation ratio is less than 1, the score will not be reduced.
[0117] In some embodiments, the migration host CPU over-allocation coefficient m2 may be determined based on the following formula:
[0118]
[0119] Among them, β is the weight coefficient, CPU load (h) is the migration host load, CPU used (h) is the CPU usage of the migration host, CPU demand (h) is the CPU requirement of the migration host.
[0120] For m2, the CPU load on the host load The higher (h) is, the greater the impact on the virtual machine performance, so the corresponding virtual machine score is lower. Therefore, the overload weight value β is 0.2 when the load is not higher than 20%, and the actual proportion of the load is taken when it is higher than 20%. Here, the maximum value between the host CPU utilization and the CPU expected to be obtained by all virtual machines is taken.
[0121] In some embodiments, the method further comprises:
[0122] Get the CPU usage of the migrated host and the CPU demand of the migrated host after migration;
[0123] The CPU usage of the target virtual machine is generated based on the CPU usage of the migration host, the CPU usage of the migration host, and the CPU demand of the target virtual machine.
[0124] Here, the CPU usage of the migrated virtual machine is estimated based on the ratio of the CPU demand of the migrated virtual machine to the CPU usage and demand of the host, because the resource competition of the virtual machines running on the host can be evaluated based on the CPU resource competition of the host.
[0125] Exemplarily, the CPU usage of the target virtual machine after migration may be determined based on the following formula:
[0126]
[0127] Here, CPU used (v) after is the CPU usage of the target VM after migration. demand (v) after is the CPU requirement of the target virtual machine after migration. used (h) after is the CPU usage of the host after migration, CPUdemand (h) after The CPU requirement of the host after migration.
[0128] In some embodiments, the method further comprises:
[0129] Determine that the CPU demand of the migrated host after the migration is less than or equal to the CPU demand of the migrated host before the migration, and the first ratio is greater than the second ratio, or determine that the CPU demand of the migrated host after the migration is greater than the CPU demand of the migrated host before the migration, and the first ratio is less than or equal to the second ratio,
[0130] Then, based on the correction rule, the CPU usage of the migration host before the migration, the CPU demand of the migration host after the migration, and the CPU demand of the migration host before the migration, the CPU usage of the migration host after the migration is generated;
[0131] The first ratio is the ratio of the CPU usage of the migration host before migration to the CPU demand of the migration host before migration, and the second ratio is the ratio of the CPU usage of the migration host after migration to the CPU demand of the migration host after migration.
[0132] It should be noted that, according to a large amount of data testing and verification of the managed cloud, the change trend between the CPU usage (CPUused) of the migration host and the CPU demand (CPU demand) of the migration host presents a decreasing curve.
[0133] In addition, the relationship between the CPU usage of the migration host after migration (CPU used) and the CPU demand of the migration host after migration (CPU demand) can be expressed by the following formula:
[0134]
[0135] Among them, CPU used (h) after is the CPU usage of the migration host after migration. demand (h) after Indicates the CPU usage of the migration host after migration.
[0136] From the above formula, we can see that when the CPU demand of the migration host after migration is less than 60% and the load is low, there will be no resource preemption, the CPU utilization rate can generally be met, and the two are equal. When the CPU demand is higher than 60%, as the CPU demand continues to increase, the CPU resources may not be fully met due to resource competition, resulting in a gradual decrease in the actual CPU utilization rate.
[0137] It should be noted that, in actual applications, there are two situations where the CPU usage of the migration host after migration needs to be corrected.
[0138] First: After the virtual machine is migrated to the migration host, if the migration host CPU demand CPU demand (h) after Less than or equal to the CPU requirement of the migration host before migration used (h), and the first ratio, i.e., the ratio of the host CPU usage before migration / the host CPU demand before migration is greater than the second ratio, i.e., the ratio of the host CPU usage after migration / the host CPU demand after migration. At this time, the host CPU demand after migration is reduced, but the ratio of host CPU usage / host CPU demand is reduced, that is to say, the CPU obtained is reduced and the resource competition is increased, which means that it is inconsistent with the actual change law. The actual demand is reduced, and the resource competition should be reduced, and correction is needed.
[0139] Second, when the virtual machine is migrated to the migration host, if the migration host CPU demand is high after the migration demand (h) after Greater than the CPU requirement of the migration host before migration used (h), and the first ratio, i.e., the ratio of host CPU usage before migration / host CPU demand, is smaller than the second ratio, i.e., the ratio of host CPU usage / host CPU demand after migration. This indicates that the host CPU demand has increased after migration, but the ratio of host CPU usage / host CPU demand has increased. In other words, the CPU obtained has increased, and the resource competition has decreased. This indicates that the actual change pattern is inconsistent. The actual demand has increased, and the resource competition should increase, and correction is needed.
[0140] Exemplarily, the correction rule can be expressed by the following formula:
[0141]
[0142] Here, CPU used (h) after is the CPU usage of the migration host after migration. demand (h) after is the CPU usage of the migration host after migration. used (h) before is the CPU usage of the migration host before migration. demand (h) before The CPU requirement of the migration host before migration.
[0143] In some embodiments, the method further comprises:
[0144] Obtaining a memory usage value of a target virtual machine, a memory requirement value of a target virtual machine, a swap partition usage value of a target virtual machine after migration, and a home page interruption count of a target virtual machine after migration;
[0145] A memory score is generated based on the memory usage value of the target virtual machine, the memory requirement value of the target virtual machine, the swap partition usage value of the target virtual machine after migration, the number of home page interruptions, the memory correction factor, and the memory score rule.
[0146] It is understandable that the memory usage value of the target virtual machine is the physical memory size actually used by the target virtual machine. In the embodiment of the present application, MEM used (v) indicates the memory requirement value of the target virtual machine, which is the physical memory size actually required by the target virtual machine, which can be based on MEM used (v)+k*MEM swapused (v) determine, where MEM swapused (v) is the usage of the swap partition after the target virtual machine is migrated, and k is a coefficient related to the number of home page interrupts per second (MajorPageFaultPerSec).
[0147] In some embodiments, the amount of swap partition usage after migration may be determined based on the following formula:
[0148]
[0149] To migrate the memory usage of the host, is the swap partition usage value of the migration host. In the above formula, the memory requirement value of the target virtual machine can be estimated by multiplying the ratio of the target virtual machine's memory usage value to the migration host's memory usage value by the size of the swap partition usage of the migration host.
[0150] It is understandable that the number of page faults per second is an indicator of the frequency of reading or writing memory pages from the disk due to insufficient memory of the virtual machine. A high frequency of interruptions usually means that memory resources are tight. In the embodiment of the present application, the number of page faults per second of the target virtual machine after migration can be expressed as MajorPageFaultPerSec after (v) The number of home page interruptions per second on the migration host can be calculated using MajorPageFaultPerSec des (v) indicates.
[0151] Here, a memory score is generated based on the memory usage value of the target virtual machine, the memory requirement value of the target virtual machine, the swap partition usage of the target virtual machine after migration, the number of home page interruptions, the memory correction coefficient and the memory scoring rule.
[0152] Exemplarily, the memory scoring rule is as shown in the following formula:
[0153]
[0154] Among them, S mem (v) Memory score of the target VM, MEM used (v) is the memory usage value of the target virtual machine, MEM used (v)+k*MEM swapused (v) is used to identify the memory requirement value of the target virtual machine, and m1 and m2 are memory correction coefficients.
[0155] For example, m1 and m2 are the host memory overload coefficient and the host memory over-allocation coefficient respectively. When the total memory remains unchanged, when the memory load of the host where the virtual machine is located is higher, the larger m1 is, the more likely it is to affect the performance of the virtual machine, so the score will be reduced; when the total memory of the virtual machine configured on the host where the virtual machine is located is larger, exceeding 80% of the total memory of the host, the larger m2 is, the more likely it is to affect the performance of the virtual machine, so the score will be reduced. If it does not exceed 80% of the total memory of the host, this item is 1 and does not affect the score.
[0156] In some embodiments, the method further comprises:
[0157] Generating a third data transmission ratio of the target virtual machine after migration based on the first data transmission ratio of the source host and the second data transmission ratio of the migration host;
[0158] Generate a network score based on the third data transmission ratio and the network scoring rule;
[0159] Among them, the first data transmission ratio is the ratio of the packet loss rate and the error packet rate of the source host data packet, the second data transmission ratio is the ratio of the packet loss rate and the error packet rate of the migration host, and the third data transmission ratio is the ratio of the error packet error rate and the packet loss rate of the target virtual machine data packet.
[0160] Here, the network status of the target virtual machine is estimated according to the network status of the source host and the migration host, thereby generating a network score for the target virtual machine. The first data transmission ratio is the ratio of the packet loss rate and the error packet rate of the source host data packet, and the first data transmission ratio represents the reliability of the source host in network transmission. Correspondingly, the second data transmission ratio is the ratio of the packet loss rate and the error packet rate of the migration host, and the second data transmission ratio represents the reliability of the migration host in network transmission.
[0161] Here, based on the data transmission ratio of the source host and the migration host, a third data transmission ratio of the target virtual machine after migration is generated. Exemplarily, the third data transmission ratio can be determined based on the following formula:
[0162]
[0163] In the above formula, net after (v) is the third data transmission ratio, net des (h) is the packet loss rate / misplacement rate of the migration host, net before (v) is the packet loss rate / error packet rate of the target virtual machine before migration. The packet loss rate includes: the receiving error packet rate, expressed in packets RxErrorPct Indicates the rate of error packets sent, which can be expressed as packets TxErrorPct The error packet rate includes: the received packet loss rate, expressed in packets RxDropPct Indicates, and the received packet loss rate, in packets TxDropPct Indicates. des (h) is the second data transmission ratio, i.e., the packet loss rate / error packet rate of the migration host, net src (h) is the first data transmission ratio, that is, the packet loss rate / error packet rate of the source host.
[0164] After determining the third data transmission ratio, the network scoring rule may be expressed based on the following formula. In practical applications, the network score may be determined based on the formula and the third data transmission ratio:
[0165] S net (v) = 100-max(packets RxErrorPct (v)+packets RxDropPct (v),packets TxErrorPct (v)+packets TxDropPct (v))
[0166] In the above formula, S net (v) Network score of the target virtual machine after migration, packets RxErrorPct (v) is the error packet rate of the target virtual machine after migration, packets RxDropPct (v) is the sending error rate of the target virtual machine after migration, packets TxErrorPct (v) is the received error packet rate of the target virtual machine after migration, packets TxDropPct (v) is the received packet loss rate of the target virtual machine after migration.
[0167] In some embodiments, the method further comprises:
[0168] A storage score is generated based on the replica status of the target virtual machine on the migration host after migration and the storage scoring rules.
[0169] Here, the estimated storage score of the target virtual machine after migration depends on the replica status of the target virtual machine on the migration host. Exemplarily, the storage scoring rules are as follows. In actual applications, the storage score can be determined based on the replica status and the following storage scoring rules:
[0170]
[0171] In the above formula, S sto (v) is the storage score of the target virtual machine after migration. If the target virtual machine v has a local copy on the migration host, then S sto (v) The estimated score is 100. If there is no local copy, then S sto (v)Estimated score: 90.
[0172] Below, the embodiment of the present application is described in detail with reference to an application example.
[0173] In the existing technology, there is currently no migration scoring solution, let alone a percentage conversion of migration benefits. Currently, competitors still use the traditional host load and threshold methods to determine the virtual machine migration path.
[0174] This application example provides an estimated scoring scheme for virtual machine migration. When users perform DRS scheduling (or view the DRS migration path), they only need to use the percentage score to clearly and intuitively see the actual score before the virtual machine migration and the estimated score after the migration, as well as the estimated performance benefit of the migration to the destination host (i.e., the aforementioned migration host). This helps determine whether the current path is really suitable for migration and whether the migration is profitable. Users can also view and compare the virtual machines in the cluster when they are migrated to different hosts, that is, the estimated scores and performance benefits of the virtual machines on different migration paths, through the front-end interface.
[0175] Through the above-mentioned estimated scoring scheme, this application example solves the problem of which specific related indicators should be used to measure the virtual machine CPU, memory, network, and storage scores, as well as the corresponding calculation methods; how to perform an overall score for the virtual machine based on the CPU, memory, network, and storage scores, as well as the corresponding calculation methods; in the virtual machine migration scenario, which indicators are used to estimate the scores of the virtual machine after migration, as well as the corresponding calculation methods.
[0176] In practical applications, such as Figure 2 As shown, Figure 2 The external architecture diagram for migrating the estimated scoring service deployment is as follows:
[0177] 1. The Agent collector regularly collects the monitoring and configuration data required for DRS scheduling and virtual machine estimation and scoring services and reports them to the database for storage.
[0178] 2. The DRS scheduling service calculates the virtual machine migration path based on the monitoring, configuration, and virtual machine migration data, and sends the migration path, monitoring data, and configuration data to the migration estimation scoring service. The migration estimation scoring service then calculates the estimated score of the virtual machine after migration based on the input data, and then returns the estimated score result to the scheduling service.
[0179] 3. After the DRS scheduling service obtains the estimated migration score, it can determine whether the virtual machine migration score has increased or decreased based on the score before migration and the estimated score after migration. That is, the estimated score after migration minus the score before migration is the estimated migration performance benefit. The migration path, the estimated score result, and the migration performance benefit are saved in the database.
[0180] 4. The user views the DRS virtual machine migration path on the front end and refreshes it according to the data in the database. The user can see the scores before and after the virtual machine migration, as well as the performance benefit of the virtual machine migration. A positive value indicates a benefit, while a 0 or negative value indicates no benefit.
[0181] Based on the above architecture, the migration estimation scoring service scores the virtual machine including CPU score, memory score, network score and storage score.
[0182] 1. Virtual Machine CPU Estimated Score
[0183] To estimate the CPU score of a virtual machine, we must first estimate the change in the CPU usage of the destination host (i.e., the aforementioned migration host) after the virtual machine is migrated. Based on a large amount of data testing and verification of the managed cloud, the relationship between CPU usage (CPU used) and CPU demand (CPU demand) is as follows: when the host CPU demand is less than 60% and the load is low, there will be no resource preemption, and the CPU usage can generally be met, and the two are equal. When the CPU demand is higher than 60%, as the CPU demand continues to increase, the CPU resources may not be fully met due to resource competition, resulting in a gradual decrease in the actual CPU usage, specifically presented as a decreasing curve.
[0184] The CPU usage calculation method of the destination host after migration (i.e. the aforementioned migration host) is as shown in the following formula:
[0185]
[0186] The function graph corresponding to the above formula is shown in Figure 3, that is, Figure 3 The diagram below shows how the CPU usage of the destination host changes with the CPU demand.
[0187] In practical applications, there are two situations where the estimated host CPU usage needs to be corrected.
[0188] 1. After the virtual machine is migrated to the destination host, if the destination host CPU demand (CPU demand) is less than or equal to the CPU demand before migration, and the ratio of host CPU usage / host CPU demand before migration is greater than the ratio of host CPU usage / host CPU demand after migration, the host CPU demand is reduced after migration, but the ratio of host CPU usage / host CPU demand is reduced, that is, the CPU obtained is reduced and the resource competition is increased, which means that it is inconsistent with the actual change law, the actual demand is reduced, and the resource competition should be reduced, and correction is needed.
[0189] After the virtual machine is migrated to the destination host, if the destination host CPU demand (CPU demand) is greater than the CPU demand before migration, and the ratio of host CPU usage / host CPU demand before migration is less than the ratio of host CPU usage / host CPU demand after migration, the host CPU demand increases after migration, but the ratio of host CPU usage / host CPU demand increases, that is, the CPU obtained increases and the resource competition decreases, which indicates that it is inconsistent with the actual change law. The actual demand has increased, and the resource competition should increase, and correction is needed.
[0190] In actual applications, the correction can be performed based on the following correction formula 1 of the CPU usage of the destination host after migration (ie, the correction rule mentioned above).
[0191]
[0192] 2. When the estimated CPU usage rate is not consistent with the actual change pattern, it also needs to be corrected to meet the condition that the estimated host CPU usage rate is less than or equal to the CPU demand. In actual applications, the correction can be made based on the following post-migration destination host CPU usage correction formula 2 (i.e. the aforementioned correction rule):
[0193] CPU used (h) after =min(k*CPU used (h) after , CPU demand (h) after )
[0194] The K factor in the above modified formula 2 can be calculated based on the following formula:
[0195]
[0196] The CPU usage of the virtual machine after migration is estimated based on the ratio of the CPU demand of the virtual machine after migration and the CPU usage and demand of the host. This is because the resource competition of the virtual machines running on the host can be evaluated to a certain extent based on the CPU resource competition of the host. In actual applications, the CPU usage calculation formula for the virtual machine after migration can be used for evaluation:
[0197]
[0198] The CPU usage of the migrated virtual machine is estimated based on the ratio of the CPU demand of the migrated virtual machine to the CPU usage and demand of the host. This is because the resource competition of the virtual machines running on the host can be evaluated to a certain extent based on the CPU resource competition of the host.
[0199] Substitute the above estimated data and actual data into the virtual machine CPU score calculation formula below (i.e. the aforementioned CPU score rule) to obtain the estimated CPU score.
[0200]
[0201] From the above CPU score calculation formula, it can be seen that the virtual machine CPU score includes three parts.
[0202] The first part is the ratio of the virtual machine's CPU used to CPU demand, that is, the ratio of the actual CPU time obtained by the virtual machine to the expected CPU time. If the actual CPU time is closer to the expected time, the higher the score; conversely, if the actual CPU time is less than the expected time, the lower the score.
[0203] The second and third parts are m1 and m2, which are the two multiplication terms m1 and m2 in the denominator of the above formula, which are the CPU over-provisioning and CPU overload correction terms of the host. The higher the CPU over-provisioning ratio and CPU overload ratio of the host where the virtual machine is located, the larger these two terms are, and the lower the calculated score is.
[0204] For CPU over-provisioning, the more cores all virtual machines on the host have, the greater the over-provisioning ratio is, and the greater the possibility of resource competition. However, the configured number of cores is not the number of cores used, which does not necessarily cause performance degradation. Therefore, the weight value α is temporarily set to 0.03, which has a slight impact on the overall score. The CPU over-provisioning ratio of the host is the sum of the configured CPUs of all virtual machines running above Σ v∈h CPU cores (v) Divided by the number of CPU cores on the host cores (h) It is found that when the over-allocation ratio is less than 1, the score will not be reduced.
[0205] For CPU overload, the host load CPU loadThe higher (h) is, the greater the impact on the virtual machine performance, so the corresponding virtual machine score is lower. Therefore, the overload weight value β is 0.2 when the load is not higher than 20%, and the actual proportion of the load is taken when it is higher than 20%. Here, the maximum value between the host CPU utilization and the CPU expected to be obtained by all virtual machines is taken.
[0206] 2. Virtual Machine Memory Estimation Rating
[0207] The configured memory of the virtual machine before and after migration and the total memory size of the destination host remain unchanged. Estimated memory usage of the virtual machine after migration MEM usedafter (v) and pre-migration MEM usedbefore (v)Same.
[0208]
[0209] The swap partition usage estimate after the virtual machine migration can be calculated based on the following formula, which is the ratio of the virtual machine's memory usage to the destination host's memory usage, multiplied by the destination host's swap partition usage size.
[0210]
[0211] The estimated number of home page interruptions per second after the virtual machine migration can be calculated based on the following formula, which is the ratio of the virtual machine's memory usage to the destination host's memory usage multiplied by the destination host's home page interruption number per second.
[0212]
[0213] The total memory configuration of all virtual machines on the destination host after the virtual machine is migrated∑ v∈h MEM config (v) desafter It is equal to the sum of the memory configurations of all virtual machines on the current host plus the memory configurations of the virtual machines that are migrated in, minus the memory configurations of the virtual machines that are migrated out.
[0214]
[0215] Similarly, the memory usage and demand of the destination host after the virtual machine migration can be determined based on the following formula: the memory usage and demand of the destination host after the virtual machine migration is equal to the memory usage and demand of the migrated virtual machine plus the memory usage and demand of the migrated virtual machine minus the memory usage and demand of the migrated virtual machine.
[0216]
[0217] Substituting the estimated virtual machine and destination host data after migration into the following virtual machine memory score calculation formula (ie, the aforementioned memory score rule) can obtain the estimated virtual machine memory score after migration.
[0218]
[0219] The memory score of a virtual machine is mainly determined by three parts.
[0220] The first part is the ratio of the physical memory MEM used actually used by the virtual machine to the physical memory needed to be used (MEMused+k*MEM swapUsed). MEM used actually uses the VmRSS of the virtual machine process, and MEM swapUsed uses the VmSwap of the process, multiplied by a coefficient k related to the memory swap frequency MajorPageFaultPerSec. The more swap partitions are actually used, the more times the disk needs to be accessed, and the greater the possibility of causing memory homepage interruption, resulting in more interruptions and lower scores.
[0221] The second and third parts m1 and m2 are the correction items for host memory overload and over-provisioning respectively. When the total memory remains unchanged, when the memory load of the host where the virtual machine is located is higher, the larger m1 is, the more likely it is to affect the performance of the virtual machine, so the score will be reduced; when the total memory of the virtual machine configured on the host where the virtual machine is located is larger, exceeding 80% of the total memory of the host, the larger m2 is, the more likely it is to affect the performance of the virtual machine, so the score will be reduced. If it does not exceed 80% of the total memory of the host, this item is 1 and does not affect the score.
[0222] 3. Virtual Machine Network Estimation Scoring
[0223] Here, in practical applications, the network data after virtual machine migration (i.e., the third data transmission ratio mentioned above) can be determined based on the following network data estimation formula after virtual machine migration:
[0224]
[0225] The network status of the virtual machine is estimated based on the network status of the source host and the destination host. When the packet loss rate / error packet rate of the source host is 0, the network is in a relatively healthy state, and the estimated packet loss rate / error packet rate of the virtual machine (i.e., the aforementioned third data transmission ratio) is equal to the packet loss rate / error packet rate of the destination host. In other cases, if the packet loss rate / error packet rate of the source host is lower than that of the destination host, that is, the network status of the source host is better than that of the destination host, it is estimated that the network packet loss rate / error packet rate will increase after the virtual machine migrates, so the network score may decrease in the future. If the packet loss rate / error packet rate of the source host is higher than that of the destination host, that is, the network status of the destination host is better than that of the source host, it is estimated that the network packet loss rate / error packet rate will decrease after the virtual machine migrates, so the network score may increase in the future.
[0226] Substituting the estimated error packet rate / packet loss rate sent and received by the virtual machine after migration into the following formula (ie, the aforementioned network scoring rule), the estimated network score of the virtual machine after migration can be obtained.
[0227] S net (v) = 100-max(packets RxErrorPct (v)+packets RxDropPct (v),packets TxErrorPct (v)+packets TxDropPct (v))
[0228] The network score of a virtual machine is determined by the maximum value of the sum of the received packet error rate and the packet loss rate, and the sum of the sent packet error rate and the packet loss rate. The larger the error rate and packet loss rate, the more unstable the sending and receiving of network packets, the worse the network condition, and the lower the network score.
[0229] IV. Virtual Machine Storage Estimation Rating
[0230] In practical applications, the storage score is determined based on the following storage score calculation formula (i.e., the aforementioned storage score rule):
[0231]
[0232] The virtual machine storage estimation score depends on whether the migrated virtual machine has a local copy on the destination host. If there is a local copy, the estimation is 100 points, and if there is no local copy, the estimation is 90 points. Whether a virtual machine has a local copy is also called an aggregate copy and a non-aggregate copy. The performance difference between an aggregate copy (with all data) and a non-aggregate copy is within the range of 10% to 15%.
[0233] 5. Overall estimated score of virtual machine
[0234] Here, in actual application, the four scores of memory score, network score, storage score, etc. are first calculated based on the following formula to calculate the weighted geometric mean of each score:
[0235]
[0236] Then, if Figure 4 As shown, Figure 4 The figure is a diagram of the composition structure of the overall score of a virtual machine. The overall estimated score of a virtual machine includes the CPU score, memory score, network score, and storage score. After obtaining the weighted set average of the above, it is necessary to weight it using the score weighting formula listed above to increase the weight of the low-score component score and calculate the virtual overall estimated score (i.e. the aforementioned migration score) so that the final overall score is closer to the low score and more in line with reality:
[0237]
[0238] In addition, based on the above-mentioned estimated scoring scheme, this application example established an evaluation system for the estimated scoring scheme in the virtual machine migration scenario, and also presented the performance resource status of the virtual machine before and after migration in the form of a score of 0 to 100, thereby presenting the resource performance of the virtual machine in the form of a percentage score. When users migrate virtual machines in a cluster, they can simply and intuitively see whether the performance of the virtual machine is improved before and after the virtual machine migration, the extent of the improvement, and the approximate range.
[0239] like Figure 5 , Figure 6 and Figure 7 As shown, Figure 5 Estimated performance score for virtual machine migration. Figure 5 In the DRS virtual machine migration path, the user can refresh it according to the data in the database to see the scores before and after the virtual machine migration, as well as the performance benefit of the virtual machine migration. A positive value indicates a benefit, while a 0 or negative value indicates no benefit.
[0240] Figure 6 Schematic diagram of the effect of estimating the performance benefits of virtual machine migration (automatic scheduling). In this application example, after determining the scores of the virtual machine before and after migration, the virtual machine can be automatically scheduled based on the set scheduling rules. The user can also see the performance benefits after migration by viewing the front-end DRS virtual machine migration path.
[0241] Figure 7 Schematic diagram of the effect of estimating the performance benefit of virtual machine migration (manual scheduling). In this application example, after determining the scores of the virtual machine before and after migration, the user can manually schedule the virtual machine, providing a migration direction for the cluster dynamic resource scheduling (DRS), for example, a migration direction with a positive estimated score benefit.
[0242] In addition, from the perspective of computing resources, this application example considers the virtual machine migration estimation score, which can provide an effective measurement indicator for cluster dynamic resource scheduling. As a reference indicator of the resource dimension when scheduling virtual machine migration, an increase in the score indicates that migration has positive benefits, and a decrease in the score indicates that there is no migration benefit.
[0243] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a resource scheduling evaluation device, which corresponds to the above-mentioned resource scheduling evaluation method, and each step in the above-mentioned resource scheduling evaluation method embodiment is also completely applicable to the embodiment of the resource scheduling evaluation method device. Figure 8As shown, the resource evaluation and scheduling device includes: an acquisition module 810, a determination module 820 and a generation module 830, wherein the acquisition module 810 is used to obtain the migration path of the target virtual machine on the source host, and the migration path includes a migration host list corresponding to the target virtual machine; the determination module 820 is used to determine, for each migration host in the migration host list, a migration score after the target virtual machine is migrated to the migration host; the generation module 830 is used to generate a migration score list based on each migration score, and the migration score represents the performance resource status of the target virtual machine after the migration.
[0244] In some embodiments, the acquisition module 810 is also used to obtain the initial migration score of the target virtual machine corresponding to the source host before migration; the determination module 820 is also used to determine the migration benefit of the target virtual machine after migration for each migration score in the migration score list based on the initial migration score, the migration score and the preset migration benefit calculation rules; the generation module 830 is also used to generate a migration benefit list based on each migration benefit.
[0245] In some embodiments, the generation module 830 is also used to convert the migration score list based on the percentage conversion rules to generate a percentage migration score list; the resource scheduling evaluation device also includes a display module 840, which is used to display the percentage migration score list in response to the display indication information.
[0246] In some embodiments, the performance resources of the target virtual machine include one or more of the following: CPU resources, memory resources, network resources and storage resources. The acquisition module 810 is also used to obtain the CPU score of the CPU resources of the target virtual machine after migration, the memory score of the memory resources of the target virtual machine after migration, the network score of the network resources of the target virtual machine after migration, and the storage score of the storage resources of the target virtual machine after migration; the generation module 830 is also used to generate a migration score based on one or more of the CPU score, memory score, network score and storage score and weighted rules.
[0247] In some embodiments, the acquisition module 810 is also used to obtain the CPU usage of the target virtual machine after migration and the CPU demand of the target virtual machine after migration; the determination module 830 is also used to determine the CPU score based on the CPU usage of the target virtual machine, the CPU demand of the target virtual machine, the CPU correction coefficient and the CPU scoring rules.
[0248] In some embodiments, the acquisition module 810 is used to obtain the CPU usage of the migration host and the CPU demand of the migration host after migration; the generation module 820 is used to generate the CPU usage of the target virtual machine based on the CPU usage of the migration host, the CPU usage of the migration host and the CPU demand of the target virtual machine.
[0249] In some embodiments, the determination module 820 is further configured to determine that the CPU requirement of the migration host after the migration is less than or equal to the CPU requirement of the migration host before the migration, and the first ratio is greater than the second ratio, or to determine that the CPU requirement of the migration host after the migration is greater than the CPU requirement of the migration host before the migration, and the first ratio is less than or equal to the second ratio,
[0250] Then, based on the correction rule, the CPU usage of the migration host before the migration, the CPU demand of the migration host after the migration, and the CPU demand of the migration host before the migration, the CPU usage of the migration host after the migration is generated;
[0251] The first ratio is the ratio of the CPU usage of the migration host before migration to the CPU demand of the migration host before migration, and the second ratio is the ratio of the CPU usage of the migration host after migration to the CPU demand of the migration host after migration.
[0252] In some embodiments, the acquisition module 810 is also used to obtain the memory usage value of the target virtual machine, the memory requirement value of the target virtual machine, the swap partition usage value of the target virtual machine after migration, and the number of home page interruptions of the target virtual machine after migration; the generation module 830 is also used to generate a memory score based on the memory usage value of the target virtual machine, the memory requirement value of the target virtual machine, the swap partition usage value of the target virtual machine after migration, the number of home page interruptions, the memory correction coefficient and the memory scoring rules.
[0253] In some embodiments, the generation module 830 is further configured to generate a third data transmission ratio of the target virtual machine after migration based on the first data transmission ratio of the source host and the second data transmission ratio of the migration host;
[0254] Generate a network score based on the third data transmission ratio and the network scoring rule;
[0255] Among them, the first data transmission ratio is the ratio of the packet loss rate and the error packet rate of the source host data packet, the second data transmission ratio is the ratio of the packet loss rate and the error packet rate of the migration host, and the third data transmission ratio is the ratio of the error packet error rate and the packet loss rate of the target virtual machine data packet.
[0256] In some embodiments, the generation module 830 is further configured to generate a storage score based on the replica status of the target virtual machine on the migration host after the migration and a storage scoring rule.
[0257] In actual application, the acquisition module 810, the determination module 820, the generation module 830 and the display module 840 can be implemented by a processor in the resource scheduling and evaluation device. Of course, the processor needs to run the computer program in the memory to implement its function.
[0258] It should be noted that: the resource scheduling evaluation device provided in the above embodiment only uses the division of the above program modules as an example when performing resource scheduling evaluation. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the resource scheduling evaluation device provided in the above embodiment and the resource scheduling evaluation method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0259] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a resource scheduling evaluation device. Fig. 9 Only an exemplary structure of the resource scheduling evaluation device is shown, not the entire structure, and can be implemented as needed. Fig. 9 Partial or complete structure shown.
[0260] like Fig. 9 As shown, the resource scheduling evaluation device 900 provided in the embodiment of the present application includes: at least one processor 901, a memory 902, a user interface 903 and at least one network interface 904. The various components in the resource scheduling evaluation device 900 are coupled together through a bus system 905. It can be understood that the bus system 905 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 905 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Fig. 9 Various buses are labeled as bus system 905.
[0261] The user interface 903 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.
[0262] The memory 902 in the embodiment of the present application is used to store various types of data to support the operation of the display device 900. Examples of such data include: any computer program used to operate on the resource scheduling evaluation device.
[0263] The resource scheduling evaluation method disclosed in the embodiment of the present application can be applied to the processor 901, or implemented by the processor 901. The processor 901 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the resource scheduling evaluation method can be completed by the hardware integrated logic circuit or software instructions in the processor 901. The above-mentioned processor 901 can be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 901 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 902. The processor 901 reads the information in the memory 902 and completes the steps of the resource scheduling evaluation method provided in the embodiment of the present application in combination with its hardware.
[0264] In an exemplary embodiment, the resource scheduling evaluation device can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.
[0265] It can be understood that the memory 902 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.
[0266] In an exemplary embodiment, the present application also provides a storage medium, namely a computer storage medium, which may be a computer-readable storage medium, for example, a memory 902 storing a computer program, and the computer program may be executed by a processor 901 of a display device to complete the steps of the method of the present application. The computer-readable storage medium may be a memory such as a ROM, a PROM, an EPROM, an EEPROM, a Flash Memory, a magnetic surface memory, an optical disk, or a CD-ROM.
[0267] Illustratively, an embodiment of the present application further provides a computer program product, including a computer program, which can be executed by the processor 901 of the resource scheduling and evaluation device 900 to complete any of the aforementioned method steps.
[0268] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0269] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.
[0270] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A resource scheduling evaluation method, characterized in that: The method comprises: Obtaining a migration path of a target virtual machine on a source host, wherein the migration path includes a list of migration hosts corresponding to the target virtual machine; For each migration host in the migration host list, determining a migration score after the target virtual machine is migrated to the migration host; A migration score list is generated based on each of the migration scores, wherein the migration score represents the performance resource status of the target virtual machine after the migration.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining an initial migration score of the target virtual machine corresponding to the source host before migration; For each migration score in the migration score list, determining a migration benefit of the target virtual machine after migration based on the initial migration score, the migration score and a preset migration benefit calculation rule; Based on the migration benefits, a migration benefit list is generated.
3. The method according to claim 2, characterized in that The method further comprises: Convert the migration score list based on the percentage conversion rule to generate a percentage migration score list; In response to the display instruction information, the percentage migration score list is displayed.
4. The method according to claim 1, characterized in that The performance resources of the target virtual machine include one or more of the following: CPU resources, memory resources, network resources, and storage resources. The determining, for each migration host in the migration host list, a migration score of the target virtual machine to the migration host includes: Obtaining a CPU score of the CPU resources of the target virtual machine after migration, a memory score of the memory resources of the target virtual machine after migration, a network score of the network resources of the target virtual machine after migration, and a storage score of the storage resources of the target virtual machine after migration; The migration score is generated based on one or more of the CPU score, the memory score, the network score, and the storage score and a weighting rule.
5. The method according to claim 4, characterized in that The method further comprises: Obtaining the CPU usage rate of the target virtual machine after migration and the CPU demand of the target virtual machine after migration; The CPU score is determined based on the CPU usage of the target virtual machine, the CPU demand of the target virtual machine, a CPU correction coefficient, and a CPU score rule.
6. The method according to claim 5, characterized in that The method further comprises: Get the CPU usage of the migrated host and the CPU demand of the migrated host after migration; The CPU usage of the target virtual machine is generated based on the CPU usage of the migration host, the CPU usage of the migration host, and the CPU demand of the target virtual machine.
7. The method according to claim 6, characterized in that The method further comprises: Determine that the CPU demand of the migrated host after the migration is less than or equal to the CPU demand of the migrated host before the migration, and the first ratio is greater than the second ratio, or determine that the CPU demand of the migrated host after the migration is greater than the CPU demand of the migrated host before the migration, and the first ratio is less than or equal to the second ratio, Then, based on the correction rule, the CPU usage of the migration host before the migration, the CPU demand of the migration host after the migration, and the CPU demand of the migration host before the migration, the CPU usage of the migration host after the migration is generated; The first ratio is the ratio of the CPU usage of the migration host before migration to the CPU demand of the migration host before migration, and the second ratio is the ratio of the CPU usage of the migration host after migration to the CPU demand of the migration host after migration.
8. The method according to claim 4, characterized in that The method further comprises: Obtaining a memory usage value of the target virtual machine, a memory requirement value of the target virtual machine, a swap partition usage value of the target virtual machine after migration, and a homepage interruption count of the target virtual machine after migration; The memory score is generated based on the memory usage value of the target virtual machine, the memory requirement value of the target virtual machine, the swap partition usage value of the migrated target virtual machine, the home page interruption times, the memory correction coefficient and the memory scoring rule.
9. The method according to claim 4, characterized in that The method further comprises: Generating a third data transmission ratio of the target virtual machine after the migration based on the first data transmission ratio of the source host and the second data transmission ratio of the migration host; generating the network score based on the third data transmission ratio and the network scoring rule; Among them, the first data transmission ratio is the ratio of the packet loss rate and the error packet rate of the source host data packet, the second data transmission ratio is the ratio of the packet loss rate and the error packet rate of the migration host, and the third data transmission ratio is the ratio of the error packet error rate and the packet loss rate of the target virtual machine data packet.
10. The method according to claim 4, characterized in that The method further comprises: The storage score is generated based on the replica status of the target virtual machine on the migration host after the migration and the storage score rule.
11. A resource scheduling evaluation device, characterized in that: The device comprises: An acquisition module, used to acquire a migration path of a target virtual machine on a source host, wherein the migration path includes a list of migration hosts corresponding to the target virtual machine; A determination module, configured to determine, for each migration host in the migration host list, a migration score after the target virtual machine is migrated to the migration host; A generation module is used to generate a migration score list based on each of the migration scores, wherein the migration score represents the performance resource status of the target virtual machine after the migration.
12. A resource scheduling evaluation device, characterized in that: include: A processor and a memory for storing a computer program that can be executed on the processor, wherein: The processor is used to execute the steps of the method according to any one of claims 1 to 10 when running a computer program.
13. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
Citation Information
Cited By
Distributed resource management method and device, equipment, storage medium and product
CN120723370A
Distributed resource management method, device, equipment, storage medium and product
CN120723370B
Server release method
CN120994410A
