Cluster resource scheduling method and device, equipment, storage medium and product

By obtaining and analyzing the load metrics of cluster hosts and virtual machines, and determining and scheduling virtual machines to higher performance hosts, the limitations of resource scheduling cost optimization in the cluster are solved, and the optimal utilization of resources and load balancing are achieved.

CN119025246APending Publication Date: 2024-11-26SANGFOR TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411162336.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

When existing cluster resource scheduling technology achieves cost optimization, it cannot effectively optimize host resource costs when there is no virtual machines that can be shut down or reduced in the cluster, and can only reduce CPU or memory load to improve performance. It cannot be achieved. Optimal use of resources.

Method used

By obtaining the load metrics of cluster hosts and virtual machines, determining low-load hosts, computing the scheduling path of the virtual machine based on the scheduling policy, scheduling virtual machines on low-load hosts to target hosts with higher performance, and improving the operating density of virtual machines and Host cost optimization.

Benefits of technology

The optimization of host costs in the cluster is achieved, the running density of virtual machines is improved, the optimal utilization of resources and load balancing is ensured, and the limitations of resource optimization in the existing technology is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025246A_ABST
    Figure CN119025246A_ABST
Patent Text Reader

Abstract

The invention discloses a cluster resource scheduling method and device, equipment, a storage medium and a product, and the method comprises the steps: obtaining host data of a host in a cluster, the host data comprising a host load index; determining a low-load host in the cluster based on the host load index; acquiring virtual machine data of a virtual machine running on the low-load host; based on the host data, the virtual machine data and the scheduling strategy, a scheduling path of the virtual machine running on the low-load host is determined, and the scheduling path is used for scheduling the virtual machine from the low-load host to the target host. Thus, the low-load host with the low resource utilization rate in the cluster is determined based on the host load indexes of the hosts in the cluster, the scheduling path for scheduling the virtual machines running on the low-load host to the target host is generated, the virtual machine running density of the hosts is improved, and host cost optimization of the cluster is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to dynamic resource scheduling processing technology, and in particular to a cluster resource scheduling method, device, equipment, storage medium and product. Background Art

[0002] In the modern application of big data environment, cluster nodes (also known as hosts) and data processing volume in the cluster are growing exponentially. How to use dynamic resource scheduling technology to dynamically allocate and balance the computing resources of virtual machines in the cluster to achieve optimal utilization of cluster resources and load balancing has become the key to cluster resource management.

[0003] In the related technology, cluster capacity optimization methods are usually used to achieve cluster cost optimization management. In the cluster capacity optimization mode, by marking the identified idle virtual machines as recyclable virtual machines, it is recommended that users shut down the recyclable virtual machines, or appropriately reduce the resource configuration of the recyclable virtual machines, such as reducing the number of configured central processing unit (CPU) cores and memory size, so as to achieve cost optimization management in the cluster. However, the application scenarios of the cluster capacity optimization mode are relatively limited. For example, if there are no virtual machines in the cluster that can be shut down or reduced in configuration, cluster resource optimization cannot be achieved, and shutting down or reducing the configured virtual machines can only reduce the CPU or memory load requirements for the host to improve the performance indicators of the host and the performance indicators of other virtual machines running on the host, and it is impossible to optimize the host resource costs in the cluster. Summary of the invention

[0004] In view of this, embodiments of the present application provide a cluster resource scheduling method, apparatus, device, storage medium and product, which aim to improve the virtual machine operation density of the host and achieve cluster host cost optimization.

