WO2015101091A1 - 一种分布式资源调度方法及装置 - Google Patents

一种分布式资源调度方法及装置 Download PDF

Info

Publication number
WO2015101091A1
WO2015101091A1 PCT/CN2014/089636 CN2014089636W WO2015101091A1 WO 2015101091 A1 WO2015101091 A1 WO 2015101091A1 CN 2014089636 W CN2014089636 W CN 2014089636W WO 2015101091 A1 WO2015101091 A1 WO 2015101091A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
resource usage
scheduling
usage rate
virtual machine
Prior art date
Application number
PCT/CN2014/089636
Other languages
English (en)
French (fr)
Inventor
闫立俊
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015101091A1 publication Critical patent/WO2015101091A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present invention relates to resource scheduling technologies, and in particular, to a distributed resource scheduling method and apparatus.
  • each server in a server cluster generally includes multiple virtual machines running different types of services.
  • compute nodes such as a compute node.
  • QoS Quality of Service
  • the virtual machine in which 15 desktop cloud virtual machines are compiled, and 25 cloud virtual machines are compiled.
  • a distributed resource scheduling program (Distributed Resource) is adopted.
  • Scheduler maximizes the resource utilization in the cluster. For example, DRS migrates the overloaded virtual machine to a server with low load. At this time, the resource usage of the overloaded virtual machine is improved, and the original server is used.
  • the resource occupancy rate of the virtual machine has also been improved, and the overall resource occupancy rate of the cluster has been improved.
  • the embodiment of the invention provides a distributed resource scheduling method and device, which can guarantee the service quality of each service virtual machine in each server during distributed resource scheduling.
  • a distributed resource scheduling method including:
  • obtaining according to the resource usage rate of the service virtual machine of the same type in each server, a first standard deviation of the resource usage rate of the same type of service virtual machine in each server by using a predetermined obtaining step, where the obtaining step is: Acquiring an average resource usage rate of the same type of service virtual machine in each server according to the resource usage rate of the same type of service virtual machine in each server, and according to resource usage of the same type of service virtual machine in each server Rate and the average resource usage rate, obtaining a first standard deviation of resource usage rates of the same type of service virtual machine in each server;
  • the distributed cluster is The same type of service virtual machine of any server in the system is balancedly dispatched to other servers of the distributed cluster system;
  • the method further compares the second standard deviation acquired after the balanced scheduling at least once, and before performing the balance scheduling corresponding to the minimum second standard deviation, the method further Includes:
  • the second standard deviation of the resource usage rate of the same type of service virtual machine in each server after the next balanced scheduling is greater than or equal to the resource usage rate of the same type of service virtual machine in each server after the current balancing scheduling.
  • the second standard deviation, or the next balance scheduling, and the cumulative number of times of the balanced scheduling exceeds the first set threshold, then the performing the obtaining step and the next balancing scheduling are stopped.
  • a distributed resource scheduling method including:
  • obtaining step is: acquiring the resource according to the resource usage rate of each server The average resource usage of the distributed cluster system, and the third standard deviation of the resource usage rate of the distributed cluster system is obtained according to the resource usage rate of each server and the average resource usage rate of the distributed cluster system;
  • the third standard deviation of the resource usage rate of the distributed cluster system is greater than or equal to the scheduling threshold of the resource usage rate of the distributed cluster system, balancing any service virtual machine in each server to the In other servers of the distributed cluster system;
  • the method further compares the fourth standard deviation acquired after the balanced scheduling at least once, before performing the balance scheduling corresponding to the minimum fourth standard deviation, include:
  • the fourth standard deviation of the resource usage rate of the distributed cluster system after the next balanced scheduling is greater than or equal to the resource usage rate of the distributed cluster system after performing the current balanced scheduling.
  • the fourth standard deviation, or the next balance scheduling after the cumulative number of the balanced scheduling exceeds the first set threshold, or after the service virtual machine is balancedly dispatched from any first server to any second server,
  • the change in the total amount of each type of service virtual machine in any one of the first servers or any of the second servers is greater than a second set threshold, and/or any of the first servers or any of the second If the change of the resources of the first service server in the server is greater than the third set threshold, the obtaining step and the next balanced scheduling are stopped.
  • a distributed resource scheduling apparatus including:
  • a first acquiring unit configured to acquire resource usage rates of the same type of service virtual machines in each server in the distributed cluster system
  • a second acquiring unit configured to acquire, according to a resource usage rate of the same type of service virtual machine in each server, a first standard deviation of resource usage rates of the same type of service virtual machine in each server by using a predetermined acquisition manner Obtaining, according to the resource usage rate of the same type of service virtual machine in each server, obtaining an average resource usage rate of the same type of service virtual machine in each server, and according to the same in each server The resource usage rate of the type service virtual machine and the average resource usage rate, and obtaining a first standard deviation of resource usage rates of the same type of service virtual machine in each server;
  • a first scheduling unit configured to: when a first standard deviation of resource usage rates of the same type of service virtual machines in the servers is greater than or equal to a scheduling threshold of resource usage rates of the same type of service virtual machines in each server And balancing the same type of service virtual machines of any one of the servers in the distributed cluster system to other servers of the distributed cluster system;
  • a third acquiring unit configured to obtain resource usage rates of the same type of service virtual machine in each server in the distributed cluster system after the balanced scheduling
  • a fourth acquiring unit configured to acquire, according to the resource usage rate of the same type of service virtual machine in each server in the distributed cluster system, the same type in each server The second standard deviation of the resource usage of the business virtual machine;
  • a first comparing unit configured to compare the second standard deviation acquired after the balancing scheduling at least once
  • a first execution unit configured to perform the balance scheduling corresponding to the minimum of the second standard deviation.
  • the first execution unit is further configured to:
  • the second standard deviation of the resource usage rate of the same type of service virtual machine in each server after the next balanced scheduling is greater than or equal to the resource usage rate of the same type of service virtual machine in each server after the current balancing scheduling.
  • the second standard deviation of the second type, or the next balance scheduling if the cumulative number of the balanced scheduling exceeds the first set threshold, the second criterion for stopping the resource utilization rate of the same type of service virtual machine in each server is stopped. Poor acquisition and next balanced scheduling.
  • a distributed resource scheduling apparatus including:
  • a fifth obtaining unit configured to acquire, according to a proportion of resources of each type of service virtual machines in each server in the distributed cluster system, and a resource usage rate of each type of service virtual machine in each server, Server resource usage rate;
  • a sixth obtaining unit configured to acquire, according to the resource usage rate of each server, a third standard deviation of the resource usage rate of the distributed cluster system by using a predetermined acquisition manner, where the obtaining manner is: according to each server
  • the resource usage rate obtains the average resource usage rate of the distributed cluster system, and acquires resource usage of the distributed cluster system according to the resource usage rate of each server and the average resource usage rate of the distributed cluster system.
  • a second scheduling unit configured to: when the third standard deviation of resource usage of the distributed cluster system is greater than or equal to a scheduling threshold of resource usage of the distributed cluster system, any service in each server Virtual machine balancing is dispatched to other servers of the distributed cluster system;
  • a seventh acquiring unit configured to obtain resource usage rates of servers in the distributed cluster system after the balanced scheduling
  • An eighth obtaining unit configured to acquire, according to the resource usage rate of each server in the distributed cluster system after the balanced scheduling, the fourth standard of resource utilization rate of the distributed cluster system after the balanced scheduling by using the predetermined acquiring manner difference;
  • a second comparing unit configured to compare the fourth standard deviation acquired after the balanced scheduling at least once
  • a second execution unit configured to perform the balance scheduling corresponding to the minimum of the fourth standard deviation.
  • the second execution unit is further configured to:
  • the fourth standard deviation of the resource usage rate of the distributed cluster system after the next balanced scheduling is greater than or equal to the fourth standard deviation of the resource usage rate of the distributed cluster system after the current balancing scheduling, or the next time Balanced scheduling, after the cumulative number of times of the balanced scheduling exceeds a first set threshold, or after the service virtual machine is balancedly dispatched from any first server to any second server, any of the first servers or offices.
  • the change of the total amount of the service virtual machines in any of the second servers is greater than the second set threshold, and/or the service virtual machines occupying any of the first servers or any of the second servers If the change of the resources of any of the first servers is greater than the third set threshold, the resource usage rate acquisition and the next balanced scheduling of the distributed cluster system after the balanced scheduling are stopped.
  • the technical solution of the distributed resource scheduling method and device provided by the embodiment of the present invention is adopted according to the type of the service virtual machine in each server in the distributed cluster system, or according to the server of the various service virtual machines in each server.
  • the proportion of resources is distributed resource scheduling, which can guarantee the service quality of each service virtual machine in each server.
  • FIG. 1 is a schematic flowchart of a distributed resource scheduling method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of another distributed resource scheduling method according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of still another distributed resource scheduling method according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic flowchart diagram of still another distributed resource scheduling method according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a distributed resource scheduling apparatus according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of another distributed resource scheduling apparatus according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a distributed resource scheduling device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of another distributed resource scheduling device according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart diagram of a distributed resource scheduling method according to an embodiment of the present invention. The method includes the following steps:
  • Step S101 Obtain a resource usage rate of a service virtual machine of the same type in each server in the distributed cluster system.
  • a server cluster of virtualization or cloud computing includes multiple servers, each of which includes multiple virtual machines, which can run different types of services, called business virtual machines.
  • the DRS technology is used to allocate resources of the server cluster.
  • the system allocates certain resources to each server, and each server allocates corresponding resources to each virtual machine. Therefore, the server cluster is also called a distributed cluster system, and the resources here are Refers to central processing unit (CPU), memory, and input/output (I/O) control, storage, and input/output resources.
  • the resource usage rate of the same type of service virtual machine in each server in the distributed cluster system is obtained by acquiring a monitor in each server, and the monitor monitors the type of service virtual in the server.
  • the resource usage rate of the device is reported to the DRS, or the DRS requests the monitor to use the resource usage rate of the virtual machine of the type.
  • the number of times the resource usage rate of the service virtual machine of the type is obtained from the monitor may be one time or multiple times.
  • the resource usage rate herein may be a usage rate of a certain resource, or may be a weighted value of resource usage rates of various resources such as CPU, memory, and I/O.
  • Each of the servers in the distributed cluster system has one or more types of service virtual machines, for example, a desktop cloud virtual machine and a compiled cloud virtual machine.
  • resources of the same type of virtual machine in each server are respectively obtained according to the service type. Usage rate.
  • DRS allocates certain CPU, memory and I/O resources to the servers 1, 2 and 3 in the cluster. Each server allocates certain internal virtual machines. For CPU, memory, and I/O resources, taking CPU resource allocation as an example, DRS allocates CPU resources of number A to server 1, allocates CPU resources of quantity B to server 2, and allocates CPU resources of number C to server 3.
  • the server 1 allocates CPU resources of A1, A2, A3, and A4 to the two desktop cloud virtual machines and the two compiled cloud virtual machines respectively, and takes the resource usage rate of the desktop cloud virtual machine as an example, and two in the server 1
  • the resource utilization rate of the desktop cloud virtual machine is 30% and 40%, respectively, and the resource utilization rate of the CPU of the desktop cloud virtual machine in the server 1 is (30%*A1+40%*A2)/(A1+A2), Then calculate the total memory of the desktop cloud virtual machine in server 1 in the same way.
  • the resource usage rate of the I/O, and then the total CPU, memory, and I/O resource usage rate are weighted, and the resource usage rate of the desktop cloud virtual machine of the server 1 is obtained, and the servers 2 and 3 are obtained by analogy.
  • Resource usage of the desktop cloud virtual machine At the same time, the resource usage rate of the compiled cloud virtual machine in each server can also be obtained in the same manner.
  • Step S102 Acquire, according to a resource usage rate of the same type of service virtual machine in each server, a first standard deviation of resource usage rates of the same type of service virtual machine in each server by using a predetermined obtaining step, where the obtaining The step is: obtaining an average resource usage rate of the same type of service virtual machine in each server according to the resource usage rate of the same type of service virtual machine in each server, and according to the same type of service virtual machine in each server The resource usage rate and the average resource usage rate obtain a first standard deviation of resource usage rates of the same type of service virtual machine in each server.
  • the DRS technology is used to ensure the maximum resource utilization in the cluster. Therefore, the standard deviation between the resource usage rate of the same type of service virtual machine in each server in the cluster and the average resource usage rate of the same type of service virtual machine in each server is calculated.
  • the standard deviation is used for the degree of dispersion of the reaction data, and its calculation formula is as shown in formula (1):
  • the standard deviation acquisition step it is first necessary to obtain the average resource usage rate of the same type of service virtual machine in each server.
  • the resource usage rate of the same type of service virtual machine in each server has been obtained in step S101, and the average resource usage rate of the same type of service virtual machine in each server can be obtained according to the existing calculation manner. For example, in the previous example, if there are three servers, the resource usage rate of the same type of service virtual machine in each server is obtained and divided by the number of servers, that is, the average resource usage rate is obtained.
  • Step S103 when the first standard deviation of the resource usage rate of the same type of service virtual machine in each server is greater than or equal to the scheduling threshold of the resource usage rate of the same type of service virtual machine in each server, The same type of service virtual machine of any server in the distributed cluster system is balancedly dispatched to other servers of the distributed cluster system.
  • the system can determine whether the resource usage of the type of service virtual machine in each server is unbalanced, and the larger the standard deviation, the imbalance rate is indicated. The higher. It should be noted that, since there are multiple types of service virtual machines in each server, the standard deviation of the average resource usage rate obtained from each of the same types of service virtual machines in each server is calculated, and the standard deviation obtained is obtained. The result may be that the resource usage of one type of business virtual machine is balanced, while the resource usage of another type of business virtual machine is out of balance.
  • the scheduling is triggered when the first standard deviation of the resource usage rate of the same type of service virtual machine in each server is greater than or equal to the scheduling threshold of the resource usage rate of the same type of service virtual machine in each server.
  • the recursive scheduling process may be performed in a recursive scheduling process by balancing the same type of service virtual machines of any server in the distributed cluster system to other servers of the distributed cluster system.
  • Step S104 The resource usage rate of the same type of service virtual machine in each server in the distributed cluster system after the balanced scheduling is obtained.
  • Step S105 according to the foregoing in each server in the distributed cluster system after the balanced scheduling
  • the resource usage rate of the service virtual machine of the same type is obtained by the predetermined obtaining step, and the second standard deviation of the resource usage rate of the same type of service virtual machine in each server is obtained.
  • the impact of the scheduling virtual machine on the imbalance rate is obtained, that is, the standard deviation of the resource usage rate of the same type of service virtual machine in each server after the balanced scheduling is re-acquired.
  • the resource usage rate of the same type of service virtual machine in each server changes, firstly, the resource usage rate of the same type of service virtual machine in each server in the distributed cluster system after the balanced scheduling is obtained. Then, according to the predetermined standard deviation obtaining step, the standard deviation of the resource usage rate of the same type of service virtual machine in each server after the round balancing scheduling is obtained.
  • Step S106 Compare the second standard deviation acquired after the balanced scheduling at least once, and perform the minimum balanced scheduling corresponding to the second standard deviation.
  • a plurality of rounds of the above-mentioned balanced scheduling may be performed, and a certain policy may be used for scheduling, for example, the overloaded service virtual machine is scheduled to other servers, which is not limited in the embodiment of the present invention.
  • distributed resource scheduling is performed for the same type of service virtual machine in each server
  • distributed resource scheduling of each type of service virtual machine in each server may be separately performed, if resources of a certain type of service virtual machine The distributed resource scheduling is performed using equalization.
  • the distributed resource scheduling according to the type of the service virtual machine in each server in the distributed cluster system can ensure the service quality of each service virtual machine in each server. .
  • FIG. 2 is a schematic flowchart diagram of another distributed resource scheduling method according to an embodiment of the present invention.
  • the method is different from the previous embodiment in that step S206 is further included: if the resource usage rate of the same type of service virtual machine in each server is performed after the next balanced scheduling is performed.
  • the second standard deviation is greater than or equal to the second standard deviation of the resource usage rate of the same type of service virtual machine in each server after the current balancing scheduling, or the next balancing schedule is performed, and the cumulative number of the balanced scheduling is exceeded.
  • the threshold is set, the acquisition step and the next balanced scheduling are stopped.
  • Recursive scheduling is used to make the scheduling efficiency the highest, and the recursive exit condition is set in the recursive scheduling, that is, the second standard deviation of the resource usage rate of the same type of service virtual machine in each server after the next balanced scheduling is greater than or equal to Performing the second standard deviation of the resource usage rate of the same type of service virtual machine in each server after the current balancing scheduling, or ending the next balancing scheduling, and stopping the cumulative number of the balancing scheduling exceeding the first set threshold, then stopping The acquisition step and the next balanced scheduling are performed. This helps to stop the above acquisition steps and balance scheduling in time, obtain the minimum standard deviation, and perform the balanced scheduling corresponding to the minimum standard deviation.
  • FIG. 3 is a schematic flowchart diagram of still another distributed resource scheduling method according to an embodiment of the present invention. The method includes the following steps:
  • Step S301 Acquire resource usage of each server according to a proportion of resources of each server in each server in the distributed cluster system, and a resource usage rate of each type of service virtual machine in each server. rate.
  • each server there are one or more types of service virtual machines in each server. For example, there are desktop cloud virtual machines and compiled cloud virtual machines. DRS allocates certain operations, storage, and input/output to each server in the cluster. Resources, each server allocates the resources it obtains to its internal types of business virtual machines in a certain proportion. Ensure that the total amount and proportion of resources of different types of service virtual machines in each server remain stable, and the service quality of various service virtual machines in each server can be guaranteed.
  • the DRS allocates certain CPU, memory, and I/O resources to the servers 1, 2, and 3 in the cluster. Each server allocates a certain CPU to each internal virtual machine. For example, the CPU and the I/O resources are allocated to the CPU 1 by the DRS. The DRS allocates the CPU resources of the number A to the server 1 and allocates the quantity B to the server 2. CPU resources are allocated to the server 3 with a CPU resource of C.
  • the server 1 allocates CPU resources of A1, A2, A3, and A4 to the two desktop cloud virtual machines and the two compiled cloud virtual machines respectively.
  • the resource utilization rate of the desktop cloud virtual machine is 30% and 40% respectively, and the resource utilization rates of the two compiled cloud virtual machines in the server 1 are 40% and 50%, respectively, and the resource utilization rate of the CPU of the server 1 is obtained ( 30%*A1+40%*A2+40%*A3+50%A4)/(A1+A2+A3+A4), and then calculate the memory and I/ of each type of virtual machine in server 1 in the same way.
  • the resource usage rate of O is weighted by the CPU, memory, and I/O resource usage of the server 1, and the resource usage rate of the server 1 is obtained, and the calculations of the servers 2 and 3 are deduced by analogy.
  • Step S302 Obtain a third standard deviation of the resource usage rate of the distributed cluster system by using a predetermined acquisition step according to the resource usage rate of each server, where the obtaining step is: according to the resource usage rate of each server Acquiring an average resource usage rate of the distributed cluster system, and acquiring a third resource utilization rate of the distributed cluster system according to the resource usage rate of each server and the average resource usage rate of the distributed cluster system. Standard deviation.
  • the difference from the foregoing embodiment is that, for all kinds of service virtual machines in each server, the resource usage rate of each server and the average resource usage rate of the entire distributed cluster system are obtained in the same manner as the foregoing embodiment, and then According to formula (1), the standard deviation of resource utilization rate of the distributed cluster system is obtained.
  • Step S303 when the third standard deviation of the resource usage rate of the distributed cluster system is greater than or equal to the scheduling threshold of the resource usage rate of the distributed cluster system, balance scheduling of any service virtual machine in each server. To other servers in the distributed cluster system.
  • the scheduling threshold of the system's resource usage triggers balanced scheduling.
  • the object of balanced scheduling can be any business virtual machine in each server.
  • Step S304 the resource usage rate of each server in the distributed cluster system after the balanced scheduling is obtained.
  • Step S305 According to the resource usage rate of each server in the distributed cluster system after the balanced scheduling, obtain the fourth standard deviation of the resource usage rate of the distributed cluster system after the balanced scheduling by using the predetermined obtaining step.
  • Step S306 comparing the fourth standard deviation acquired after the balanced scheduling at least once, and performing the minimum balanced scheduling corresponding to the fourth standard deviation.
  • Step S304-step S306 is similar to step S104-step S106 of the foregoing embodiment, and is not described here again. The difference is that, for each type of service virtual machine in each server, the obtained distributed cluster system is obtained. The standard deviation of resource usage.
  • distributed resource scheduling can be performed according to the ratio of the resources of the servers in which the various service virtual machines occupy the server, so that the services of the service virtual machines in each server can be guaranteed. quality.
  • FIG. 4 is a schematic flowchart diagram of still another distributed resource scheduling method according to an embodiment of the present invention.
  • the method is different from the previous embodiment in that step S406 is further included: the fourth standard deviation of the resource usage rate of the distributed cluster system after the next balanced scheduling is greater than or equal to the distribution after the current balancing scheduling is performed.
  • the total amount of the various service virtual machines in any one of the first servers or any of the second servers is greater than a second set threshold, and/or any of the first If the change of the resources of the first service server of the server or the any of the second servers is greater than the third set threshold, the obtaining step and the next balanced scheduling are stopped.
  • Recursive scheduling can be used to make the scheduling efficiency the highest, and the recursive exit condition is set in the recursive scheduling. That is, after the next balanced scheduling, the fourth standard deviation of the resource usage rate of the distributed cluster system is greater than or equal to the current balancing scheduling.
  • the server balances the scheduling to any of the second servers the total amount of the various service virtual machines in any one of the first servers or any of the second servers is greater than a second set threshold, and/or the Stopping the obtaining step and the next balancing when the change of the resources of the first server or the any of the second servers in the first server is greater than the third set threshold.
  • Scheduling This helps to stop the above acquisition steps and balance scheduling in time, to obtain the minimum standard deviation, and to perform the minimum The standard deviation corresponds to the balanced scheduling.
  • FIG. 5 is a schematic structural diagram of a distributed resource scheduling apparatus according to an embodiment of the present invention.
  • the device 1000 includes:
  • the first obtaining unit 11 is configured to acquire resource usage rates of the same type of service virtual machines in each server in the distributed cluster system.
  • a server cluster of virtualization or cloud computing includes multiple servers, each of which includes multiple virtual machines, which can run different types of services, called business virtual machines.
  • the DRS technology is used to allocate resources of the server cluster.
  • the system allocates certain resources to each server, and each server allocates corresponding resources to each virtual machine. Therefore, the server cluster is also called a distributed cluster system, and the resources here are Refers to central processing unit (CPU), memory, and input/output (I/O) control, storage, and input/output resources.
  • the first obtaining unit 11 obtains the resource usage rate of the same type of service virtual machine in each server in the distributed cluster system, and the obtaining manner may be: setting a monitor in each server, and the monitor monitoring the type of service virtual in the server
  • the resource usage rate of the device is reported to the DRS, or the DRS requests the monitor to use the resource usage rate of the virtual machine of the type.
  • the number of times the resource usage rate of the service virtual machine of the type is obtained from the monitor may be one time or multiple times.
  • the resource usage rate herein may be a usage rate of a certain resource, or may be a weighted value of resource usage rates of various resources such as CPU, memory, and I/O.
  • Each of the servers in the distributed cluster system has one or more types of service virtual machines, for example, a desktop cloud virtual machine and a compiled cloud virtual machine.
  • resources of the same type of virtual machine in each server are respectively obtained according to the service type. Usage rate.
  • DRS allocates certain CPU, memory and I/O resources to the servers 1, 2 and 3 in the cluster. Each server allocates certain internal virtual machines. CPU, memory, and I/O resources. Taking CPU resource allocation as an example, DRS allocates CPU resources of number A to server 1, and allocates the number of servers to server 2.
  • the resource usage rate of the cloud virtual machine in the server 1 is 30% and 40% respectively, and the resource utilization rate of the CPU of the desktop cloud virtual machine in the server 1 is obtained (30%). *A1+40%*A2)/(A1+A2), and then calculate the total memory and I/O resource usage rate of the desktop cloud virtual machine in server 1 in the same way, and then the total CPU and memory.
  • the resource usage rate of the I/O is weighted, the resource usage rate of the desktop cloud virtual machine of the server 1 is obtained, and the resource usage rate of the desktop cloud virtual machine of the servers 2 and 3 is obtained by analogy.
  • the resource usage rate of the compiled cloud virtual machine in each server can also be obtained in the same manner.
  • the second obtaining unit 12 is configured to acquire, according to a resource usage rate of the same type of service virtual machine in each server, a first standard of resource utilization rate of the same type of service virtual machine in each server by using a predetermined acquisition manner.
  • the obtaining manner is: obtaining an average resource usage rate of the same type of service virtual machine in each server according to a resource usage rate of the same type of service virtual machine in each server, and according to the The resource usage rate of the same type of service virtual machine and the average resource usage rate obtain the first standard deviation of the resource usage rate of the same type of service virtual machine in each server.
  • the second obtaining unit 12 obtains the resource usage rate of the same type of service virtual machine in each server in the cluster and the average resource usage of the same type of service virtual machine in each server.
  • the standard deviation of the rate, the standard deviation is used for the degree of dispersion of the reaction data, and the calculation formula is as shown in the formula (1).
  • the second obtaining unit 12 first needs to obtain the average resource usage rate of the same type of service virtual machine in each server.
  • the first obtaining unit 11 has acquired the resource usage rate of the same type of service virtual machine in each server, and the second obtaining unit 12 can obtain the average resource usage rate of the same type of service virtual machine in each server according to the existing calculation manner. For example, in the previous example, if there are three servers, the resource usage rate of the same type of service virtual machine in each server is obtained and divided by the number of servers, that is, the average resource usage rate is obtained.
  • the second obtaining unit 12 obtains the same type of service virtuality in each server according to formula (1).
  • the first scheduling unit 13 is configured to: when a first standard deviation of resource usage rates of the same type of service virtual machines in the servers is greater than or equal to a scheduling threshold of resource usage rates of the same type of service virtual machines in the servers The same type of service virtual machine of any one of the servers in the distributed cluster system is balancedly dispatched to other servers of the distributed cluster system.
  • the system can determine whether the resource usage of the type of service virtual machine in each server is unbalanced, and the larger the standard deviation, the imbalance rate is indicated. The higher. It should be noted that, since there are multiple types of service virtual machines in each server, the standard deviation of the average resource usage rate obtained from each of the same types of service virtual machines in each server is calculated, and the standard deviation obtained is obtained. The result may be that the resource usage of one type of business virtual machine is balanced, while the resource usage of another type of business virtual machine is out of balance.
  • the first scheduling unit 13 triggers Scheduling.
  • the recursive scheduling process may be performed in a recursive scheduling process by balancing the same type of service virtual machines of any server in the distributed cluster system to other servers of the distributed cluster system.
  • the third obtaining unit 14 is configured to obtain resource usage rates of the same type of service virtual machines in each server in the distributed cluster system after the balanced scheduling.
  • the fourth obtaining unit 15 is configured to acquire, according to the resource usage rate of the same type of service virtual machine in each server in the distributed cluster system, the same acquisition manner to obtain the same in each server.
  • the fourth obtaining unit 15 acquires the influence of the scheduling virtual machine on the imbalance rate, that is, the fourth obtaining unit 15 re-acquires the standard deviation of the resource usage rate of the same type of service virtual machine in each server after the balanced scheduling.
  • the resource usage rate of the same type of service virtual machine in each server changes.
  • the third obtaining unit 14 acquires the same type of service virtuality in each server in the distributed cluster system after the balanced scheduling.
  • the resource usage rate of the machine, and then the fourth obtaining unit 15 acquires the same in each server after the round balance scheduling according to the predetermined standard deviation acquisition manner.
  • a first comparing unit 16 configured to compare the second standard deviation acquired after the balancing scheduling at least once
  • the first executing unit 17 is configured to perform the balance scheduling corresponding to the minimum of the second standard deviation.
  • a plurality of rounds of the above-mentioned balanced scheduling may be performed, and a certain policy may be used for scheduling, for example, the overloaded service virtual machine is scheduled to other servers, which is not limited in the embodiment of the present invention.
  • the first execution unit 17 finally performs the balanced scheduling corresponding to the minimum standard deviation, that is, the balanced scheduling for obtaining the minimum standard deviation is to which one or which virtual machines are scheduled to which server or servers, and the balanced scheduling is performed. .
  • distributed resource scheduling is performed for the same type of service virtual machine in each server
  • distributed resource scheduling of each type of service virtual machine in each server may be separately performed, if resources of a certain type of service virtual machine The distributed resource scheduling is performed using equalization.
  • a distributed resource scheduling apparatus can ensure the service quality of each service virtual machine in each server by performing distributed resource scheduling according to the type of the service virtual machine in each server in the distributed cluster system. .
  • the first execution unit 17 may be further configured to: after performing the next balanced scheduling, the second standard deviation of the resource usage rate of the same type of service virtual machine in each server is greater than or equal to the current balance scheduling And stopping, according to the second standard deviation of the resource usage rate of the same type of service virtual machine in each server, or ending the next balanced scheduling, if the cumulative number of the balanced scheduling exceeds the first set threshold, stopping executing the servers The acquisition of the second standard deviation of the resource usage rate of the same type of service virtual machine and the next balanced scheduling.
  • Recursive scheduling can be used to make the scheduling efficiency the highest, and the recursive exit condition is set in the recursive scheduling, that is, if the same type of service virtual machine in each server is used after the next balanced scheduling
  • the second standard deviation of the resource usage rate is greater than or equal to the second standard deviation of the resource usage rate of the same type of service virtual machine in each server after the current balancing scheduling, or the next balancing scheduling is performed, and the balanced scheduling is performed.
  • the first execution unit 17 stops performing the acquisition of the second standard deviation of the resource usage rate of the same type of service virtual machine in each server and the next balanced scheduling. This helps to stop the above acquisition steps and balance scheduling in time, obtain the minimum standard deviation, and perform the balanced scheduling corresponding to the minimum standard deviation.
  • FIG. 6 is a schematic structural diagram of another distributed resource scheduling apparatus according to an embodiment of the present invention.
  • the device 2000 includes:
  • the fifth obtaining unit 21 is configured to obtain, according to a proportion of resources of each type of service virtual machines in each server in the distributed cluster system, and a resource usage rate of each type of service virtual machine in each server, Resource usage of each server.
  • each server there are one or more types of service virtual machines in each server. For example, there are desktop cloud virtual machines and compiled cloud virtual machines. DRS allocates certain operations, storage, and input/output to each server in the cluster. Resources, each server allocates the resources it obtains to its internal types of business virtual machines in a certain proportion. Ensure that the total amount and proportion of resources of different types of service virtual machines in each server remain stable, and the service quality of various service virtual machines in each server can be guaranteed.
  • the DRS allocates certain CPU, memory, and I/O resources to the servers 1, 2, and 3 in the cluster. Each server allocates a certain CPU to each internal virtual machine. For example, the memory resource and the I/O resource are allocated to the server 1 by the CPU resource allocation.
  • the DRS allocates the CPU resource of the number A to the server 1, the CPU resource of the quantity B to the server 2, and the CPU resource of the number C to the server 3.
  • the resource utilization rates of the two desktop cloud virtual machines in server 1 are 30% and 40 respectively.
  • the resource usage rate of the two compiled cloud virtual machines in the server 1 is 40% and 50%, respectively, and the resource utilization rate of the CPU of the server 1 is obtained (30%*A1+40%*A2+).
  • the sixth obtaining unit 22 is configured to acquire, according to the resource usage rate of each server, a third standard deviation of the resource usage rate of the distributed cluster system by using a predetermined acquisition manner, where the obtaining step is: according to the foregoing
  • the resource usage rate of the server acquires the average resource usage rate of the distributed cluster system, and acquires the resources of the distributed cluster system according to the resource usage rate of each server and the average resource usage rate of the distributed cluster system.
  • the third standard deviation of usage is configured to acquire, according to the resource usage rate of each server, a third standard deviation of the resource usage rate of the distributed cluster system by using a predetermined acquisition manner, where the obtaining step is: according to the foregoing
  • the resource usage rate of the server acquires the average resource usage rate of the distributed cluster system, and acquires the resources of the distributed cluster system according to the resource usage rate of each server and the average resource usage rate of the distributed cluster system.
  • the third standard deviation of usage is: according to the foregoing
  • the difference from the foregoing embodiment is that, for all kinds of service virtual machines in each server, the resource usage rate of each server and the average resource usage rate of the entire distributed cluster system are obtained in the same manner as the foregoing embodiment, and then The sixth obtaining unit 22 obtains the standard deviation of the resource usage rate of the distributed cluster system according to the formula (1).
  • a second scheduling unit 23 configured to: when the third standard deviation of resource usage of the distributed cluster system is greater than or equal to a scheduling threshold of resource usage of the distributed cluster system, The business virtual machine is balancedly dispatched to other servers of the distributed cluster system.
  • the scheduling threshold of the resource usage rate of the system the second scheduling unit 23 triggers the balancing scheduling.
  • the object of balanced scheduling can be any business virtual machine in each server.
  • the seventh obtaining unit 24 is configured to obtain resource usage rates of servers in the distributed cluster system after the balanced scheduling.
  • the eighth obtaining unit 25 is configured to acquire, according to the resource usage rate of each server in the distributed cluster system after the balanced scheduling, the fourth resource usage rate of the distributed cluster system after the balanced scheduling by using the predetermined acquiring manner Standard deviation.
  • a second comparison unit 26 configured to compare the fourth standard deviation acquired after the balance scheduling at least once
  • the second executing unit 27 is configured to perform the balance scheduling corresponding to the minimum of the fourth standard deviation.
  • the functions of the seventh obtaining unit 24, the eighth obtaining unit 25, the second comparing unit 26, and the second executing unit 27 are respectively the third obtaining unit 14, the fourth obtaining unit 15, the first comparing unit 16, and the third embodiment of the foregoing embodiment.
  • the function of an execution unit 17 is similar, and is not described here again. The difference is that for each type of service virtual machine in each server, the standard deviation of the resource usage rate of the distributed cluster system is obtained.
  • the distributed resource scheduling apparatus can ensure the service of each service virtual machine in each server by performing distributed resource scheduling according to the proportion of the resources of the servers in which the various service virtual machines occupy the server. quality.
  • the second execution unit 27 is further configured to: after the next balanced scheduling, the fourth standard deviation of the resource usage rate of the distributed cluster system is greater than or equal to the distributed after the current balancing scheduling
  • the resource usage rate of the distributed cluster system after the balancing scheduling is stopped after the change of the resources of the any one of the first server in the second server is greater than the third set threshold. Acquisition and next balanced scheduling.
  • Recursive scheduling can be used to make the scheduling efficiency the highest, and the recursive exit condition is set in the recursive scheduling. That is, after the next balanced scheduling, the fourth standard deviation of the resource usage rate of the distributed cluster system is greater than or equal to the current balancing scheduling.
  • the server balances the scheduling to any of the second servers the total amount of the various service virtual machines in any one of the first servers or any of the second servers is greater than a second set threshold, and/or the A variety of service virtual machines in a first server or any of the second servers account for a large change in resources of any of the first servers
  • the second executing unit 27 stops acquiring the resource usage rate of the distributed cluster system and the next balanced scheduling after the balancing scheduling. This helps to stop the above acquisition steps and balance scheduling in time, obtain the minimum standard deviation, and perform the balanced scheduling corresponding to the minimum standard deviation.
  • FIG. 7 is a schematic structural diagram of a distributed resource scheduling device according to an embodiment of the present invention.
  • the device 3000 of the embodiment includes a processor 31, a memory 32, an input device 33, an output device 34, and a bus system 35. :
  • the processor 31 controls the operation of the device 3000, which may also be referred to as a Central Processing Unit (CPU).
  • Processor 31 may be an integrated circuit chip with signal processing capabilities.
  • the processor 31 can also be a general-purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or the like. Programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • Memory 32 can include read only memory and random access memory and provides instructions and data to processor 31. A portion of memory 32 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • bus system 35 which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc.
  • ISA Industry Standard Architecture
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the bus may be one or more physical lines, and when it is a plurality of physical lines, it may be divided into an address bus, a data bus, a control bus, and the like.
  • the processor 31, the memory 32, and the input device 33 and the output device 34 may also be directly connected through a communication line.
  • the input device 33 can be implemented as a mouse, a keyboard, a microphone, etc.
  • the output device 34 can be embodied as a display, an audio device, and a video device.
  • the input device 33 and the output device 34 can also implement their functions through an input and output device, such as being made touchable. screen.
  • the processor 31 reads the computer program in the memory 32 to perform the following steps:
  • obtaining according to the resource usage rate of the service virtual machine of the same type in each server, a first standard deviation of the resource usage rate of the same type of service virtual machine in each server by using a predetermined obtaining step, where the obtaining step is: Acquiring an average resource usage rate of the same type of service virtual machine in each server according to the resource usage rate of the same type of service virtual machine in each server, and according to resource usage of the same type of service virtual machine in each server Rate and the average resource usage rate, obtaining a first standard deviation of resource usage rates of the same type of service virtual machine in each server;
  • the distributed cluster is The same type of service virtual machine of any server in the system is balancedly dispatched to other servers of the distributed cluster system;
  • the processor 31 performs the minimum standard deviation of the second standard deviation corresponding to the second standard deviation obtained after performing the balancing scheduling at least once. , also perform the following steps:
  • the second standard deviation of the resource usage rate of the same type of service virtual machine in each server after the next balanced scheduling is greater than or equal to the resource usage rate of the same type of service virtual machine in each server after the current balancing scheduling.
  • the second standard deviation, or the next balance scheduling if the cumulative number of the balanced scheduling exceeds the first set threshold, the execution of the obtaining step is stopped. The next balance is scheduled.
  • the computer program included in the processor 31 provided by the embodiment of the present invention may also be implemented as a first acquiring unit, a second acquiring unit, a first scheduling unit, a third acquiring unit, a fourth acquiring unit, a first comparing unit, and the first Executing units, the functions implemented by these units may be referred to the foregoing embodiments, and are not described herein again.
  • the distributed resource scheduling device can ensure the service quality of each service virtual machine in each server by performing distributed resource scheduling according to the type of the service virtual machine in each server in the distributed cluster system. .
  • FIG. 8 is a schematic structural diagram of another distributed resource scheduling device according to an embodiment of the present invention.
  • the device 4000 of the embodiment includes a processor 41, a memory 42, an input device 43, an output device 44, and a bus system 45. among them:
  • the processor 41 controls the operation of the device 4000, which may also be referred to as a Central Processing Unit (CPU).
  • Processor 41 may be an integrated circuit chip with signal processing capabilities.
  • the processor 41 can also be a general-purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or the like. Programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • Memory 42 may include read only memory and random access memory and provides instructions and data to processor 41. A portion of the memory 42 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • bus system 45 which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc.
  • the bus may be one or more physical lines, and when it is a plurality of physical lines, it may be divided into an address bus, a data bus, a control bus, and the like.
  • the processor 41, the memory 42 and the input The incoming device 43 and the output device 44 can also be directly connected via a communication line.
  • the input device 43 can be implemented as a mouse, a keyboard, a microphone, etc.
  • the output device 44 can be embodied as a display, an audio device, and a video device.
  • the input device 43 and the output device 44 can also implement their functions through an input and output device, such as a touchable screen.
  • the processor 41 reads the computer program in the memory 42 to perform the following steps:
  • obtaining step is: acquiring the resource usage rate according to the resource usage of each server The average resource usage of the distributed cluster system, and the first standard deviation of the resource usage rate of the distributed cluster system is obtained according to the resource usage rate of each server and the average resource usage rate of the distributed cluster system;
  • the processor 41 before the step of comparing the second standard deviation acquired after the balance scheduling is performed at least once, performs the step of balancing the balance corresponding to the second standard deviation. Also perform the following steps:
  • the cumulative number of times the balanced scheduling is performed exceeds After setting the threshold, or balancing the service virtual machine from any first server to any second server, the service virtual machine of any one of the first server or any of the second servers.
  • the change of the total amount is greater than the second set threshold, and/or the change of the resources of the first server or the any of the second servers in the service virtual machine of any one of the first servers is greater than
  • the threshold is set third, the obtaining step and the next balanced scheduling are stopped.
  • the computer program included in the processor 41 provided by the embodiment of the present invention may also be implemented as a fifth obtaining unit, a sixth obtaining unit, a second scheduling unit, a seventh obtaining unit, an eighth obtaining unit, a second comparing unit, and a second Executing units, the functions implemented by these units may be referred to the foregoing embodiments, and are not described herein again.
  • the distributed resource scheduling device can ensure the service of each service virtual machine in each server by performing distributed resource scheduling according to the proportion of the resources of the servers in which the various service virtual machines occupy the server. quality.
  • Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
  • a storage medium may be any available media that can be accessed by a computer.
  • the computer readable medium may include a random access memory (RAM), a read-only memory (ROM), and an electrically erasable programmable read-only memory (Electrically Erasable Programmable).
  • EEPROM Electrically erasable programmable read-only memory
  • CD-ROM Compact Disc Read-Only Memory
  • Any connection may suitably be a computer readable medium.
  • the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, Then coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, wireless and microwave are included in the fixing of the associated medium.
  • DSL Digital Subscriber Line
  • a disk and a disc include a compact disc (CD), a laser disc, a compact disc, a digital versatile disc (DVD), a floppy disk, and a Blu-ray disc, wherein the disc is usually magnetically copied, and the disc is The laser is used to optically replicate the data. Combinations of the above should also be included within the scope of the computer readable media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种分布式资源调度方法及装置。该方法包括:按照预定的获取步骤获取分布式集群***中各服务器内的同一类型业务虚拟机的资源使用率的第一标准差,当该第一标准差大于或等于调度阈值时,将分布式集群***中任一服务器的同一类型业务虚拟机平衡调度至分布式集群***的其他服务器中,重新按照预定的获取步骤获取平衡调度后的各服务器内的同一类型业务虚拟机的资源使用率的第二标准差,比较至少一次平衡调度后获取的第二标准差,执行最小的第二标准差对应的平衡调度。通过按照分布式集群***中各服务器内业务虚拟机的类型,或按照各服务器内各类业务虚拟机占所在服务器的资源比例进行分布式资源调度,可以保证各服务器内各业务虚拟机的服务质量。