[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 cluster resource scheduling method, the method comprising:

[0007] Obtaining host data of hosts in the cluster, wherein the host data includes host load indicators;

[0008] Based on the host load indicator, determining a low-load host in the cluster;

[0009] Acquire virtual machine data of the virtual machine running on the low-load host;

[0010] Based on the host data, the virtual machine data and the scheduling policy, a scheduling path of the virtual machine running on the low-load host is determined, and the scheduling path is used to schedule the virtual machine from the low-load host to a destination host.

[0011] In one implementation, the host load indicator includes a host central processing unit CPU load indicator and a host memory load indicator, and determining a low-load host in the cluster based on the host load indicator includes:

[0012] If there is a host in the cluster whose host CPU load index is less than a first set CPU load threshold, and / or whose memory load index is less than a first set memory load threshold, the corresponding host is determined to be the low-load host.

[0013] In one embodiment, the virtual machine data includes a virtual machine load indicator, and after obtaining the virtual machine data of the virtual machine running on the low-load host, the method further includes:

[0014] Based on the virtual machine load index of each virtual machine, the virtual machines are sorted in descending order to obtain a first virtual machine list of the low-load host;

[0015] Based on the first virtual machine list, selecting a target virtual machine to be scheduled;

[0016] The order of the virtual machines in the first virtual machine list represents the scheduling order of the virtual machines.

[0017] In one implementation, the host data further includes a host performance indicator, and determining the scheduling path of the virtual machine running on the low-load host based on the host data, the virtual machine data, and the scheduling policy includes:

[0018] Based on the host data, the virtual machine data and the scheduling policy, determine the host in the cluster that supports the scheduling of the target virtual machine, and obtain a destination host list;

[0019] Based on the host performance index, the host with the highest host performance in the destination host list is set as the destination host;

[0020] Based on the destination host, determining a scheduling path for the target virtual machine;

[0021] The host performance index represents the current resource usage status and performance of the host, and is calculated and generated by the host load index, host network resource index and host storage resource index of the host.

[0022] In one implementation, the host data further includes a reliability index, and determining a host in the cluster that supports scheduling of the target virtual machine based on the host data, the virtual machine data, and the scheduling policy to obtain a target host list includes:

[0023] Based on the scheduling policy and the target virtual machine, determine the hosts in the cluster that meet the scheduling requirements, and obtain a first host list;

[0024] Based on the reliability index, determine the hosts in the first host list whose reliability index is greater than the set reliability threshold, and obtain a second host list;

[0025] Based on the host load indicator, determine the hosts in the second host list whose host load indicators are less than the second set load threshold, and obtain a third host list;

[0026] Based on the host data and the virtual machine data, a scheduling benefit index of scheduling the target virtual machine to each host in the third host list is calculated, and based on the scheduling benefit index, a destination host list is obtained.

[0027] In one implementation, the scheduling benefit index includes a host load improvement index and a virtual machine performance degradation index, the virtual machine data also includes a first virtual machine performance index, and the scheduling benefit index of scheduling the target virtual machine to each host in the third host list is calculated based on the host data and the virtual machine data, and the destination host list is obtained based on the scheduling benefit index, including:

[0028] Obtaining a sensitivity threshold representing a virtual machine scheduling frequency;

[0029] Based on the host load index and the virtual machine load index, calculating a host load improvement index of each host after the target virtual machine is scheduled to each host in the third host list;

[0030] Determine the hosts in the third host list whose host load improvement index is less than the set load improvement threshold, and obtain a fourth host list;

[0031] Based on the host performance indicator and the first virtual machine performance indicator, calculating a virtual machine performance degradation indicator of the target virtual machine being scheduled to each host in the fourth host list;

[0032] Determine the hosts in the fourth host list whose corresponding virtual machine performance degradation index is less than the sensitivity threshold, and obtain a destination host list;

[0033] The first virtual machine performance indicator represents the current resource usage status and performance of the virtual machine, and is calculated and generated by the virtual machine load indicator, virtual machine network resource indicator and virtual machine storage resource indicator of the virtual machine.

[0034] In one implementation, the calculating, based on the host load indicator and the virtual machine data, the virtual machine performance degradation indicator of the target virtual machine being scheduled to each host in the fourth host list includes:

[0035] Based on the host performance indicator and the first virtual machine performance indicator, calculating the virtual machine performance of the target virtual machine when it runs on each host in the fourth host list to obtain a second virtual machine performance indicator;

[0036] Based on the first virtual machine performance indicator and the second virtual machine performance indicator of the target virtual machine, a virtual machine performance degradation indicator of each host in the fourth host list when the target virtual machine is scheduled is obtained.

[0037] In one implementation, the scheduling policy includes a first policy indicating that the target virtual machine cannot run on the same host as the virtual machines in the second virtual machine list and a second policy indicating that the target virtual machine can only run on the hosts in the fifth host list, and determining the hosts in the cluster that meet the scheduling requirements based on the scheduling policy and the target virtual machine to obtain the first host list includes:

[0038] If it is determined that the target virtual machine complies with the first policy, obtaining the first host list based on hosts in the cluster that run virtual machines in the second virtual machine list;

[0039] If it is determined that the target virtual machine complies with the second policy, the first host list is generated based on the hosts running in the fifth host list.

[0040] In one embodiment, the scheduling strategy further includes a third strategy indicating that all virtual machines in the third virtual machine list run on the same host, and the scheduling benefit index of scheduling the target virtual machine to each host in the third host list is calculated based on the host data and the virtual machine data, and the destination host list is obtained based on the scheduling benefit index, including:

[0041] If it is determined that the target virtual machine complies with the third policy, the scheduling benefit index of all virtual machines in the third virtual machine list being scheduled to each host in the third host list is calculated, and the destination host list is obtained based on the scheduling benefit index.

[0042] In one embodiment, the method further comprises:

[0043] If the scheduling paths of all virtual machines running on the low-load host are determined, marking the low-load host;

[0044] Based on the user scheduling instruction, after all virtual machines running on the marked low-load host are scheduled to the corresponding destination host, the marked low-load host is controlled to shut down.

[0045] In a second aspect, an embodiment of the present application provides a cluster resource scheduling device, the device comprising:

[0046] A first acquisition module, used to acquire host data of hosts in the cluster, wherein the host data includes a host load indicator;

[0047] A first determination module, configured to determine a low-load host in the cluster based on the host load indicator;

[0048] A second acquisition module is used to acquire virtual machine data of the virtual machine running on the low-load host;

[0049] The second determination module is used to determine a scheduling path of the virtual machine running on the low-load host based on the host data, the virtual machine data and the set rules, and the scheduling path is used to schedule the virtual machine from the low-load host to the destination host.

[0050] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when running the computer program, executes the steps of the method described in the first aspect.

[0051] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0052] 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.

[0053] The cluster resource scheduling method provided by the embodiment of the present application includes: obtaining host data of hosts in the cluster, the host data including host load indicators; determining low-load hosts in the cluster based on the host load indicators; obtaining virtual machine data of virtual machines running on the low-load hosts; determining the scheduling path of the virtual machines running on the low-load hosts based on the host data, virtual machine data and scheduling policies, the scheduling path is used to schedule the virtual machines from the low-load hosts to the destination hosts. In this way, the embodiment of the present application determines low-load hosts with low resource utilization in the cluster based on the host load indicators of the hosts in the cluster, and generates a scheduling path for scheduling the virtual machines running on the low-load hosts to the destination hosts, thereby improving the virtual machine operation density of the hosts and realizing the host cost optimization of the cluster. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 A schematic diagram of a cluster resource scheduling method according to an embodiment of the present application;

[0055] Figure 2 A flowchart of a cluster resource scheduling method in an application example of this application;

[0056] Figure 3 A flowchart of a cluster resource scheduling method in a cost optimization mode in an application example of the present application;

[0057] Figure 4 This is a schematic diagram of an interface for a user to operate a cluster resource scheduling mode in an application example of the present application;

[0058] Figure 5 This is an interface diagram of the cluster cost optimization effect in an application example of this application;

[0059] Figure 6 This is a schematic diagram of an interface for cluster cost optimization suggestions in an application example of this application;

[0060] Figure 7 A schematic diagram of a process for determining a scheduling path for a target virtual machine in an application example of the present application;

[0061] Figure 8 This is a schematic diagram of the structure of a cluster resource scheduling device according to an embodiment of the present application;

[0062] Fig. 9 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application;

[0063] Fig.10 This is a structural diagram of a cluster resource scheduling architecture based on electronic devices in an application example of the present application. DETAILED DESCRIPTION

[0064] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0065] 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.

[0066] The present application embodiment provides a cluster resource scheduling method, such as Figure 1 The method comprises:

[0067] Step 101, obtaining host data of hosts in a cluster, where the host data includes host load indicators.

[0068] Here, the host is a physical server, and multiple hosts in a cluster are connected through a network, and the cluster is managed as a single system.

[0069] It should be noted that one or more virtual machines run on the host in the cluster. The virtual machine appears as a special process to the host and as a virtual server environment to the user. Based on the virtual machines running on the host, the cluster provides applications, system resources and data services to the user.

[0070] Exemplarily, the host load indicator includes a host CPU load indicator and a host memory load indicator.

[0071] It should be noted that the host load index represents the current CPU and memory resource usage status of the host, and is composed of the host resource demand value and the host system resource usage. Among them, the host resource demand value represents the CPU and memory demand value of all virtual machines running on the host; the host system resource usage component represents the CPU and memory resources required by the host to manage all running virtual machines.

[0072] It can be understood that the host resource requirement value includes the host CPU requirement value and the host memory requirement value; the host system resource occupancy includes the host system CPU occupancy and the host system memory occupancy.

[0073] Step 102: Determine a low-load host in the cluster based on the host load indicator.

[0074] Exemplarily, based on the host load indicator, determining a low-load host in the cluster includes: if there is a host in the cluster whose host CPU load indicator is less than a first set CPU load threshold, and / or whose memory load indicator is less than a first set memory load threshold, then determining the corresponding host as a low-load host.

[0075] In an application example of the present application, the first set CPU load threshold and the first set memory load threshold are set to 80%, that is, the hosts in the cluster whose host CPU current resource utilization rate is less than 80% and / or whose host memory current resource utilization rate is less than 80% are marked as low-load hosts.

[0076] Step 103: Acquire virtual machine data of the virtual machine running on the low-load host.

[0077] Exemplarily, the virtual machine data includes a virtual machine load indicator.

[0078] It can be understood that the virtual machine load index represents the current CPU and memory resource usage status of the virtual machine, including the virtual machine CPU load index and the virtual machine memory load index.

[0079] It is understandable that the host resource demand value of a host is composed of virtual machine load indicators of all virtual machines running on the host.

[0080] Exemplarily, after obtaining the virtual machine data of the virtual machine running on the low-load host, the method further includes:

[0081] Based on the virtual machine load index of each virtual machine, each virtual machine is sorted in descending order to obtain a first virtual machine list of a low-load host; based on the first virtual machine list, a target virtual machine to be scheduled is selected. The order of each virtual machine in the first virtual machine list represents the scheduling order of each virtual machine.

[0082] It should be noted that the number of virtual machines and / or resource usage running on a low-load host is low, and the operation of scheduling all virtual machines running on the low-load host to run on other virtual machines is easy to implement. If it is determined that no virtual machines are running on the host, that is, the host is idle, the host can be shut down to save the host cost of the cluster.

[0083] It should be noted that in the related technologies, cluster capacity optimization methods are usually used to achieve cluster cost optimization management. In the cluster capacity optimization mode, by marking the identified idle virtual machines as recyclable virtual machines, it is recommended that users shut down the recyclable virtual machines, or appropriately reduce the resource configuration of the recyclable virtual machines, such as reducing the number of configured CPU cores and memory size, so as to achieve cost optimization management in the cluster. However, the application scenarios of the cluster capacity optimization mode are relatively limited. For example, if there are no virtual machines in the cluster that can be shut down or reduced in configuration, cluster resource optimization cannot be achieved, and shutting down or reducing the configured virtual machines can only reduce the CPU or memory load requirements for the host to improve the performance indicators of the host and the performance indicators of other virtual machines running on the host, and it is impossible to optimize the host resource costs in the cluster.

[0084] It can be understood that the embodiment of the present application determines low-load hosts with low resource utilization in the cluster based on the host load indicators of the hosts in the cluster, and actively schedules the virtual machines running on the low-load hosts to other virtual machines so that some low-load hosts are idle, thereby achieving host cost optimization of the cluster.

[0085] It is understandable that the embodiment of the present application sorts the virtual machines running on the host in descending order and prioritizes scheduling high-load virtual machines.

[0086] In an application example of the present application, before obtaining virtual machine data of a virtual machine running on a low-load host, the method further includes:

[0087] Based on the host load data, the low-load hosts in the cluster are sorted in ascending order to obtain a low-load host list of the cluster; based on the low-load host list, a target low-load host to be optimized is selected. The order of the low-load hosts in the low-load host list represents the optimization order of the low-load hosts.

[0088] It can be understood that the application example sorts the low-load hosts in the cluster in ascending order and preferentially sets the low-load hosts with low resource usage as cost optimization targets.

[0089] In an application example of the present application, based on the virtual machine load index of each virtual machine, each virtual machine is sorted in descending order to obtain a first virtual machine list of a low-load host, including:

[0090] Based on the virtual machine memory load index of each virtual machine, each virtual machine is sorted in descending order to obtain a first virtual machine list of a low-load host; wherein, if it is determined that the virtual machine memory load indexes of multiple virtual machines are the same, the above multiple virtual machines are sorted in descending order based on the virtual machine CPU load index of the virtual machine.

[0091] Step 104 , based on the host data, the virtual machine data and the scheduling policy, determine a scheduling path for the virtual machine running on the low-load host, where the scheduling path is used to schedule the virtual machine from the low-load host to the destination host.

[0092] Exemplarily, the method also includes: if the scheduling path of all virtual machines running on the low-load host is determined, marking the low-load host; based on the user scheduling instructions, scheduling all virtual machines running on the marked low-load host to the corresponding destination host, and then controlling the marked low-load host to shut down.

[0093] It can be understood that, based on user scheduling instructions, the embodiment of the present application schedules all virtual machines running on a low-load host to the corresponding destination host according to a determined scheduling path. The running density of the virtual machines on the destination host is improved, and some low-load hosts are idle. The host cost optimization of the cluster is achieved by shutting down the idle hosts.

[0094] Exemplarily, the host data also includes a host performance index, which represents the current resource usage status and performance of the host and is calculated and generated by the host load index, host network resource index, and host storage resource index of the host.

[0095] Here, the host network resource indicator represents the network bandwidth of the host and the network resource usage status of the network session, and the host storage resource indicator represents the resource usage status of the host's external storage.

[0096] It can be understood that the host load index includes the host CPU load index and the host memory load index. The embodiment of the present application calculates the current resource usage status and performance of the host based on the four dimensions of the host's CPU load, memory load, network resources and storage resources to obtain the host performance index.

[0097] In an application example of the present application, a method for calculating a host performance index is provided, as shown in the following formula:

[0098]

[0099] Among them, S(h) is the host performance index, Scpu(h) is the host CPU load index, Smen(h) is the host memory index, Snet(h) is the host network resource index, Ssto(h) is the host storage resource index, ncpu is the host CPU load index weight, nmen is the host memory load index weight, nnet is the host network resource index weight, and nsto is the host storage resource weight.

[0100] It can be understood that by configuring the weights of the four dimensional indicators of the host, the host performance indicators can be calculated.

[0101] It should be noted that the application example only provides a method for calculating a host performance indicator that characterizes the current resource usage status and performance of the host. The embodiment of the present application does not specifically limit the method for obtaining the host performance indicator.

[0102] Exemplarily, based on host data, virtual machine data and scheduling policies, a scheduling path for a virtual machine running on a low-load host is determined, including: based on the host data, virtual machine data and scheduling policies, determining a host in the cluster that supports scheduling of a target virtual machine to obtain a list of destination hosts; based on host performance indicators, setting a host with the highest performance in the destination host list as the destination host; based on the destination host, determining a scheduling path for the target virtual machine.

[0103] It is understandable that setting the host with the highest performance in the destination host list as the destination host can reduce the impact of the target virtual machine on the operation of the original virtual machine on the destination host and the impact on the operation of the destination virtual machine after the target virtual machine is scheduled to the destination host.

[0104] Exemplarily, the host data also includes a reliability index. Based on the host data, the virtual machine data, and the scheduling policy, a host in the cluster that supports the scheduling of the target virtual machine is determined to obtain a target host list, including:

[0105] Based on the scheduling strategy and the target virtual machine, the hosts in the cluster that meet the scheduling requirements are determined to obtain a first host list; based on the reliability index, the hosts in the first host list whose reliability index is greater than a set reliability threshold are determined to obtain a second host list; based on the host load index, the hosts in the second host list whose host load index is less than a second set load threshold are determined to obtain a third host list; based on the host data and the virtual machine data, the scheduling benefit index of scheduling the target virtual machine to each host in the third host list is calculated, and based on the scheduling benefit index, the destination host list is obtained.

[0106] Here, the user performs conditional filtering on the hosts in the cluster based on the pre-configured scheduling policy to determine the hosts that meet the scheduling requirements.

[0107] It should be noted that if it is determined that the target virtual machine meets the scheduling policy, the first host list is obtained based on the scheduling policy; if it is determined that the target virtual machine does not meet the scheduling policy, the first host list is obtained based on the hosts in operation in the cluster.

[0108] It is understandable that the host in the cluster that is in the down state does not support the target virtual machine scheduling.

[0109] It is understandable that the low-load host currently running the target virtual machine will not be added to the first host list.

[0110] Exemplarily, the scheduling policy includes a first policy indicating that the target virtual machine cannot run on the same host as the virtual machines in the second virtual machine list and a second policy indicating that the target virtual machine can only run on the hosts in the fifth host list. Based on the scheduling policy and the target virtual machine, a host in the cluster that meets the scheduling requirements is determined to obtain a first host list, including:

[0111] If it is determined that the target virtual machine complies with the first policy, a first host list is obtained based on the hosts in the cluster running the virtual machines in the second virtual machine list; if it is determined that the target virtual machine complies with the second policy, a first host list is generated based on the hosts running in the fifth host list.

[0112] It should be noted that this application supports users to pre-configure scheduling policies to limit the scheduling paths for selecting virtual machines.

[0113] Here, the second virtual machine list is a mutually exclusive virtual machine list of the target virtual machine, and virtual machines with mutually exclusive relationships cannot run on the same host.

[0114] Furthermore, the first policy may indicate that the target virtual machine and the second virtual machine list are in a mutually exclusive relationship, or indicate that the fourth virtual machine list where the target virtual machine is located and the second virtual machine list are in a mutually exclusive relationship.

[0115] It is understandable that if it is determined that the target virtual machine complies with the first policy, the hosts of the virtual machines in the second virtual machine list are filtered out from the cluster, and the first host list is obtained based on the filtered hosts in the cluster that are in operation.

[0116] Here, the fifth host list is a fixed running host list of the target virtual machine, and the virtual machines with fixed relationships can only run on the hosts with fixed relationships.

[0117] Further, the second policy may indicate that the target virtual machine has a fixed relationship with the fifth host list, or indicate that the fifth virtual machine list where the target virtual machine is located has a fixed relationship with the fifth host list.

[0118] Here, the reliability index indicates the failure risk level of the host's hardware such as memory, disk, and independent redundant disk array, and represents the severity of the potential risk after the target virtual machine is scheduled to the host.

[0119] It can be understood that based on the set reliability threshold, hosts without serious hardware risks are filtered out from the first host list to generate the second host list.

[0120] It is understandable that if the target virtual machine is scheduled to a host with a higher current host load index, the host may be operated in a high-load state, affecting the stability of the host operation. The embodiment of the present application sets a second set load threshold, filters out hosts with sufficient CPU and memory resources from the second host list, and generates a third host list.

[0121] In an application example of the present application, based on the host load index, determining the hosts in the second host list whose host load index is less than the second set load threshold, and obtaining the third host list, includes:

[0122] Based on the host load index, the hosts in the second host list whose host CPU load index is less than the second set CPU load threshold and whose host memory load index is less than the second set memory threshold are determined to obtain a third host list.

[0123] Exemplarily, the virtual machine data also includes a first virtual machine performance indicator, which represents the current resource usage status and performance of the virtual machine and is calculated and generated by the virtual machine load indicator, virtual machine network resource indicator, and virtual machine storage resource indicator of the virtual machine.

[0124] Here, the virtual machine network resource indicator represents the network bandwidth and network resource usage status of the network session of the virtual machine, and the virtual machine storage resource indicator represents the resource usage status of the external storage of the virtual machine.

[0125] It can be understood that the virtual machine load indicator includes the virtual machine CPU load indicator and the virtual machine memory load indicator. The embodiment of the present application calculates the current resource usage status and performance of the virtual machine based on the four dimensions of the virtual machine's CPU load, memory load, network resources and storage resources to obtain the first virtual machine performance indicator.

[0126] In an application example of the present application, a method for calculating a first virtual machine performance indicator is provided, as shown in the following formula:

[0127]

[0128] Among them, S(v) is the virtual machine performance indicator, Scpu(v) is the virtual machine CPU load indicator, Smen(v) is the virtual machine memory indicator, Snet(v) is the virtual machine network resource indicator, Ssto(v) is the virtual machine storage resource indicator, pcpu is the virtual machine CPU load indicator weight, pmen is the virtual machine memory load indicator weight, pnet is the virtual machine network resource indicator weight, and psto is the virtual machine storage resource weight.

[0129] It can be understood that by configuring the weights of the four dimensional indicators of the virtual machine, the first virtual machine performance indicator can be calculated.

[0130] It should be noted that the application example only provides a method for calculating a first virtual machine performance indicator that characterizes the current resource usage status and performance of the virtual machine. The embodiment of the present application does not specifically limit the method for obtaining the first virtual machine performance indicator.

[0131] Exemplarily, the scheduling benefit index includes a host load improvement index and a virtual machine performance degradation index. Based on the host data and the virtual machine data, the scheduling benefit index of scheduling the target virtual machine to each host in the third host list is calculated, and based on the scheduling benefit index, a destination host list is obtained, including:

[0132] Obtain a sensitivity threshold that characterizes the frequency of virtual machine scheduling; based on the host load indicator and the virtual machine load indicator, calculate the host load improvement indicator of each host after the target virtual machine is scheduled to each host in the third host list; determine the hosts in the third host list whose host load improvement indicators are less than the set load improvement threshold, and obtain a fourth host list; based on the host performance indicator and the first virtual machine performance indicator, calculate the virtual machine performance degradation indicator of the target virtual machine when it is scheduled to each host in the fourth host list; determine the hosts in the fourth host list whose corresponding virtual machine performance degradation indicators are less than the sensitivity threshold, and obtain a destination host list.

[0133] Here, the host load improvement index is a ratio of a difference between a host load index when the host runs the target virtual machine and a current host load index of the host to the current host load index of the host.

[0134] It should be noted that if the virtual machine load index of the target virtual machine is high, after the target virtual machine is scheduled to a host in the third host list, the host load index of the corresponding host may be significantly increased, causing serious impact on the operation of the original virtual machine on the host.