Description

一种分布式资源调度方法及装置
本申请要求于2013年12月31日提交中国专利局、申请号为201310751965.X、发明名称为“一种分布式资源调度方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及资源调度技术,尤其涉及一种分布式资源调度方法及装置。
背景技术
在虚拟化或云计算的解决方案里,服务器集群中的每个服务器一般包括运行不同类型业务的多个虚拟机,当不同类型的业务部署在同一个服务器即计算节点时,比如一个计算节点同时有桌面云虚拟机和编译业务虚拟机,需要考虑如何保证各自的服务质量,确保各虚拟机的资源占用不相互干扰,并能最大化的利用集群资源。
在现有技术中,采用服务质量技术(Quality of Service,QoS)保证同一个计算节点不同类型业务的服务质量,它要求不同类型虚拟机的总量和比例保持稳定,比如一个计算节点有40个虚拟机,其中桌面云虚拟机15个,编译云虚拟机25个,通过设置虚拟机份额高、中、低,确保高份额的虚拟机获取相当份额的资源;采用分布式资源调度程序(Distributed Resource Scheduler,DRS),使集群内的资源利用率最大化,比如,DRS将重载的虚拟机迁移到负载低的服务器中,此时重载虚拟机的资源占用率得到了改善,同时原服务器其它虚拟机的资源占用率也得到了改善,集群整体的资源占用率得到了提升。
然而,启动DRS后,若虚拟机迁移至其它的服务器,则会使服务器内的不同类型的业务虚拟机比例失衡,从而,启动DRS后,如何保证各服务 器内各业务虚拟机的服务质量是目前迫切需要解决的问题。
发明内容
本发明实施例提供了一种分布式资源调度方法及装置,可以在分布式资源调度时,保证各服务器内各业务虚拟机的服务质量。
第一方面,提供了一种分布式资源调度方法,包括:
获取分布式集群***中各服务器内的同一类型业务虚拟机的资源使用率;
根据所述各服务器内的同一类型业务虚拟机的资源使用率,通过预定的获取步骤获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差,所述获取步骤为:根据所述各服务器内的同一类型业务虚拟机的资源使用率获取所述各服务器内的同一类型业务虚拟机的平均资源使用率,并根据所述各服务器内的同一类型业务虚拟机的资源使用率以及所述平均资源使用率,获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差;
当所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差大于或等于所述各服务器内的同一类型业务虚拟机的资源使用率的调度阈值时,将所述分布式集群***中任一服务器的所述同一类型业务虚拟机平衡调度至分布式集群***的其他服务器中;
获取平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率;
根据所述平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率,通过所述预定的获取步骤获取所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差;
比较至少一次所述平衡调度后获取的所述第二标准差,执行最小的所述第二标准差对应的所述平衡调度。
在第一种可能的实现方式中,所述比较至少一次所述平衡调度后获取的所述第二标准差,执行最小的所述第二标准差对应的所述平衡调度之前,所述方法还包括:
若进行下一次平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差大于或等于进行当前平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,则停止执行所述获取步骤及下一次的平衡调度。
第二方面,提供了一种分布式资源调度方法,包括:
根据分布式集群***中各服务器内各类业务虚拟机占所述各服务器的资源的比例和所述各服务器内各类业务虚拟机的资源使用率,获取所述各服务器的资源使用率;
根据所述各服务器的资源使用率,通过预定的获取步骤获取所述分布式集群***的资源使用率的第三标准差,所述获取步骤为:根据所述各服务器的资源使用率获取所述分布式集群***的平均资源使用率,并根据所述各服务器的资源使用率以及所述分布式集群***的平均资源使用率,获取所述分布式集群***的资源使用率的第三标准差;
当所述分布式集群***的资源使用率的第三标准差大于或等于所述分布式集群***的资源使用率的调度阈值时,将所述各服务器内任一业务虚拟机平衡调度至所述分布式集群***的其他服务器中;
获取平衡调度后分布式集群***中各服务器的资源使用率;
根据所述平衡调度后分布式集群***中各服务器的资源使用率,通过所述预定的获取步骤获取所述平衡调度后分布式集群***的资源使用率的第四标准差;
比较至少一次所述平衡调度后获取的所述第四标准差,执行最小的所述第四标准差对应的所述平衡调度。
在第一种可能的实现方式中,所述比较至少一次所述平衡调度后获取的所述第四标准差,执行最小的所述第四标准差对应的所述平衡调度之前,所述方法还包括:
若进行下一次平衡调度后所述分布式集群***的资源使用率的第四标准差大于或等于进行当前平衡调度后所述分布式集群***的资源使用率的 第四标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,或将所述业务虚拟机从任一第一服务器平衡调度至任一第二服务器后,所述任一第一服务器或所述任一第二服务器中各类业务虚拟机的总量的变化大于第二设定阈值,和/或所述任一第一服务器或所述任一第二服务器中各类业务虚拟机占所述任一第一服务器的资源的的变化大于第三设定阈值,则停止执行所述获取步骤及下一次的平衡调度。
第三方面,提供了一种分布式资源调度装置,包括:
第一获取单元,用于获取分布式集群***中各服务器内的同一类型业务虚拟机的资源使用率;
第二获取单元,用于根据所述各服务器内的同一类型业务虚拟机的资源使用率,通过预定的获取方式获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差,所述获取方式为:根据所述各服务器内的同一类型业务虚拟机的资源使用率获取所述各服务器内的同一类型业务虚拟机的平均资源使用率,并根据所述各服务器内的同一类型业务虚拟机的资源使用率以及所述平均资源使用率,获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差;
第一调度单元,用于当所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差大于或等于所述各服务器内的同一类型业务虚拟机的资源使用率的调度阈值时,将所述分布式集群***中任一服务器的所述同一类型业务虚拟机平衡调度至分布式集群***的其他服务器中;
第三获取单元,用于获取平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率;
第四获取单元,用于根据所述平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率,通过所述预定的获取方式获取所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差;
第一比较单元,用于比较至少一次所述平衡调度后获取的所述第二标准差;
第一执行单元,用于执行最小的所述第二标准差对应的所述平衡调度。
在第一种可能的实现方式中,所述第一执行单元还用于:
若进行下一次平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差大于或等于进行当前平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,则停止执行所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差的获取及下一次的平衡调度。
第四方面,提供了一种分布式资源调度装置,包括:
第五获取单元,用于根据分布式集群***中各服务器内各类业务虚拟机占所述各服务器的资源的比例和所述各服务器内各类业务虚拟机的资源使用率,获取所述各服务器的资源使用率;
第六获取单元,用于根据所述各服务器的资源使用率,通过预定的获取方式获取所述分布式集群***的资源使用率的第三标准差,所述获取方式为:根据所述各服务器的资源使用率获取所述分布式集群***的平均资源使用率,并根据所述各服务器的资源使用率以及所述分布式集群***的平均资源使用率,获取所述分布式集群***的资源使用率的第三标准差;
第二调度单元,用于当所述分布式集群***的资源使用率的第三标准差大于或等于所述分布式集群***的资源使用率的调度阈值时,将所述各服务器内任一业务虚拟机平衡调度至所述分布式集群***的其他服务器中;
第七获取单元,用于获取平衡调度后分布式集群***中各服务器的资源使用率;
第八获取单元,用于根据所述平衡调度后分布式集群***中各服务器的资源使用率,通过所述预定的获取方式获取所述平衡调度后分布式集群***的资源使用率的第四标准差;
第二比较单元,用于比较至少一次所述平衡调度后获取的所述第四标准差;
第二执行单元,用于执行最小的所述第四标准差对应的所述平衡调度。
在第一种可能的实现方式中,所述第二执行单元还用于:
若进行下一次平衡调度后所述分布式集群***的资源使用率的第四标准差大于或等于进行当前平衡调度后所述分布式集群***的资源使用率的第四标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,或将所述业务虚拟机从任一第一服务器平衡调度至任一第二服务器后,所述任一第一服务器或所述任一第二服务器中各类业务虚拟机的总量的变化大于第二设定阈值,和/或所述任一第一服务器或所述任一第二服务器中各类业务虚拟机占所述任一第一服务器的资源的的变化大于第三设定阈值,则停止执行所述平衡调度后分布式集群***的资源使用率的获取及下一次的平衡调度。
采用本发明实施例提供的一种分布式资源调度方法及装置的技术方案,通过按照分布式集群***中各服务器内业务虚拟机的类型,或按照各服务器内各类业务虚拟机占所在服务器的资源比例进行分布式资源调度,可以保证各服务器内各业务虚拟机的服务质量。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种分布式资源调度方法的流程示意图;
图2为本发明实施例提供的另一种分布式资源调度方法的流程示意图;
图3为本发明实施例提供的又一种分布式资源调度方法的流程示意图;
图4为本发明实施例提供的又一种分布式资源调度方法的流程示意图;
图5为本发明实施例提供的一种分布式资源调度装置的结构示意图;
图6为本发明实施例提供的另一种分布式资源调度装置的结构示意图;
图7为本发明实施例提供的一种分布式资源调度设备的结构示意图;
图8为本发明实施例提供的另一种分布式资源调度设备的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参阅图1,为本发明实施例提供的一种分布式资源调度方法的流程示意图。该方法包括以下步骤:
步骤S101,获取分布式集群***中各服务器内的同一类型业务虚拟机的资源使用率。
在虚拟化或云计算的服务器集群中包括有多个服务器,每个服务器中又包括多个虚拟机,这多个虚拟机可以运行不同类型的业务,称为业务虚拟机。采用DRS技术对服务器集群的资源进行分配,***给每个服务器分配一定的资源,每个服务器又给其各虚拟机分配相应的资源,因此该服务器集群又称为分布式集群***,这里的资源指中央处理器(Central Processing Unit,CPU)、内存和输入/输出(Input/Output,I/O)等控制、存储和输入/输出资源。
在本步骤中,获取分布式集群***中各服务器内的同一类型业务虚拟机的资源使用率,获取的方式可以为:在每个服务器中设置监控器,监控器监控该服务器内该类型业务虚拟机的资源使用率,并上报给DRS,或者DRS向监控器请求该类型虚拟机的资源使用率,从监控器获取该类型业务虚拟机的资源使用率的次数可以为一次,也可以为多次。这里的资源使用率可以是某一种资源的使用率,也可以是各种资源例如CPU、内存和I/O等的资源使用率的加权值。
分布式集群***中各服务器内有一种或多种类型的业务虚拟机,例如,有桌面云虚拟机和编译云虚拟机,本实施例根据业务类型分别获取各服务器内同一类型的虚拟机的资源使用率。
例如,集群内有三个服务器,服务器1内有桌面云虚拟机2个、编译云虚拟机2个,服务器2内有桌面云虚拟机3个、编译云虚拟机2个,服务器3内有桌面云虚拟机1个、编译云虚拟机2个,DRS给集群内的服务器1、2、3分别分配一定的CPU、内存和I/O资源,各个服务器又给其内部的各类型的虚拟机分配一定的CPU、内存和I/O资源,以CPU资源分配为例,DRS给服务器1分配数量为A的CPU资源,给服务器2分配数量为B的CPU资源,给服务器3分配数量为C的CPU资源,服务器1给其内的2个桌面云虚拟机和2个编译云虚拟机分别分配A1、A2、A3和A4的CPU资源,以桌面云虚拟机的资源使用率为例,服务器1内2个桌面云虚拟机的资源使用率分别为30%和40%,则得到服务器1内桌面云虚拟机的CPU的资源使用率为(30%*A1+40%*A2)/(A1+A2),然后再以同样的方式分别计算服务器1内桌面云虚拟机的总的内存和I/O的资源使用率,再将总的CPU、内存和I/O的资源使用率进行加权计算,得到服务器1的桌面云虚拟机的资源使用率,以此类推获取服务器2和3的桌面云虚拟机的资源使用率。同时,还可以按照同样的方式获取各服务器内编译云虚拟机的资源使用率。
步骤S102,根据所述各服务器内的同一类型业务虚拟机的资源使用率,通过预定的获取步骤获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差,所述获取步骤为:根据所述各服务器内的同一类型业务虚拟机的资源使用率获取所述各服务器内的同一类型业务虚拟机的平均资源使用率,并根据所述各服务器内的同一类型业务虚拟机的资源使用率以及所述平均资源使用率,获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差。
采用DRS技术保证集群内的资源利用率最大化,因此,计算集群内各个服务器内的同一类型业务虚拟机的资源使用率与各个服务器内的同一类型业务虚拟机的平均资源使用率的标准差,标准差用于反应数据的离散程度,其计算公式如公式(1)所示:
Figure PCTCN2014089636-appb-000001
在公式(1)中,xi是各个服务器内的同一类型业务虚拟机的资源使用率; μ是各个服务器内的同一类型业务虚拟机的平均资源使用率,N是集群中的服务器个数,σ为标准差。
根据标准差的获取步骤,首先需要获取各个服务器内的同一类型业务虚拟机的平均资源使用率。在步骤S101中已经获取各个服务器内的同一类型业务虚拟机的资源使用率,可以根据现有的计算方式获取各个服务器内的同一类型业务虚拟机的平均资源使用率。例如前面的示例中,有三个服务器,则将获取的各服务器内同一类型业务虚拟机的资源使用率取和再除以服务器的个数,即得到该平均资源使用率。
然后,根据公式(1)获取各服务器内的同一类型业务虚拟机的资源使用率的标准差。
步骤S103,当所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差大于或等于所述各服务器内的同一类型业务虚拟机的资源使用率的调度阈值时,将所述分布式集群***中任一服务器的所述同一类型业务虚拟机平衡调度至分布式集群***的其他服务器中。
通过比较获取的标准差与各服务器内的同一类型业务虚拟机的资源使用率的调度阈值,***可以判断各个服务器内的该类型业务虚拟机的资源使用是否失衡,标准差越大,表示失衡率越高。需要说明的是,由于各服务器内有多种类型的业务虚拟机,则对各服务器内每一相同类型的业务虚拟机分别计算其与获取的平均资源使用率的标准差,获取的标准差的结果可以是某一类型的业务虚拟机的资源使用均衡,而另一类型的业务虚拟机的资源使用率失衡。
当所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差大于或等于所述各服务器内的同一类型业务虚拟机的资源使用率的调度阈值时,触发调度。调度过程中可以按照递归调度,递归调度过程中是将分布式集群***中任一服务器的所述同一类型业务虚拟机平衡调度至分布式集群***的其他服务器中。
步骤S104,获取平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率。
步骤S105,根据所述平衡调度后分布式集群***中各服务器内的所述 同一类型业务虚拟机的资源使用率,通过所述预定的获取步骤获取所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差。
每一轮平衡调度后,获取调度虚拟机对失衡率的影响,即重新获取平衡调度后各服务器内的同一类型业务虚拟机的资源使用率的标准差。
由于每一轮平衡调度后,各服务器内同一类型的业务虚拟机的资源使用率发生变化,首先要获取平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率,然后再按照预定的标准差的获取步骤获取该轮平衡调度后各服务器内的同一类型业务虚拟机的资源使用率的标准差。
步骤S106,比较至少一次所述平衡调度后获取的所述第二标准差,执行最小的所述第二标准差对应的所述平衡调度。
进行多轮上述的平衡调度,平衡调度时可以采取一定的策略进行调度,例如将重载的业务虚拟机调度至其它服务器,本发明实施例不作限定,在进行多轮上述的平衡调度中,记录每一轮平衡调度获取的该轮平衡调度后各服务器内的同一类型业务虚拟机的资源使用率的标准差,然后比较多轮平衡调度后获取的多个标准差,选出最小的标准差,最终执行该最小的标准差对应的平衡调度,即获取该最小标准差进行的平衡调度是将哪个或哪几个虚拟机调度至哪个或哪几个服务器,则执行该平衡调度。
需要说明的是,由于是针对各服务器内同一类型业务虚拟机进行的分布式资源调度,可以分别进行各服务器内每一类业务虚拟机的分布式资源调度,如果某一类型业务虚拟机的资源使用均衡,则进行该分布式资源调度。
可见,根据本发明实施例提供的一种分布式资源调度方法,通过按照分布式集群***中各服务器内业务虚拟机的类型进行分布式资源调度,可以保证各服务器内各业务虚拟机的服务质量。
请参阅图2,为本发明实施例提供的另一种分布式资源调度方法的流程示意图。该方法与前述实施例的不同之处在于,还包括步骤S206:若进行下一次平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的 第二标准差大于或等于进行当前平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,则停止执行所述获取步骤及下一次的平衡调度。
采用递归调度可使得调度效率最高,在递归调度中设置递归退出的条件,即若进行下一次平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差大于或等于进行当前平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,则停止执行所述获取步骤及下一次的平衡调度。这样有助于及时停止上述获取步骤和平衡调度,获得最小的标准差,执行该最小的标准差对应的平衡调度。
请参阅图3,为本发明实施例提供的又一种分布式资源调度方法的流程示意图。该方法包括以下步骤:
步骤S301,根据分布式集群***中各服务器内各类业务虚拟机占所述各服务器的资源的比例和所述各服务器内各类业务虚拟机的资源使用率,获取所述各服务器的资源使用率。
分布式集群***中各服务器内有一种或多种类型的业务虚拟机,例如,有桌面云虚拟机和编译云虚拟机,DRS给集群内每个服务器分配有一定的运算、存储和输入/输出资源,各个服务器又其将其获得的资源按照一定的比例分配给其内部的各类型的业务虚拟机。保证各服务器内不同类型业务虚拟机的资源的总量和比例保持稳定,即可保证各服务器内各类业务虚拟机的服务质量。
例如,集群内有三个服务器,服务器1内有桌面云虚拟机2个、编译云虚拟机2个,服务器2内有桌面云虚拟机3个、编译云虚拟机2个,服务器3内有桌面云虚拟机1个、编译云虚拟机2个,DRS给集群内的服务器1、2、3分别分配一定的CPU、内存和I/O资源,各个服务器又给其内部的各虚拟机分配一定的CPU、内存和I/O资源,以CPU资源分配为例,DRS给服务器1分配数量为A的CPU资源,给服务器2分配数量为B的 CPU资源,给服务器3分配数量为C的CPU资源,服务器1给其内的2个桌面云虚拟机和2个编译云虚拟机分别分配A1、A2、A3和A4的CPU资源,服务器1内2个桌面云虚拟机的资源使用率分别为30%和40%,服务器1内2个编译云虚拟机的资源使用率分别为40%和50%,则得到服务器1的CPU的资源使用率为(30%*A1+40%*A2+40%*A3+50%A4)/(A1+A2+A3+A4),然后再以同样的方式分别计算服务器1内各类虚拟机的内存和I/O的资源使用率,再将服务器1的CPU、内存和I/O的资源使用率进行加权计算,得到服务器1的资源使用率,服务器2和3的计算以此类推。
步骤S302,根据所述各服务器的资源使用率,通过预定的获取步骤获取所述分布式集群***的资源使用率的第三标准差,所述获取步骤为:根据所述各服务器的资源使用率获取所述分布式集群***的平均资源使用率,并根据所述各服务器的资源使用率以及所述分布式集群***的平均资源使用率,获取所述分布式集群***的资源使用率的第三标准差。
与前述实施例不同的是,由于针对的是各服务器内各类业务虚拟机,所以,按照前述实施例相同的方式获取各服务器的资源使用率以及整个分布式集群***的平均资源使用率,然后,按照公式(1)获取分布式集群***的资源使用率的标准差。
步骤S303,当所述分布式集群***的资源使用率的第三标准差大于或等于所述分布式集群***的资源使用率的调度阈值时,将所述各服务器内任一业务虚拟机平衡调度至所述分布式集群***的其他服务器中。
将获取的分布式集群***的资源使用率的标准差与该分布式集群***的资源使用率的调度阈值进行比较,如果该分布式集群***的资源使用率的标准差大于或等于该分布式集群***的资源使用率的调度阈值,则触发平衡调度。平衡调度的对象可以是各服务器内任一业务虚拟机。
步骤S304,获取平衡调度后分布式集群***中各服务器的资源使用率。
步骤S305,根据所述平衡调度后分布式集群***中各服务器的资源使用率,通过所述预定的获取步骤获取所述平衡调度后分布式集群***的资源使用率的第四标准差。
步骤S306,比较至少一次所述平衡调度后获取的所述第四标准差,执行最小的所述第四标准差对应的所述平衡调度。
步骤S304-步骤S306与前述实施例的步骤S104-步骤S106分别类似,在此不再赘述,所不同的是,针对的是各服务器内各类业务虚拟机,获取的是该分布式集群***的资源使用率的标准差。
可见,根据本发明实施例提供的一种分布式资源调度方法,通过按照各服务器内各类业务虚拟机占所在服务器的资源比例进行分布式资源调度,可以保证各服务器内各业务虚拟机的服务质量。
请参阅图4,为本发明实施例提供的又一种分布式资源调度方法的流程示意图。该方法与前述实施例的不同之处在于,还包括步骤S406:若进行下一次平衡调度后所述分布式集群***的资源使用率的第四标准差大于或等于进行当前平衡调度后所述分布式集群***的资源使用率的第四标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,或将所述业务虚拟机从任一第一服务器平衡调度至任一第二服务器后,所述任一第一服务器或所述任一第二服务器中各类业务虚拟机的总量的变化大于第二设定阈值,和/或所述任一第一服务器或所述任一第二服务器中各类业务虚拟机占所述任一第一服务器的资源的的变化大于第三设定阈值,则停止执行所述获取步骤及下一次的平衡调度。
采用递归调度可使得调度效率最高,在递归调度中设置递归退出的条件,即若进行下一次平衡调度后所述分布式集群***的资源使用率的第四标准差大于或等于进行当前平衡调度后所述分布式集群***的资源使用率的第四标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,或将所述业务虚拟机从任一第一服务器平衡调度至任一第二服务器后,所述任一第一服务器或所述任一第二服务器中各类业务虚拟机的总量的变化大于第二设定阈值,和/或所述任一第一服务器或所述任一第二服务器中各类业务虚拟机占所述任一第一服务器的资源的的变化大于第三设定阈值,则停止执行所述获取步骤及下一次的平衡调度。这样有助于及时停止上述获取步骤和平衡调度,获得最小的标准差,执行该最小 的标准差对应的平衡调度。
请参阅图5,为本发明实施例提供的一种分布式资源调度装置的结构示意图。该装置1000包括:
第一获取单元11,用于获取分布式集群***中各服务器内的同一类型业务虚拟机的资源使用率。
在虚拟化或云计算的服务器集群中包括有多个服务器,每个服务器中又包括多个虚拟机,这多个虚拟机可以运行不同类型的业务,称为业务虚拟机。采用DRS技术对服务器集群的资源进行分配,***给每个服务器分配一定的资源,每个服务器又给其各虚拟机分配相应的资源,因此该服务器集群又称为分布式集群***,这里的资源指中央处理器(Central Processing Unit,CPU)、内存和输入/输出(Input/Output,I/O)等控制、存储和输入/输出资源。
第一获取单元11获取分布式集群***中各服务器内的同一类型业务虚拟机的资源使用率,获取的方式可以为:在每个服务器中设置监控器,监控器监控该服务器内该类型业务虚拟机的资源使用率,并上报给DRS,或者DRS向监控器请求该类型虚拟机的资源使用率,从监控器获取该类型业务虚拟机的资源使用率的次数可以为一次,也可以为多次。这里的资源使用率可以是某一种资源的使用率,也可以是各种资源例如CPU、内存和I/O等的资源使用率的加权值。
分布式集群***中各服务器内有一种或多种类型的业务虚拟机,例如,有桌面云虚拟机和编译云虚拟机,本实施例根据业务类型分别获取各服务器内同一类型的虚拟机的资源使用率。
例如,集群内有三个服务器,服务器1内有桌面云虚拟机2个、编译云虚拟机2个,服务器2内有桌面云虚拟机3个、编译云虚拟机2个,服务器3内有桌面云虚拟机1个、编译云虚拟机2个,DRS给集群内的服务器1、2、3分别分配一定的CPU、内存和I/O资源,各个服务器又给其内部的各类型的虚拟机分配一定的CPU、内存和I/O资源,以CPU资源分配为例,DRS给服务器1分配数量为A的CPU资源,给服务器2分配数量为 B的CPU资源,给服务器3分配数量为C的CPU资源,服务器1给其内的2个桌面云虚拟机和2个编译云虚拟机分别分配A1、A2、A3和A4的CPU资源,以桌面云虚拟机的资源使用率为例,服务器1内2个桌面云虚拟机的资源使用率分别为30%和40%,则得到服务器1内桌面云虚拟机的CPU的资源使用率为(30%*A1+40%*A2)/(A1+A2),然后再以同样的方式分别计算服务器1内桌面云虚拟机的总的内存和I/O的资源使用率,再将总的CPU、内存和I/O的资源使用率进行加权计算,得到服务器1的桌面云虚拟机的资源使用率,以此类推获取服务器2和3的桌面云虚拟机的资源使用率。同时,还可以按照同样的方式获取各服务器内编译云虚拟机的资源使用率。
第二获取单元12,用于根据所述各服务器内的同一类型业务虚拟机的资源使用率,通过预定的获取方式获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差,所述获取方式为:根据所述各服务器内的同一类型业务虚拟机的资源使用率获取所述各服务器内的同一类型业务虚拟机的平均资源使用率,并根据所述各服务器内的同一类型业务虚拟机的资源使用率以及所述平均资源使用率,获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差。
采用DRS技术保证集群内的资源利用率最大化,因此,第二获取单元12获取集群内各个服务器内的同一类型业务虚拟机的资源使用率与各个服务器内的同一类型业务虚拟机的平均资源使用率的标准差,标准差用于反应数据的离散程度,其计算公式如公式(1)所示。
根据标准差的计算公式,第二获取单元12首先需要获取各个服务器内的同一类型业务虚拟机的平均资源使用率。第一获取单元11已经获取各个服务器内的同一类型业务虚拟机的资源使用率,第二获取单元12可以根据现有的计算方式获取各个服务器内的同一类型业务虚拟机的平均资源使用率。例如前面的示例中,有三个服务器,则将获取的各服务器内同一类型业务虚拟机的资源使用率取和再除以服务器的个数,即得到该平均资源使用率。
然后,第二获取单元12根据公式(1)获取各服务器内的同一类型业务虚 拟机的资源使用率的标准差。
第一调度单元13,用于当所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差大于或等于所述各服务器内的同一类型业务虚拟机的资源使用率的调度阈值时,将所述分布式集群***中任一服务器的所述同一类型业务虚拟机平衡调度至分布式集群***的其他服务器中。
通过比较获取的标准差与各服务器内的同一类型业务虚拟机的资源使用率的调度阈值,***可以判断各个服务器内的该类型业务虚拟机的资源使用是否失衡,标准差越大,表示失衡率越高。需要说明的是,由于各服务器内有多种类型的业务虚拟机,则对各服务器内每一相同类型的业务虚拟机分别计算其与获取的平均资源使用率的标准差,获取的标准差的结果可以是某一类型的业务虚拟机的资源使用均衡,而另一类型的业务虚拟机的资源使用率失衡。
当所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差大于或等于所述各服务器内的同一类型业务虚拟机的资源使用率的调度阈值时,第一调度单元13触发调度。调度过程中可以按照递归调度,递归调度过程中是将分布式集群***中任一服务器的所述同一类型业务虚拟机平衡调度至分布式集群***的其他服务器中。
第三获取单元14,用于获取平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率。
第四获取单元15,用于根据所述平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率,通过所述预定的获取方式获取所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差。
每一轮平衡调度后,第四获取单元15获取调度虚拟机对失衡率的影响,即第四获取单元15重新获取平衡调度后各服务器内的同一类型业务虚拟机的资源使用率的标准差。
由于每一轮平衡调度后,各服务器内同一类型的业务虚拟机的资源使用率发生变化,首先第三获取单元14要获取平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率,然后第四获取单元15再按照预定的标准差的获取方式获取该轮平衡调度后各服务器内的同一 类型业务虚拟机的资源使用率的标准差。
第一比较单元16,用于比较至少一次所述平衡调度后获取的所述第二标准差;
第一执行单元17,用于执行最小的所述第二标准差对应的所述平衡调度。
进行多轮上述的平衡调度,平衡调度时可以采取一定的策略进行调度,例如将重载的业务虚拟机调度至其它服务器,本发明实施例不作限定,在进行多轮上述的平衡调度中,记录每一轮平衡调度获取的该轮平衡调度后各服务器内的同一类型业务虚拟机的资源使用率的标准差,然后比较多轮平衡调度后获取的多个标准差,选出最小的标准差,第一执行单元17最终执行该最小的标准差对应的平衡调度,即获取该最小标准差进行的平衡调度是将哪个或哪几个虚拟机调度至哪个或哪几个服务器,则执行该平衡调度。
需要说明的是,由于是针对各服务器内同一类型业务虚拟机进行的分布式资源调度,可以分别进行各服务器内每一类业务虚拟机的分布式资源调度,如果某一类型业务虚拟机的资源使用均衡,则进行该分布式资源调度。
可见,根据本发明实施例提供的一种分布式资源调度装置,通过按照分布式集群***中各服务器内业务虚拟机的类型进行分布式资源调度,可以保证各服务器内各业务虚拟机的服务质量。
作为一种实施方式,第一执行单元17还可以用于若进行下一次平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差大于或等于进行当前平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,则停止执行所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差的获取及下一次的平衡调度。
采用递归调度可使得调度效率最高,在递归调度中设置递归退出的条件,即若进行下一次平衡调度后所述各服务器内的同一类型业务虚拟机的 资源使用率的第二标准差大于或等于进行当前平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,则第一执行单元17停止执行所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差的获取及下一次的平衡调度。这样有助于及时停止上述获取步骤和平衡调度,获得最小的标准差,执行该最小的标准差对应的平衡调度。
请参阅图6,为本发明实施例提供的另一种分布式资源调度装置的结构示意图。该装置2000包括:
第五获取单元21,用于根据分布式集群***中各服务器内各类业务虚拟机占所述各服务器的资源的比例和所述各服务器内各类业务虚拟机的资源使用率,获取所述各服务器的资源使用率。
分布式集群***中各服务器内有一种或多种类型的业务虚拟机,例如,有桌面云虚拟机和编译云虚拟机,DRS给集群内每个服务器分配有一定的运算、存储和输入/输出资源,各个服务器又其将其获得的资源按照一定的比例分配给其内部的各类型的业务虚拟机。保证各服务器内不同类型业务虚拟机的资源的总量和比例保持稳定,即可保证各服务器内各类业务虚拟机的服务质量。
例如,集群内有三个服务器,服务器1内有桌面云虚拟机2个、编译云虚拟机2个,服务器2内有桌面云虚拟机3个、编译云虚拟机2个,服务器3内有桌面云虚拟机1个、编译云虚拟机2个,DRS给集群内的服务器1、2、3分别分配一定的CPU、内存和I/O资源,各个服务器又给其内部的各虚拟机分配一定的CPU、内存和I/O资源,以CPU资源分配为例,DRS给服务器1分配数量为A的CPU资源,给服务器2分配数量为B的CPU资源,给服务器3分配数量为C的CPU资源,服务器1给其内的2个桌面云虚拟机和2个编译云虚拟机分别分配A1、A2、A3和A4的CPU资源,服务器1内2个桌面云虚拟机的资源使用率分别为30%和40%,服务器1内2个编译云虚拟机的资源使用率分别为40%和50%,则得到服务器1的CPU的资源使用率为(30%*A1+40%*A2+ 40%*A3+50%A4)/(A1+A2+A3+A4),然后再以同样的方式分别计算服务器1内各类虚拟机的内存和I/O的资源使用率,再将服务器1的CPU、内存和I/O的资源使用率进行加权计算,得到服务器1的资源使用率,服务器2和3的计算以此类推。
第六获取单元22,用于根据所述各服务器的资源使用率,通过预定的获取方式获取所述分布式集群***的资源使用率的第三标准差,所述获取步骤为:根据所述各服务器的资源使用率获取所述分布式集群***的平均资源使用率,并根据所述各服务器的资源使用率以及所述分布式集群***的平均资源使用率,获取所述分布式集群***的资源使用率的第三标准差。
与前述实施例不同的是,由于针对的是各服务器内各类业务虚拟机,所以,按照前述实施例相同的方式获取各服务器的资源使用率以及整个分布式集群***的平均资源使用率,然后,第六获取单元22再按照公式(1)获取分布式集群***的资源使用率的标准差。
第二调度单元23,用于当所述分布式集群***的资源使用率的第三标准差大于或等于所述分布式集群***的资源使用率的调度阈值时,将所述各服务器内任一业务虚拟机平衡调度至所述分布式集群***的其他服务器中。
将获取的分布式集群***的资源使用率的标准差与该分布式集群***的资源使用率的调度阈值进行比较,如果该分布式集群***的资源使用率的标准差大于或等于该分布式集群***的资源使用率的调度阈值,则第二调度单元23触发平衡调度。平衡调度的对象可以是各服务器内任一业务虚拟机。
第七获取单元24,用于获取平衡调度后分布式集群***中各服务器的资源使用率。
第八获取单元25,用于根据所述平衡调度后分布式集群***中各服务器的资源使用率,通过所述预定的获取方式获取所述平衡调度后分布式集群***的资源使用率的第四标准差。
第二比较单元26,用于比较至少一次所述平衡调度后获取的所述第四标准差;
第二执行单元27,用于执行最小的所述第四标准差对应的所述平衡调度。
第七获取单元24、第八获取单元25、第二比较单元26、第二执行单元27的功能分别与前述实施例的第三获取单元14、第四获取单元15、第一比较单元16、第一执行单元17的功能类似,在此不再赘述,所不同的是,针对的是各服务器内各类业务虚拟机,获取的是该分布式集群***的资源使用率的标准差。
可见,根据本发明实施例提供的一种分布式资源调度装置,通过按照各服务器内各类业务虚拟机占所在服务器的资源比例进行分布式资源调度,可以保证各服务器内各业务虚拟机的服务质量。
作为一种可行的实施方式,第二执行单元27还用于若进行下一次平衡调度后所述分布式集群***的资源使用率的第四标准差大于或等于进行当前平衡调度后所述分布式集群***的资源使用率的第四标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,或将所述业务虚拟机从任一第一服务器平衡调度至任一第二服务器后,所述任一第一服务器或所述任一第二服务器中各类业务虚拟机的总量的变化大于第二设定阈值,和/或所述任一第一服务器或所述任一第二服务器中各类业务虚拟机占所述任一第一服务器的资源的的变化大于第三设定阈值,则停止执行所述平衡调度后分布式集群***的资源使用率的获取及下一次的平衡调度。
采用递归调度可使得调度效率最高,在递归调度中设置递归退出的条件,即若进行下一次平衡调度后所述分布式集群***的资源使用率的第四标准差大于或等于进行当前平衡调度后所述分布式集群***的资源使用率的第四标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,或将所述业务虚拟机从任一第一服务器平衡调度至任一第二服务器后,所述任一第一服务器或所述任一第二服务器中各类业务虚拟机的总量的变化大于第二设定阈值,和/或所述任一第一服务器或所述任一第二服务器中各类业务虚拟机占所述任一第一服务器的资源的的变化大 于第三设定阈值,则第二执行单元27停止执行所述平衡调度后分布式集群***的资源使用率的获取及下一次的平衡调度。这样有助于及时停止上述获取步骤和平衡调度,获得最小的标准差,执行该最小的标准差对应的平衡调度。
请参阅图7,为本发明实施例提供的一种分布式资源调度设备的结构示意图,本实施例的设备3000包括处理器31、存储器32、输入设备33、输出设备34以及总线***35,其中:
处理器31控制设备3000的操作,处理器31还可以称为中央处理单元(Central Processing Unit,CPU)。处理器31可能是一种集成电路芯片,具有信号的处理能力。处理器31还可以是通用处理器、数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
存储器32可以包括只读存储器和随机存取存储器,并向处理器31提供指令和数据。存储器32的一部分还可以包括非易失性随机存取存储器(NVRAM)。
设备3000的各个组件通过总线***35耦合在一起,该总线可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互连(Peripheral Component Interconnect,PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以是一条或多条物理线路,当是多条物理线路时可以分为地址总线、数据总线、控制总线等。在本发明的其它一些实施例中,处理器31、存储器32以及输入设备33、输出设备34也可以通过通信线路直接连接。
输入设备33可以具体实现为鼠标、键盘、麦克风等,而输出设备34可以具体实现为显示器、音频设备、视频设备。当然,输入设备33和输出设备34也可以通过一个输入输出设备来实现其功能,比如实现为可触摸的 屏幕。
其中,处理器31读取存储器32中的计算机程序用以执行以下步骤:
获取分布式集群***中各服务器内的同一类型业务虚拟机的资源使用率;
根据所述各服务器内的同一类型业务虚拟机的资源使用率,通过预定的获取步骤获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差,所述获取步骤为:根据所述各服务器内的同一类型业务虚拟机的资源使用率获取所述各服务器内的同一类型业务虚拟机的平均资源使用率,并根据所述各服务器内的同一类型业务虚拟机的资源使用率以及所述平均资源使用率,获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差;
当所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差大于或等于所述各服务器内的同一类型业务虚拟机的资源使用率的调度阈值时,将所述分布式集群***中任一服务器的所述同一类型业务虚拟机平衡调度至分布式集群***的其他服务器中;
获取平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率;
根据所述平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率,通过所述预定的获取步骤获取所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差;
比较至少一次所述平衡调度后获取的所述第二标准差,执行最小的所述第二标准差对应的所述平衡调度。
作为一种可行的实施方式,处理器31在执行所述比较至少一次所述平衡调度后获取的所述第二标准差,执行最小的所述第二标准差对应的所述平衡调度的步骤之前,还执行如下步骤:
若进行下一次平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差大于或等于进行当前平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,则停止执行所述获取步 骤及下一次的平衡调度。
本发明实施例提供的处理器31中包含的计算机程序还可以实现为第一获取单元、第二获取单元、第一调度单元、第三获取单元、第四获取单元、第一比较单元和第一执行单元,这些单元实现的功能可以参考前述实施例所述,在此不再赘述。
可见,根据本发明实施例提供的一种分布式资源调度设备,通过按照分布式集群***中各服务器内业务虚拟机的类型进行分布式资源调度,可以保证各服务器内各业务虚拟机的服务质量。
请参阅图8,为本发明实施例提供的另一种分布式资源调度设备的结构示意图,本实施例的设备4000包括处理器41、存储器42、输入设备43、输出设备44以及总线***45,其中:
处理器41控制设备4000的操作,处理器41还可以称为中央处理单元(Central Processing Unit,CPU)。处理器41可能是一种集成电路芯片,具有信号的处理能力。处理器41还可以是通用处理器、数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
存储器42可以包括只读存储器和随机存取存储器,并向处理器41提供指令和数据。存储器42的一部分还可以包括非易失性随机存取存储器(NVRAM)。
设备4000的各个组件通过总线***45耦合在一起,该总线可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互连(Peripheral Component Interconnect,PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以是一条或多条物理线路,当是多条物理线路时可以分为地址总线、数据总线、控制总线等。在本发明的其它一些实施例中,处理器41、存储器42以及输 入设备43、输出设备44也可以通过通信线路直接连接。
输入设备43可以具体实现为鼠标、键盘、麦克风等,而输出设备44可以具体实现为显示器、音频设备、视频设备。当然,输入设备43和输出设备44也可以通过一个输入输出设备来实现其功能,比如实现为可触摸的屏幕。
其中,处理器41读取存储器42中的计算机程序用以执行以下步骤:
根据分布式集群***中各服务器内各类业务虚拟机占所述各服务器的资源的比例和所述各服务器内各类业务虚拟机的资源使用率,获取所述各服务器的资源使用率;
根据所述各服务器的资源使用率,通过预定的获取步骤获取所述分布式集群***的资源使用率的第一标准差,所述获取步骤为:根据所述各服务器的资源使用率获取所述分布式集群***的平均资源使用率,并根据所述各服务器的资源使用率以及所述分布式集群***的平均资源使用率,获取所述分布式集群***的资源使用率的第一标准差;
当所述分布式集群***的资源使用率的第一标准差大于或等于所述分布式集群***的资源使用率的调度阈值时,将所述各服务器内任一业务虚拟机平衡调度至所述分布式集群***的其他服务器中;
获取平衡调度后分布式集群***中各服务器的资源使用率;
根据所述平衡调度后分布式集群***中各服务器的资源使用率,通过所述预定的获取步骤获取所述平衡调度后分布式集群***的资源使用率的第二标准差;
比较至少一次所述平衡调度后获取的所述第二标准差,执行最小的所述第二标准差对应的所述平衡调度。
作为一种可行的实施方式,处理器41在所述比较至少一次所述平衡调度后获取的所述第二标准差,执行最小的所述第二标准差对应的所述平衡调度的步骤之前,还执行如下步骤:
若进行下一次平衡调度后所述分布式集群***的资源使用率的第二标准差大于或等于进行当前平衡调度后所述分布式集群***的资源使用率的第二标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过 第一设定阈值,或将所述业务虚拟机从任一第一服务器平衡调度至任一第二服务器后,所述任一第一服务器或所述任一第二服务器中各类业务虚拟机的总量的变化大于第二设定阈值,和/或所述任一第一服务器或所述任一第二服务器中各类业务虚拟机占所述任一第一服务器的资源的的变化大于第三设定阈值,则停止执行所述获取步骤及下一次的平衡调度。
本发明实施例提供的处理器41中包含的计算机程序还可以实现为第五获取单元、第六获取单元、第二调度单元、第七获取单元、第八获取单元、第二比较单元和第二执行单元,这些单元实现的功能可以参考前述实施例所述,在此不再赘述。
可见,根据本发明实施例提供的一种分布式资源调度设备,通过按照各服务器内各类业务虚拟机占所在服务器的资源比例进行分布式资源调度,可以保证各服务器内各业务虚拟机的服务质量。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为根据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括随机存取存储器(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他 光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线(Digital Subscriber Line,DSL)或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线和微波之类的无线技术包括在所属介质的定影中。如本发明所使用的,盘(Disk)和碟(disc)包括压缩光碟(CD)、激光碟、光碟、数字通用光碟(DVD)、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。
总之,以上所述仅为本发明技术方案的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (8)

  1. 一种分布式资源调度方法,其特征在于,包括:
    获取分布式集群***中各服务器内的同一类型业务虚拟机的资源使用率;
    根据所述各服务器内的同一类型业务虚拟机的资源使用率,通过预定的获取步骤获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差,所述获取步骤为:根据所述各服务器内的同一类型业务虚拟机的资源使用率获取所述各服务器内的同一类型业务虚拟机的平均资源使用率,并根据所述各服务器内的同一类型业务虚拟机的资源使用率以及所述平均资源使用率,获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差;
    当所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差大于或等于所述各服务器内的同一类型业务虚拟机的资源使用率的调度阈值时,将所述分布式集群***中任一服务器的所述同一类型业务虚拟机平衡调度至分布式集群***的其他服务器中;
    获取平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率;
    根据所述平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率,通过所述预定的获取步骤获取所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差;
    比较至少一次所述平衡调度后获取的所述第二标准差,执行最小的所述第二标准差对应的所述平衡调度。
  2. 如权利要求1所述的方法,其特征在于,所述比较至少一次所述平衡调度后获取的所述第二标准差,执行最小的所述第二标准差对应的所述平衡调度之前,还包括:
    若进行下一次平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差大于或等于进行当前平衡调度后所述各服务器内的 同一类型业务虚拟机的资源使用率的第二标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,则停止执行所述获取步骤及下一次的平衡调度。
  3. 一种分布式资源调度方法,其特征在于,包括:
    根据分布式集群***中各服务器内各类业务虚拟机占所述各服务器的资源的比例和所述各服务器内各类业务虚拟机的资源使用率,获取所述各服务器的资源使用率;
    根据所述各服务器的资源使用率,通过预定的获取步骤获取所述分布式集群***的资源使用率的第三标准差,所述获取步骤为:根据所述各服务器的资源使用率获取所述分布式集群***的平均资源使用率,并根据所述各服务器的资源使用率以及所述分布式集群***的平均资源使用率,获取所述分布式集群***的资源使用率的第三标准差;
    当所述分布式集群***的资源使用率的第三标准差大于或等于所述分布式集群***的资源使用率的调度阈值时,将所述各服务器内任一业务虚拟机平衡调度至所述分布式集群***的其他服务器中;
    获取平衡调度后分布式集群***中各服务器的资源使用率;
    根据所述平衡调度后分布式集群***中各服务器的资源使用率,通过所述预定的获取步骤获取所述平衡调度后分布式集群***的资源使用率的第四标准差;
    比较至少一次所述平衡调度后获取的所述第四标准差,执行最小的所述第四标准差对应的所述平衡调度。
  4. 如权利要求3所述的方法,其特征在于,所述比较至少一次所述平衡调度后获取的所述第四标准差,执行最小的所述第四标准差对应的所述平衡调度之前,还包括:
    若进行下一次平衡调度后所述分布式集群***的资源使用率的第四标准差大于或等于进行当前平衡调度后所述分布式集群***的资源使用率的第四标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,或将所述业务虚拟机从任一第一服务器平衡调度至任一第 二服务器后,所述任一第一服务器或所述任一第二服务器中各类业务虚拟机的总量的变化大于第二设定阈值,和/或所述任一第一服务器或所述任一第二服务器中各类业务虚拟机占所述任一第一服务器的资源的的变化大于第三设定阈值,则停止执行所述获取步骤及下一次的平衡调度。
  5. 一种分布式资源调度装置,其特征在于,包括:
    第一获取单元,用于获取分布式集群***中各服务器内的同一类型业务虚拟机的资源使用率;
    第二获取单元,用于根据所述各服务器内的同一类型业务虚拟机的资源使用率,通过预定的获取方式获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差,所述获取方式为:根据所述各服务器内的同一类型业务虚拟机的资源使用率获取所述各服务器内的同一类型业务虚拟机的平均资源使用率,并根据所述各服务器内的同一类型业务虚拟机的资源使用率以及所述平均资源使用率,获取所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差;
    第一调度单元,用于当所述各服务器内的同一类型业务虚拟机的资源使用率的第一标准差大于或等于所述各服务器内的同一类型业务虚拟机的资源使用率的调度阈值时,将所述分布式集群***中任一服务器的所述同一类型业务虚拟机平衡调度至分布式集群***的其他服务器中;
    第三获取单元,用于获取平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率;
    第四获取单元,用于根据所述平衡调度后分布式集群***中各服务器内的所述同一类型业务虚拟机的资源使用率,通过所述预定的获取方式获取所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差;
    第一比较单元,用于比较至少一次所述平衡调度后获取的所述第二标准差;
    第一执行单元,用于执行最小的所述第二标准差对应的所述平衡调度。
  6. 如权利要求5所述的装置,其特征在于,所述第一执行单元还用于:
    若进行下一次平衡调度后所述各服务器内的同一类型业务虚拟机的资 源使用率的第二标准差大于或等于进行当前平衡调度后所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,则停止执行所述各服务器内的同一类型业务虚拟机的资源使用率的第二标准差的获取及下一次的平衡调度。
  7. 一种分布式资源调度装置,其特征在于,包括:
    第五获取单元,用于根据分布式集群***中各服务器内各类业务虚拟机占所述各服务器的资源的比例和所述各服务器内各类业务虚拟机的资源使用率,获取所述各服务器的资源使用率;
    第六获取单元,用于根据所述各服务器的资源使用率,通过预定的获取方式获取所述分布式集群***的资源使用率的第三标准差,所述获取方式为:根据所述各服务器的资源使用率获取所述分布式集群***的平均资源使用率,并根据所述各服务器的资源使用率以及所述分布式集群***的平均资源使用率,获取所述分布式集群***的资源使用率的第三标准差;
    第二调度单元,用于当所述分布式集群***的资源使用率的第三标准差大于或等于所述分布式集群***的资源使用率的调度阈值时,将所述各服务器内任一业务虚拟机平衡调度至所述分布式集群***的其他服务器中;
    第七获取单元,用于获取平衡调度后分布式集群***中各服务器的资源使用率;
    第八获取单元,用于根据所述平衡调度后分布式集群***中各服务器的资源使用率,通过所述预定的获取方式获取所述平衡调度后分布式集群***的资源使用率的第四标准差;
    第二比较单元,用于比较至少一次所述平衡调度后获取的所述第四标准差;
    第二执行单元,用于执行最小的所述第四标准差对应的所述平衡调度。
  8. 如权利要求7所述的装置,其特征在于,所述第二执行单元还用于:
    若进行下一次平衡调度后所述分布式集群***的资源使用率的第四标 准差大于或等于进行当前平衡调度后所述分布式集群***的资源使用率的第四标准差,或截止下一次平衡调度,进行所述平衡调度的累计次数超过第一设定阈值,或将所述业务虚拟机从任一第一服务器平衡调度至任一第二服务器后,所述任一第一服务器或所述任一第二服务器中各类业务虚拟机的总量的变化大于第二设定阈值,和/或所述任一第一服务器或所述任一第二服务器中各类业务虚拟机占所述任一第一服务器的资源的的变化大于第三设定阈值,则停止执行所述平衡调度后分布式集群***的资源使用率的获取及下一次的平衡调度。
PCT/CN2014/089636 2013-12-31 2014-10-28 一种分布式资源调度方法及装置 WO2015101091A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310751965.X 2013-12-31
CN201310751965.XA CN103763346B (zh) 2013-12-31 2013-12-31 一种分布式资源调度方法及装置

Publications (1)

Publication Number Publication Date
WO2015101091A1 true WO2015101091A1 (zh) 2015-07-09

Family

ID=50530505

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/089636 WO2015101091A1 (zh) 2013-12-31 2014-10-28 一种分布式资源调度方法及装置

Country Status (2)

Country Link
CN (1) CN103763346B (zh)
WO (1) WO2015101091A1 (zh)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763346B (zh) * 2013-12-31 2017-07-25 华为技术有限公司 一种分布式资源调度方法及装置
CN105893224B (zh) * 2015-01-26 2019-04-09 阿里巴巴集团控股有限公司 一种资源度量方法及装置
CN105159784B (zh) * 2015-10-10 2018-07-06 浪潮(北京)电子信息产业有限公司 一种虚拟服务器的部署方法及***
CN106100872B (zh) * 2016-05-31 2019-04-05 中国联合网络通信集团有限公司 一种业务连续性保障方法及装置
CN108063784B (zh) * 2016-11-08 2022-01-25 阿里巴巴集团控股有限公司 一种云环境下应用集群资源分配的方法、装置和***
CN107205028A (zh) * 2017-05-25 2017-09-26 郑州云海信息技术有限公司 一种服务分类方法及装置
CN109936465A (zh) * 2017-12-15 2019-06-25 ***通信集团浙江有限公司 一种云平台资源利用率评估方法及装置
CN109634714B (zh) * 2018-11-02 2023-10-31 北京奇虎科技有限公司 一种智能调度的方法及装置
CN109542725B (zh) * 2018-11-15 2022-04-05 北京金山云网络技术有限公司 一种分布式***的服务质量监控方法、装置及监控服务器
CN109936627A (zh) * 2019-02-21 2019-06-25 山东浪潮云信息技术有限公司 一种基于hadoop的自动数据均衡方法及工具
CN115408098A (zh) * 2021-05-27 2022-11-29 华为云计算技术有限公司 一种资源调度方法及装置
CN113485847A (zh) * 2021-08-05 2021-10-08 杭州绿城信息技术有限公司 一种基于大数据的资源调度***

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102244685A (zh) * 2011-08-11 2011-11-16 中国科学院软件研究所 一种支持负载均衡的分布式缓存动态伸缩方法及***
CN103763346A (zh) * 2013-12-31 2014-04-30 华为技术有限公司 一种分布式资源调度方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567072B (zh) * 2010-12-20 2015-04-22 ***通信集团公司 一种资源分配方法、装置及***
CN102185759A (zh) * 2011-04-12 2011-09-14 田文洪 一种满足需求特性的多物理服务器负载均衡的方法及装置
CN103164283B (zh) * 2012-05-10 2018-08-10 上海兆民云计算科技有限公司 一种虚拟桌面***中虚拟化资源动态调度管理方法及***
CN102984762B (zh) * 2012-12-12 2016-05-25 中国联合网络通信集团有限公司 Ims功能分配方法及装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102244685A (zh) * 2011-08-11 2011-11-16 中国科学院软件研究所 一种支持负载均衡的分布式缓存动态伸缩方法及***
CN103763346A (zh) * 2013-12-31 2014-04-30 华为技术有限公司 一种分布式资源调度方法及装置

Also Published As

Publication number Publication date
CN103763346A (zh) 2014-04-30
CN103763346B (zh) 2017-07-25

Similar Documents

Publication Publication Date Title
WO2015101091A1 (zh) 一种分布式资源调度方法及装置
US10733026B2 (en) Automated workflow selection
US20190324819A1 (en) Distributed-system task assignment method and apparatus
JP6278320B2 (ja) エンドツーエンドデータセンタ性能制御
US10896065B2 (en) Efficient critical thread scheduling for non privileged thread requests
EP3507692B1 (en) Resource oversubscription based on utilization patterns in computing systems
US8725912B2 (en) Dynamic balancing of IO resources on NUMA platforms
US8185905B2 (en) Resource allocation in computing systems according to permissible flexibilities in the recommended resource requirements
CN109729106B (zh) 处理计算任务的方法、***和计算机程序产品
WO2021136137A1 (zh) 一种资源调度方法、装置及相关设备
JP2015115059A (ja) クラウド・コンピューティング環境を動的に変更する方法、情報処理システム、およびコンピュータ・プログラム
US10489208B1 (en) Managing resource bursting
CN109960575B (zh) 一种计算能力共享方法、***及相关设备
JP2016133964A (ja) 計算資源割当て方法およびシステム
WO2018049873A1 (zh) 一种应用调度方法及装置
US10579416B2 (en) Thread interrupt offload re-prioritization
WO2023103516A1 (zh) 基于处理器虚拟化环境的低优阻塞方法及装置
CN108028806B (zh) 网络功能虚拟化nfv网络中分配虚拟资源的方法和装置
US20200272526A1 (en) Methods and systems for automated scaling of computing clusters
US9218219B2 (en) Managing virtual functions of an input/output adapter
US20220318057A1 (en) Resource Management for Preferred Applications
US9213575B2 (en) Methods and systems for energy management in a virtualized data center
US10846125B2 (en) Memory access optimization in a processor complex
KR102676385B1 (ko) 가상화 서버에서 가상머신 cpu 자원을 관리하는 장치 및 방법
CN110247802B (zh) 针对云服务单机环境的资源配置方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14876197

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14876197

Country of ref document: EP

Kind code of ref document: A1