[0135] Exemplarily, after the target virtual machine is scheduled to each host in the third host list, the host load improvement index of each host is calculated, including: based on an artificial intelligence (AI) model and a timing prediction algorithm, the host load improvement index of each host is calculated after the target virtual machine is scheduled to each host in the third host list.

[0136] Here, the embodiment of the present application is based on an AI model and a timing prediction algorithm, and simulates and predicts the host load data after the host by reading the historical data of the host load indicator of the host.

[0137] Here, the embodiment of the present application is based on an AI model and a timing prediction algorithm, and simulates and predicts the virtual machine load data after the virtual machine by reading the historical data of the virtual machine load indicator of the virtual machine.

[0138] Here, since the AI ​​load prediction function will occupy the host CPU and memory resources, this application can adjust the AI ​​load prediction scale according to actual needs. Based on different AI load prediction scales, the number of hosts that support the calculation of host load improvement indicators can be adjusted.

[0139] It can be understood that the host load improvement index of the host in the fourth host list of the embodiment of the present application is less than the set load improvement threshold, which avoids excessive impact on the virtual machine performance index of the original virtual machine running on the destination host after the target virtual machine is scheduled.

[0140] Exemplarily, based on the host load index and the virtual machine data, calculating the virtual machine performance degradation index of the target virtual machine scheduled to each host in the fourth host list includes:

[0141] Based on the host performance indicator and the first virtual machine performance indicator, the virtual machine performance of the target virtual machine when running on each host in the fourth host list is calculated to obtain the second virtual machine performance indicator; based on the first virtual machine performance indicator and the second virtual machine performance indicator of the target virtual machine, the virtual machine performance degradation indicator of the target virtual machine scheduled to each host in the fourth host list is obtained.

[0142] Here, the virtual machine performance degradation indicator is a ratio of an absolute value of a difference between a first virtual machine performance indicator and a second virtual machine performance indicator to the first virtual machine performance indicator.

[0143] It should be noted that if the virtual machine load index of the virtual machines running on some hosts in the fourth host list is high, after the target virtual machine is scheduled to the corresponding host, it may compete with the original virtual machines on the host for host load resources, host network resources and host storage resources, thereby affecting the virtual machine performance index of the target virtual machine.

[0144] It should be noted that the sensitivity threshold is a virtual machine performance degradation threshold set by a user and is used to indicate the virtual machine scheduling frequency in the cluster cost optimization mode.

[0145] It can be understood that the higher the sensitivity threshold set by the user, the higher the allowed virtual machine performance degradation index, the more hosts in the destination host list obtained, and the more frequent the virtual machine scheduling; conversely, the lower the sensitivity threshold set by the user, the lower the virtual machine scheduling frequency.

[0146] Exemplarily, calculating the virtual machine performance degradation index of the target virtual machine scheduled to each host in the fourth host list includes: calculating the virtual machine performance degradation index of the target virtual machine scheduled to each host in the fourth host list based on the AI ​​model and the timing prediction algorithm.

[0147] It can be understood that based on the AI ​​load prediction function, the performance degradation index of the virtual machine after the target virtual machine is scheduled can be further predicted.

[0148] Here, since the AI ​​load prediction function will occupy the host CPU and memory resources, this application can adjust the AI ​​load prediction scale according to actual needs. Based on different AI load prediction scales, the corresponding number of hosts that support the calculation of virtual machine performance degradation indicators can be adjusted.

[0149] It can be understood that the virtual machine performance degradation index corresponding to the host in the destination host list in the embodiment of the present application is less than the sensitivity threshold, thereby avoiding excessive impact on the virtual machine performance index of the original virtual machine running on the destination host after the target virtual machine is scheduled.

[0150] Exemplarily, the scheduling strategy also includes a third strategy indicating that all virtual machines in the third virtual machine list run on the same host, and based on the host data and the virtual machine data, a scheduling benefit index of scheduling the target virtual machine to each host in the third host list is calculated, and based on the scheduling benefit index, a destination host list is obtained, including:

[0151] If it is determined that the target virtual machine complies with the third policy, the scheduling benefit index of all virtual machines in the third virtual machine list to each host in the third host list is calculated, and the destination host list is obtained based on the scheduling benefit index.

[0152] It is understandable that if it is determined that the target virtual machine complies with the third policy, all virtual machines in the third virtual machine list are currently running on the same host, and the scheduling paths of all virtual machines in the third virtual machine list indicate the same destination host.

[0153] It should be noted that if there is no destination host in the cluster that supports scheduling of all virtual machines in the third virtual machine list, a scheduling path for the target virtual machine is not generated.

[0154] In an application example of the present application, the method also includes: if the scheduling path of the schedulable virtual machines running on all low-load hosts in the cluster is determined, then based on the user scheduling instructions, the virtual machines running on all low-load hosts are scheduled to the corresponding destination hosts according to the determined scheduling path.

[0155] It is understandable that if the destination host list of the target virtual machine cannot be obtained based on the host data, virtual machine data and scheduling policy, the scheduling path of the target virtual machine will not be generated.

[0156] Here, the reasons why the destination host list of the target virtual machine cannot be obtained include: the cluster is a single-node cluster; the host load indicators of other hosts in the cluster are greater than or equal to the second set load threshold; based on the scheduling policy, there are no potential destination hosts in the cluster that support virtual machine scheduling; based on the scheduling policy, the target virtual machine only supports running on the current host; and the reliability indicator of the potential destination host in the cluster is less than or equal to the reliability threshold.

[0157] In an application example of the present application, the method also includes: if the scheduling paths of the schedulable virtual machines running on all low-load hosts in the cluster and the marked low-load hosts are determined, then based on the user scheduling instructions, the virtual machines running on all marked low-load hosts are scheduled to the corresponding destination hosts, and after determining that the scheduling is completed, the marked low-load hosts are controlled to shut down.

[0158] It can be understood that the marked low-load host in this application example is a low-load host for which scheduling paths are determined for all running virtual machines. Based on user scheduling instructions, only virtual machines running on the marked low-load host can be scheduled.

[0159] In an application example of the present application, a cluster resource scheduling method is provided, such as Figure 2 The method comprises:

[0160] Step 201 : Obtain a scheduling mode instruction, where the scheduling mode instruction includes one of the following: a performance balancing mode instruction and a cost optimization mode instruction.

[0161] Here, the performance balancing mode instruction indicates a scheduling mode that prioritizes the performance indicators of hosts and virtual machines in the cluster, aiming to achieve load balancing of all hosts in the cluster; the cost optimization mode instruction indicates that some hosts are idle through virtual machine scheduling without affecting the cluster business in the early stage, thereby optimizing the cluster cost.

[0162] It can be understood that steps 101 to 104 of the embodiment of the present application are all implemented based on obtaining the cost optimization mode instruction.

[0163] Step 202: Based on the scheduling mode instruction, obtain cluster data and scheduling algorithm.

[0164] Here, the cluster data includes host data, virtual machine data and scheduling strategies, and the scheduling algorithms include performance balancing algorithms and cost optimization algorithms.

[0165] Step 203: Generate a scheduling path for the virtual machine to be scheduled based on the cluster data and the scheduling algorithm.

[0166] In an application example of the present application, a cluster resource scheduling method in a cost optimization mode is provided, such as Figure 3 The method comprises:

[0167] Step 301, obtain the sensitivity threshold and AI prediction scale.

[0168] This application example provides a user interface diagram for operating cluster resource scheduling mode, such as Figure 4As shown. Here, the sensitivity threshold includes three threshold levels: conservative, intermediate and aggressive. The conservative level corresponds to a virtual machine performance degradation index of less than 10%; the intermediate level corresponds to a virtual machine performance degradation index of less than 30%; and the aggressive level corresponds to a virtual machine performance degradation index of less than 75%. AI scale prediction includes five levels: disabled, less computing power, medium computing power, more computing power, and maximum computing power. The higher the computing power level selected by the user for AI scale prediction, the more reasonable the scheduling path planning is, and the more host CPU and memory resources are occupied.

[0169] Step 302: Obtain host data of hosts in the cluster.

[0170] Here, the host data includes a host load indicator, and the host load indicator includes a host CPU load indicator and a host memory load indicator.

[0171] Step 303: determine a low-load host in the cluster whose host CPU load index is less than 80% and / or whose host memory load index is less than 80%.

[0172] Here, the first set CPU load threshold and the first set memory load threshold are set to 80%.

[0173] Step 304 , determining whether there is a low-load host in the low-load host list of the cluster, if so, executing step 305 ; if not, executing step 316 .

[0174] Step 305: sort all low-load hosts in the low-load host list in ascending order.

[0175] Step 306 , determining whether all low-load hosts in the low-load host list have been traversed, if so, executing step 316 ; if not, executing step 307 .

[0176] Step 307: Based on the order of the low-load host list, obtain virtual machine data of the virtual machines running on the target host.

[0177] Here, the target host is used as the cluster cost optimization object.

[0178] Here, the virtual machine data includes virtual machine load data.

[0179] Step 308: Based on the virtual machine load data, the virtual machines on the low-load host are sorted in descending order to obtain a first virtual machine list.

[0180] Here, the target virtual machine to be scheduled is selected based on the order of the first virtual machine list.

[0181] Step 309 , determining whether all virtual machines in the first virtual machine list have been traversed, if so, executing step 313 ; if not, executing step 310 .

[0182] Step 310, obtaining a list of running hosts.

[0183] Step 311, determine the scheduling path of the target virtual machine.

[0184] Step 312, based on the determined scheduling path, update the host data of the current target host and the destination host.

[0185] Step 313, delete the current target host from the running host list.

[0186] Step 314, determine whether there is a virtual machine that cannot be scheduled on the current target host, if so, execute step 306; if not, execute step 315.

[0187] Step 315: Mark the current target host as a host to be optimized.

[0188] Here, after step 315 is completed, step 306 is executed.

[0189] Step 316: Generate cluster cost optimization suggestions.

[0190] Here, the cluster cost optimization suggestion includes the scheduling paths of all hosts to be optimized and the corresponding virtual machines in the cluster.

[0191] In an application example of the present application, Figure 5 This is a schematic diagram of the cluster cost optimization effect interface. Figure 6 A diagram of the cluster cost optimization suggestion interface. Figure 5 and Figure 6 As shown, the cluster cost optimization suggestion is to schedule the virtual machine test-noramfb-2 running on the host 200.201.172.31 to the host 200.201.172.32. The number of virtual machines running on the host 200.201.172.32 increases from 3 to 4, and the virtual machine running density of the host 200.201.172.32 increases by 33%. After the scheduling operation is executed, the host 200.201.172.31 is in an idle state.

[0192] Here, the scheduling modes of this application example include disabling, manual scheduling and automatic scheduling. In the manual scheduling mode, the scheduling operation needs to be performed based on the user scheduling instruction; in the automatic scheduling mode, the scheduling operation is automatically performed after the cluster cost optimization suggestion is generated.

[0193] In this application example, based on the running host list (host A, host B, host C and host D) determined in step 310, a flow chart of determining the scheduling path of the target virtual machine (step 311) is provided, as shown in FIG. Figure 7 Step 311 specifically includes:

[0194] Step 3111: Based on the scheduling policy, determine that hosts A to D all meet the scheduling policy requirements.

[0195] Step 3112: Based on the reliability index, determine that the reliability indexes of host A to host D are all greater than a set reliability threshold.

[0196] Here, host A to host D all meet the reliability requirements.

[0197] Step 3113: Based on the host load index, determine that the host load indexes of host A to host D are all less than a second set load threshold.

[0198] Here, the host CPU and memory resources of host A to host D meet the scheduling requirements.

[0199] Step 3114, based on the host load improvement index, determine that the host load improvement indexes of host A to host C are less than the set load improvement threshold, and the host load improvement index of host D is greater than the set load improvement threshold, and remove host D from the running host list.

[0200] Step 3115: based on the virtual machine performance degradation index, determine that the virtual machine performance degradation index of host A and host B is less than the sensitivity threshold, and the virtual machine performance degradation index of host C is greater than the sensitivity threshold, and remove host C from the running host list.

[0201] Step 3116, based on the host performance indicators, determine that the host performance indicator of host A is greater than the host performance indicator of host B.

[0202] Step 3117, set host A as the destination host and determine the scheduling path of the target virtual machine.

[0203] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a cluster resource scheduling device, which corresponds to the above scheduling method, and each step in the above scheduling method embodiment is also completely applicable to the embodiment of the present device.

[0204] like Figure 8As shown, an embodiment of the present application provides a cluster resource scheduling device, the device comprising: a first acquisition module 801, a first determination module 802, a second acquisition module 803 and a second determination module 804. The first acquisition module 801 is used to acquire host data of hosts in the cluster, the host data including host load indicators; the first determination module 802 is used to determine low-load hosts in the cluster based on the host load indicators; the second acquisition module 803 is used to acquire virtual machine data of virtual machines running on the low-load hosts; the second determination module 804 is used to determine the scheduling path of the virtual machines running on the low-load hosts based on the host data, the virtual machine data and the set rules, and the scheduling path is used to schedule the virtual machines from the low-load hosts to the destination hosts.

[0205] In some embodiments, the host load indicator includes a host central processing unit CPU load indicator and a host memory load indicator. The first determination module 802 is specifically used for: if there is a host in the cluster whose host CPU load indicator is less than a first set CPU load threshold, and / or the memory load indicator is less than the first set memory load threshold, then the corresponding host is determined to be a low-load host.

[0206] In some embodiments, the virtual machine data includes a virtual machine load indicator, and the second determination module 804 is also used to: sort each virtual machine in descending order based on the virtual machine load indicator of each virtual machine to obtain a first virtual machine list of a low-load host; based on the first virtual machine list, select a target virtual machine to be scheduled; wherein the order of each virtual machine in the first virtual machine list represents the scheduling order of each virtual machine.

[0207] In some embodiments, the host data also includes host performance indicators, and the second determination module 804 is specifically used to: determine the hosts in the cluster that support the scheduling of the target virtual machine based on the host data, virtual machine data and scheduling policy, and obtain a list of destination hosts; based on the host performance indicators, set the host with the highest performance in the destination host list as the destination host; based on the destination host, determine the scheduling path of the target virtual machine; wherein the host performance indicators characterize the current resource usage status and performance of the host, and are calculated and generated by the host load indicators, host network resource indicators and host storage resource indicators of the host.

[0208] In some embodiments, the host data also includes a reliability index, and the second determination module 804 is specifically used to: determine the hosts in the cluster that meet the scheduling requirements based on the scheduling policy and the target virtual machine, and obtain a first host list; based on the reliability index, determine the hosts in the first host list whose reliability index is greater than a set reliability threshold, and obtain a second host list; based on the host load index, determine the hosts in the second host list whose host load index is less than a second set load threshold, and obtain a third host list; based on the host data and the virtual machine data, calculate the scheduling benefit index of scheduling the target virtual machine to each host in the third host list, and based on the scheduling benefit index, obtain a destination host list.

[0209] In some embodiments, the scheduling benefit indicator includes a host load improvement indicator and a virtual machine performance degradation indicator, the virtual machine data also includes a first virtual machine performance indicator, and the first acquisition module 801 is also used to obtain a sensitivity threshold that characterizes the virtual machine scheduling frequency; the second determination module 804 is specifically used to: based on the host load indicator and the virtual machine load indicator, calculate the host load improvement indicator of each host after the target virtual machine is scheduled to each host in the third host list; determine the hosts in the third host list whose host load improvement indicators are less than the set load improvement threshold, and obtain a fourth host list; based on the host performance indicator and the first virtual machine performance indicator, calculate the virtual machine performance degradation indicator of the target virtual machine when it is scheduled to each host in the fourth host list; determine the hosts in the fourth host list whose corresponding virtual machine performance degradation indicators are less than the sensitivity threshold, and obtain a destination host list; wherein the first virtual machine performance indicator characterizes the current resource usage status and performance of the virtual machine, and is calculated and generated by the virtual machine load indicator, virtual machine network resource indicator and virtual machine storage resource indicator of the virtual machine.

[0210] In some embodiments, the second determination module 804 is specifically used to: calculate the virtual machine performance of the target virtual machine when it runs on each host in the fourth host list based on the host performance indicator and the first virtual machine performance indicator, and obtain the second virtual machine performance indicator; based on the first virtual machine performance indicator and the second virtual machine performance indicator of the target virtual machine, obtain the virtual machine performance degradation indicator of the target virtual machine scheduled to each host in the fourth host list.

[0211] In some embodiments, the first acquisition module 801 is also used to obtain a scheduling policy configured by the user, the scheduling policy including a first policy indicating that the target virtual machine cannot run on the same host as the virtual machines in the second virtual machine list and a second policy indicating that the target virtual machine only supports running on the hosts in the fifth host list; the second determination module 804 is specifically used to: if it is determined that the target virtual machine complies with the first policy, then based on the hosts in the cluster running the virtual machines in the second virtual machine list, obtain a first host list; if it is determined that the target virtual machine complies with the second policy, then based on the hosts running in the fifth host list, generate a first host list.

[0212] In some embodiments, the scheduling strategy also includes a third policy indicating that all virtual machines in the third virtual machine list run on the same host, and the second determination module 804 is specifically used to: if it is determined that the target virtual machine complies with the third policy, calculate the scheduling profit index of all virtual machines in the third virtual machine list to be scheduled to each host in the third host list, and obtain the destination host list based on the scheduling profit index.

[0213] In some embodiments, the second determination module 804 is further configured to mark a low-load host if scheduling paths of all virtual machines running on the low-load host are determined.

[0214] In some embodiments, the cluster resource scheduling device further includes a control module 805, which is used to control the marked low-load host to shut down after scheduling all virtual machines running on the marked low-load host to the corresponding destination host based on user scheduling instructions.

[0215] It should be noted that: the scheduling device provided in the above embodiment only uses the division of the above program modules as an example when performing scheduling. 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 scheduling device provided in the above embodiment and the scheduling method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0216] 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 an electronic device. Fig. 9 Only an exemplary structure of the electronic device is shown, not all structures, and it can be implemented as needed. Fig. 9 Partial or complete structure shown.

[0217] like Fig. 9 As shown, the electronic 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 electronic 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 scheduling bus and a status signal bus. However, for the sake of clarity, in Fig. 9 Various buses are labeled as bus system 905.

[0218] 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.

[0219] The memory 902 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device 900. Examples of such data include: any computer program used to operate on the electronic device 900.

[0220] The scheduling 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 scheduling method can be completed by the hardware integrated logic circuit or software instructions in the processor 901. The above-mentioned processor 901 may 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 may 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 may be located in a storage medium, which is located in the memory 902, and the processor 901 reads the information in the memory 902, and completes the steps of the scheduling method provided in the embodiment of the present application in combination with its hardware.

[0221] In an exemplary embodiment, the electronic device 900 can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), FPGA, general processor, scheduler, micro-scheduler (MCU), micro-controller unit (Microprocessor), or other electronic components to execute the aforementioned scheduling method.

[0222] 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), and direct rambus random access memory (DRRAM).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.

[0223] In an application example of the present application, a schematic diagram of a cluster resource scheduling architecture based on an electronic device 900 is provided, such as Fig.10 As shown. The cluster resource scheduling architecture includes a cluster 1001, a collector 1002, a data server 1003, a front-end device 1004 and an electronic device 900. Cluster 1001 includes multiple hosts running virtual machines. Collector 1002 regularly collects host data of hosts in cluster 1001, virtual machine data of running virtual machines and scheduling policies configured by users, and stores the collected data to data server 1003. Electronic device 900 regularly obtains host data, virtual machine data and scheduling policies from data server 1003, and sends scheduling suggestions to data server 1003 based on the obtained data, wherein the scheduling suggestions include one of the following: cluster performance balancing suggestions and cluster cost optimization suggestions. The user queries the scheduling suggestions stored in data server 1003 based on the front-end device, and decides whether to perform the scheduling operation according to the scheduling path in the scheduling suggestion.

[0224] 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 an electronic device 900 to complete the steps described in the scheduling method of the present application embodiment. 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.

[0225] In an exemplary embodiment, the 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 electronic device 900 to complete the steps described in the method of the embodiment of the present application.

[0226] 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.

[0227] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0228] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present 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 cluster resource scheduling method, characterized in that: The method comprises: Obtaining host data of hosts in the cluster, wherein the host data includes host load indicators; Based on the host load indicator, determining a low-load host in the cluster; Acquire virtual machine data of the virtual machine running on the low-load host; Based on the host data, the virtual machine data and the scheduling policy, a scheduling path of the virtual machine running on the low-load host is determined, and the scheduling path is used to schedule the virtual machine from the low-load host to a destination host.

2. The method according to claim 1, characterized in that The host load index includes a host central processing unit CPU load index and a host memory load index. The determining of the low-load host in the cluster based on the host load index includes: If there is a host in the cluster whose host CPU load index is less than a first set CPU load threshold, and / or whose memory load index is less than a first set memory load threshold, the corresponding host is determined to be the low-load host.

3. The method according to claim 1, characterized in that The virtual machine data includes a virtual machine load indicator. After acquiring the virtual machine data of the virtual machine running on the low-load host, the method further includes: Based on the virtual machine load index of each virtual machine, the virtual machines are sorted in descending order to obtain a first virtual machine list of the low-load host; Based on the first virtual machine list, selecting a target virtual machine to be scheduled; The order of the virtual machines in the first virtual machine list represents the scheduling order of the virtual machines.

4. The method according to claim 3, characterized in that: The host data also includes a host performance indicator, and determining the scheduling path of the virtual machine running on the low-load host based on the host data, the virtual machine data and the scheduling policy includes: Based on the host data, the virtual machine data and the scheduling policy, determine the host in the cluster that supports the scheduling of the target virtual machine, and obtain a destination host list; Based on the host performance index, the host with the highest host performance in the destination host list is set as the destination host; Based on the destination host, determining a scheduling path for the target virtual machine; The host performance index represents the current resource usage status and performance of the host, and is calculated and generated by the host load index, host network resource index and host storage resource index of the host.

5. The method according to claim 4, characterized in that The host data also includes a reliability index. Based on the host data, the virtual machine data and the scheduling policy, determining a host in the cluster that supports scheduling of the target virtual machine, and obtaining a destination host list includes: Based on the scheduling policy and the target virtual machine, determine the hosts in the cluster that meet the scheduling requirements, and obtain a first host list; Based on the reliability index, determine the hosts in the first host list whose reliability index is greater than the set reliability threshold, and obtain a second host list; Based on the host load indicator, determine the hosts in the second host list whose host load indicators are less than the second set load threshold, and obtain a third host list; Based on the host data and the virtual machine data, a scheduling benefit index of scheduling the target virtual machine to each host in the third host list is calculated, and based on the scheduling benefit index, a destination host list is obtained.

6. The method according to claim 5, characterized in that The scheduling benefit index includes a host load improvement index and a virtual machine performance degradation index, the virtual machine data also includes a first virtual machine performance index, and the scheduling benefit index of scheduling the target virtual machine to each host in the third host list is calculated based on the host data and the virtual machine data, and a destination host list is obtained based on the scheduling benefit index, including: Obtaining a sensitivity threshold representing a virtual machine scheduling frequency; Based on the host load index and the virtual machine load index, calculating a host load improvement index of each host after the target virtual machine is scheduled to each host in the third host list; Determine the hosts in the third host list whose host load improvement index is less than the set load improvement threshold, and obtain a fourth host list; Based on the host performance indicator and the first virtual machine performance indicator, calculating a virtual machine performance degradation indicator of the target virtual machine being scheduled to each host in the fourth host list; Determine the hosts in the fourth host list whose corresponding virtual machine performance degradation index is less than the sensitivity threshold, and obtain a destination host list; The first virtual machine performance indicator represents the current resource usage status and performance of the virtual machine, and is calculated and generated by the virtual machine load indicator, virtual machine network resource indicator and virtual machine storage resource indicator of the virtual machine.

7. The method according to claim 6, characterized in that The calculating, based on the host load indicator and the virtual machine data, a virtual machine performance degradation indicator of scheduling the target virtual machine to each host in the fourth host list includes: Based on the host performance indicator and the first virtual machine performance indicator, calculating the virtual machine performance of the target virtual machine when it runs on each host in the fourth host list to obtain a second virtual machine performance indicator; Based on the first virtual machine performance indicator and the second virtual machine performance indicator of the target virtual machine, a virtual machine performance degradation indicator of each host in the fourth host list when the target virtual machine is scheduled is obtained.

8. The method according to claim 5, characterized in that The scheduling policy includes a first policy indicating that the target virtual machine cannot run on the same host as the virtual machines in the second virtual machine list and a second policy indicating that the target virtual machine can only run on the hosts in the fifth host list. The determining, based on the scheduling policy and the target virtual machine, hosts in the cluster that meet the scheduling requirements to obtain the first host list includes: If it is determined that the target virtual machine complies with the first policy, obtaining the first host list based on hosts in the cluster that run virtual machines in the second virtual machine list; If it is determined that the target virtual machine complies with the second policy, the first host list is generated based on the hosts running in the fifth host list.

9. The method according to claim 8, characterized in that The scheduling strategy also includes a third strategy indicating that all virtual machines in the third virtual machine list run on the same host, and the scheduling benefit index of scheduling the target virtual machine to each host in the third host list is calculated based on the host data and the virtual machine data, and the destination host list is obtained based on the scheduling benefit index, including: If it is determined that the target virtual machine complies with the third policy, the scheduling benefit index of all virtual machines in the third virtual machine list being scheduled to each host in the third host list is calculated, and the destination host list is obtained based on the scheduling benefit index.

10. The method according to claim 1, characterized in that The method further comprises: If the scheduling paths of all virtual machines running on the low-load host are determined, marking the low-load host; Based on the user scheduling instruction, after all virtual machines running on the marked low-load host are scheduled to the corresponding destination host, the marked low-load host is controlled to shut down.

11. A cluster resource scheduling device, characterized in that: The device comprises: A first acquisition module, used to acquire host data of hosts in the cluster, wherein the host data includes a host load indicator; A first determination module, configured to determine a low-load host in the cluster based on the host load indicator; A second acquisition module is used to acquire virtual machine data of the virtual machine running on the low-load host; The second determination module is used to determine a scheduling path of the virtual machine running on the low-load host based on the host data, the virtual machine data and the set rules, and the scheduling path is used to schedule the virtual machine from the low-load host to the destination host.

12. An electronic device, characterized in that: include: A processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when running the computer program, executes the steps of the method according to any one of claims 1 to 10.

13. A storage medium, characterized in that: The storage medium stores a computer program, and 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.