Energy-saving scheduling method and device and computer storage medium

文档序号:1464891 发布日期:2020-02-21 浏览:16次 中文

阅读说明:本技术 节能调度方法及装置、计算机可存储介质 (Energy-saving scheduling method and device and computer storage medium ) 是由 白石 孟子骞 于 2019-10-17 设计创作,主要内容包括:本公开涉及节能调度方法及装置、计算机可存储介质,涉及云计算机领域。节能调度方法包括:对于每个已创建虚拟机,获取每个历史时间段的多类资源的历史资源用量;根据用户的业务需求和所述多类资源的历史资源用量,在待调度时间段,对每个待创建虚拟机和各个已创建虚拟机进行调度。根据本公开,进一步降低了能耗。(The disclosure relates to an energy-saving scheduling method and device and a computer storage medium, and relates to the field of cloud computers. The energy-saving scheduling method comprises the following steps: for each created virtual machine, acquiring historical resource usage of multiple types of resources of each historical time period; and scheduling each virtual machine to be created and each created virtual machine in the time period to be scheduled according to the service requirement of the user and the historical resource usage of the various types of resources. According to the present disclosure, energy consumption is further reduced.)

1. An energy-saving scheduling method, comprising:

for each created virtual machine, acquiring historical resource usage of multiple types of resources of each historical time period;

and scheduling each virtual machine to be created and each created virtual machine in the time period to be scheduled according to the service requirement of the user and the historical resource usage of the various types of resources.

2. The energy-saving scheduling method according to claim 1, wherein the service requirement includes a first service requirement, and scheduling each virtual machine to be created in the time period to be scheduled includes:

determining at least one active physical machine which can deploy each virtual machine to be created according to the first service requirement;

for each type of resources of each active physical machine, acquiring the provided resource quantity;

determining peak resources and valley resources of each active physical machine according to the provided resource amount of each resource of each active physical machine;

determining peak resources and valley resources of each virtual machine to be created according to the historical resource usage of the created virtual machine with the same specification as that of each virtual machine to be created;

and deploying each virtual machine to be created to the active physical machine with the most kinds of resources complementary to the peak and valley of each virtual machine to be created, wherein the peak value complementation comprises that for the same kind of resources, the virtual machine to be created is the peak value resource and the active physical machine is the valley value resource.

3. The energy-saving scheduling method of claim 2, wherein determining the peak and valley resources of each active physical machine according to the provided resource amount of the various types of resources of each active physical machine comprises:

performing first normalization processing on the provided resource quantity of each type of resources;

calculating the average value of the provided resource quantity of each type of resource to obtain a first average value;

determining resources with provided resource quantity larger than the first average value as peak resources of each active physical machine;

determining the resource with the provided resource amount smaller than or equal to the first average value as the valley resource of each active physical machine.

4. The energy-saving scheduling method of claim 3, wherein the first normalization process includes:

for each type of resource, calculating the ratio of the total amount of the available resources of each active physical machine to the maximum total amount of the available resources in each active physical machine;

multiplying the ratio based on the available resource usage of each active physical machine.

5. The energy-saving scheduling method according to claim 2, wherein before scheduling each virtual machine to be created and each created virtual machine, further comprising:

and for each created virtual machine, performing second normalization processing on the historical resource usage of each type of resource in each historical time period.

6. The energy-saving scheduling method of claim 5, wherein determining the peak resource and the valley resource of each virtual machine to be created according to the historical resource usage of the created virtual machine having the same specification as the each virtual machine to be created comprises:

determining a plurality of historical time periods corresponding to the time period to be scheduled as reference time periods;

for each type of resources of each created virtual machine with the same specification as that of each virtual machine to be created, determining the average value of historical resource usage of a plurality of reference time periods as the estimated resource usage of each virtual machine to be created;

calculating the average value of the estimated resource consumption of each resource to obtain a second average value;

determining the resources with the estimated resource usage larger than the second average value as peak resources of each virtual machine to be created;

and determining the resources with the estimated resource usage less than or equal to the second average value as valley resources of each virtual machine to be created.

7. The energy-saving scheduling method of claim 5, wherein the second normalization process includes:

for each type of resources, under the condition that the total amount of the resources which can be provided by each active physical machine is the same, the total amount of the resources which can be provided by any active physical machine is taken as a reference, and the historical resource usage is normalized.

8. The energy-saving scheduling method of claim 7, wherein the second normalization process further comprises:

for each type of resources, under the condition that the total amount of the resources which can be provided by each active physical machine is different, the historical resource usage is normalized by taking the result of normalization processing on the total amount of the resources which can be provided by each active physical machine as a reference.

9. The energy-saving scheduling method according to claim 1, wherein the service requirement further includes a second service requirement, and in the time period to be scheduled, scheduling each created virtual machine includes:

for each active physical machine, determining at least one created virtual machine set which can be deployed on each active physical machine according to a second service requirement of a user;

determining peak resources and valley resources of each created virtual machine according to the historical resource usage of each type of resource of each created virtual machine;

for each created virtual machine set, migrating the created virtual machines of each created virtual machine set to active physical machines corresponding to the each created virtual machine set under the condition that at least one type of resource peak-valley complementation exists between the two created virtual machines, wherein the peak-valley complementation comprises that for the same type of resources, one created virtual machine is a peak resource and the other created virtual machine is a valley resource.

10. The energy-saving scheduling method of claim 1, wherein scheduling each created virtual machine further comprises:

for each active physical machine, determining the sum of historical resource usage of each created virtual machine deployed on the active physical machine;

and under the condition that the sum is larger than the total amount of the available resources of each active physical machine, migrating at least one created virtual machine which is already deployed on each active physical machine to other active physical machines except each active physical machine until the sum of the historical resource usage of each created virtual machine which is already deployed on each active physical machine is smaller than or equal to the total amount of the available resources.

11. The energy-saving scheduling method of claim 10, wherein energy-saving scheduling each created virtual machine further comprises:

under the condition that the sum is smaller than the preset proportion of the total amount of the resources which can be provided by each active physical machine, migrating each created virtual machine which is already deployed on each active physical machine to other active physical machines except each active physical machine;

and controlling each active physical machine to switch to a sleep mode.

12. The energy-saving scheduling method of claim 11, wherein the other active physical machines include other active physical machines that provide the largest resource margin.

13. The energy-saving scheduling method of claim 1, wherein scheduling each created virtual machine further comprises:

and in the case that the sum of the total amount of the available resources of all the active physical machines is less than the sum of the historical resource usage of all the created virtual machines, waking up the physical machines partially in the dormant state until the sum of the total amount of the available resources of all the active physical machines is greater than or equal to the sum of the historical resource usage of all the created virtual machines.

14. The energy-saving scheduling method of claim 1, further comprising:

for each active physical machine in the period to be scheduled:

setting each active physical machine to a high performance mode if the provided resource amount of one type of resource is larger than a fourth threshold;

and setting each active physical machine to be in an energy-saving mode under the condition that the provided resource quantity of each type of resource is less than or equal to a fourth threshold value.

15. An energy-saving scheduling apparatus, comprising:

the acquisition module is configured to acquire historical resource usage of multiple types of resources of each historical time period for each created virtual machine;

and the scheduling module is configured to schedule each virtual machine to be created and each created virtual machine in a time period to be scheduled according to the service requirement of the user and the historical resource usage of the resources.

16. An energy-saving scheduling apparatus, comprising:

a memory; and

a processor coupled to the memory, the processor configured to perform the energy-saving scheduling method of any of claims 1 to 14 based on instructions stored in the memory.

17. A computer-storable medium having stored thereon computer program instructions which, when executed by a processor, implement the energy saving scheduling method of any one of claims 1 to 14.

Technical Field

The disclosure relates to the field of cloud computing, and in particular, to an energy-saving scheduling method and apparatus, and a computer-readable storage medium.

Background

With the development of cloud computing technology, many clients such as governments, organizations and enterprises choose to migrate an original information system to a cloud computing platform, wherein the cloud computing platform based on private cloud is a choice of many clients, and the main objective is to realize the cloud of the information system, reduce cost and increase efficiency.

Based on a cloud computing platform of a private cloud, the traditional energy-saving technology uses devices and servers with lower energy consumption or selects a transparent building and a region with constant temperature all year round to construct an Internet Data Center (IDC) so as to achieve the purpose of energy saving. However, selecting a device with low power consumption will cause a loss in system performance and a reduction in the load capacity of the overall system. The constraints for building IDCs in a particular region are very large, and the construction and design costs are very high, which is not affordable by current private cloud customers.

The related energy-saving technology enables the work load on the physical machine to be more balanced through resource scheduling so as to achieve the purpose of energy saving.

Disclosure of Invention

The inventor thinks that: in the related energy-saving technology, even though the work loads of all physical machines of the whole data center cluster are balanced, in order to guarantee the basic system operation, the physical servers and the air conditioning system still form huge energy consumption, and the energy-saving effect is limited.

In view of the above technical problem, the present disclosure provides a solution to further reduce energy consumption.

According to a first aspect of the present disclosure, there is provided an energy-saving scheduling method, including: for each created virtual machine, acquiring historical resource usage of multiple types of resources of each historical time period; and scheduling each virtual machine to be created and each created virtual machine in the time period to be scheduled according to the service requirement of the user and the historical resource usage of the various types of resources.

In some embodiments, the service requirement includes a first service requirement, and scheduling each virtual machine to be created in the time period to be scheduled includes: determining at least one active physical machine which can deploy each virtual machine to be created according to the first service requirement; for each type of resources of each active physical machine, acquiring the provided resource quantity; determining peak resources and valley resources of each active physical machine according to the provided resource amount of each resource of each active physical machine; determining peak resources and valley resources of each virtual machine to be created according to the historical resource usage of the created virtual machine with the same specification as that of each virtual machine to be created; and deploying each virtual machine to be created to the active physical machine with the most kinds of resources complementary to the peak and valley of each virtual machine to be created, wherein the peak value complementation comprises that for the same kind of resources, the virtual machine to be created is the peak value resource and the active physical machine is the valley value resource.

In some embodiments, determining the peak and valley resources of each active physical machine based on the provided resource amounts of the various types of resources of each active physical machine comprises: performing first normalization processing on the provided resource quantity of each type of resources; calculating the average value of the provided resource quantity of each type of resource to obtain a first average value; determining resources with provided resource quantity larger than the first average value as peak resources of each active physical machine; determining the resource with the provided resource amount smaller than or equal to the first average value as the valley resource of each active physical machine.

In some embodiments, the first normalization process comprises: for each type of resource, calculating the ratio of the total amount of the available resources of each active physical machine to the maximum total amount of the available resources in each active physical machine; multiplying the ratio based on the available resource usage of each active physical machine.

In some embodiments, before scheduling each virtual machine to be created and each created virtual machine, the method further includes: and for each created virtual machine, performing second normalization processing on the historical resource usage of each type of resource in each historical time period.

In some embodiments, determining the peak resource and the valley resource of each virtual machine to be created according to the historical resource usage of the created virtual machine having the same specification as the each virtual machine to be created comprises: determining a plurality of historical time periods corresponding to the time period to be scheduled as reference time periods; for each type of resources of each created virtual machine with the same specification as that of each virtual machine to be created, determining the average value of historical resource usage of a plurality of reference time periods as the estimated resource usage of each virtual machine to be created; calculating the average value of the estimated resource consumption of each resource to obtain a second average value; determining the resources with the estimated resource usage larger than the second average value as peak resources of each virtual machine to be created; and determining the resources with the estimated resource usage less than or equal to the second average value as valley resources of each virtual machine to be created.

In some embodiments, the second normalization process comprises: for each type of resources, under the condition that the total amount of the resources which can be provided by each active physical machine is the same, the total amount of the resources which can be provided by any active physical machine is taken as a reference, and the historical resource usage is normalized.

In some embodiments, the second normalization process further comprises: for each type of resources, under the condition that the total amount of the resources which can be provided by each active physical machine is different, the historical resource usage is normalized by taking the result of normalization processing on the total amount of the resources which can be provided by each active physical machine as a reference.

In some embodiments, the service requirement further includes a second service requirement, and in the time period to be scheduled, scheduling each created virtual machine includes: for each active physical machine, determining at least one created virtual machine set which can be deployed on each active physical machine according to a second service requirement of a user; determining peak resources and valley resources of each created virtual machine according to the historical resource usage of each type of resource of each created virtual machine; for each created virtual machine set, migrating the created virtual machines of each created virtual machine set to active physical machines corresponding to the each created virtual machine set under the condition that at least one type of resource peak-valley complementation exists between the two created virtual machines, wherein the peak-valley complementation comprises that for the same type of resources, one created virtual machine is a peak resource and the other created virtual machine is a valley resource.

In some embodiments, scheduling each created virtual machine further comprises: for each active physical machine, determining the sum of historical resource usage of each created virtual machine deployed on the active physical machine; and under the condition that the sum is larger than the total amount of the available resources of each active physical machine, migrating at least one created virtual machine which is already deployed on each active physical machine to other active physical machines except each active physical machine until the sum of the historical resource usage of each created virtual machine which is already deployed on each active physical machine is smaller than or equal to the total amount of the available resources.

In some embodiments, energy-saving scheduling each created virtual machine further comprises: under the condition that the sum is smaller than the preset proportion of the total amount of the resources which can be provided by each active physical machine, migrating each created virtual machine which is already deployed on each active physical machine to other active physical machines except each active physical machine; and controlling each active physical machine to switch to a sleep mode.

In some embodiments, the other active physical machines include other active physical machines that may provide the greatest resource margins.

In some embodiments, scheduling each created virtual machine further comprises: and in the case that the sum of the total amount of the available resources of all the active physical machines is less than the sum of the historical resource usage of all the created virtual machines, waking up the physical machines partially in the dormant state until the sum of the total amount of the available resources of all the active physical machines is greater than or equal to the sum of the historical resource usage of all the created virtual machines.

In some embodiments, further comprising: for each active physical machine in the period to be scheduled: setting each active physical machine to a high performance mode if the provided resource amount of one type of resource is larger than a fourth threshold; and setting each active physical machine to be in an energy-saving mode under the condition that the provided resource quantity of each type of resource is less than or equal to a fourth threshold value.

According to a second aspect of the present disclosure, there is provided an energy-saving scheduling apparatus, including: the acquisition module is configured to acquire historical resource usage of multiple types of resources of each historical time period for each created virtual machine; and the scheduling module is configured to schedule each virtual machine to be created and each created virtual machine in a time period to be scheduled according to the service requirement of the user and the historical resource usage of the resources.

According to a third aspect of the present disclosure, there is provided an energy-saving scheduling apparatus, including: a memory; and a processor coupled to the memory, the processor configured to execute the power-saving scheduling method according to any of the above embodiments based on instructions stored in the memory.

According to a fourth aspect of the present disclosure, a computer-readable storage medium has stored thereon computer program instructions, which when executed by a processor, implement the energy-saving scheduling method according to any of the embodiments described above.

In the above embodiment, the power consumption is further reduced.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.

The present disclosure may be more clearly understood from the following detailed description, taken with reference to the accompanying drawings, in which:

fig. 1 illustrates a flow diagram of a method of energy efficient scheduling according to some embodiments of the present disclosure;

FIG. 2 illustrates a flow diagram for scheduling each virtual machine to be created, according to some embodiments of the present disclosure;

FIG. 3 illustrates a flow diagram for scheduling various created virtual machines in accordance with some embodiments of the present disclosure;

FIG. 4A illustrates a schematic diagram of resource allocation for an active physical machine, according to some embodiments of the present disclosure;

FIG. 4B illustrates a schematic diagram of projected resource usage for a virtual machine to be created, in accordance with some embodiments of the present disclosure;

FIG. 4C is a schematic diagram illustrating resource allocation of the active physical machine after deployment of the virtual machine to be created as shown in FIG. 4B to the active physical machine as shown in FIG. 4A, according to some embodiments of the present disclosure;

FIG. 5 illustrates a schematic diagram of physical machine state control, according to some embodiments of the present disclosure;

fig. 6 illustrates a state diagram of a physical server cluster after energy-saving scheduling by an energy-saving scheduling method according to some embodiments of the present disclosure;

fig. 7 illustrates a block diagram of an energy-saving scheduling apparatus according to some embodiments of the present disclosure;

fig. 8 illustrates a block diagram of an energy-saving scheduling apparatus according to some embodiments of the present disclosure;

FIG. 9 illustrates a block diagram of a computer system for implementing some embodiments of the present disclosure.

Detailed Description

Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.

Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.

The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.

Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.

In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.

Fig. 1 illustrates a flow diagram of a method of energy-saving scheduling according to some embodiments of the present disclosure.

As shown in fig. 1, the energy-saving scheduling method includes steps S110 to S120.

In step S110, for each created virtual machine, the historical resource usage of the multiple types of resources for each historical time period is obtained.

In some embodiments, the historical time period is a time period corresponding to each hour of a day. For example, historical resource usage for multiple types of resources for each of the same historical time periods for multiple days is obtained. In other embodiments, the historical time period is a time period corresponding to days of a week, month, or year.

In some embodiments, the plurality of types of resources include a CPU work instruction cycle number, a memory usage amount, a network IO number, a network IO traffic, a storage IO number, and a storage IO total amount. For example, the resource usage of the multiple types of resources is expressed by 6 tuples < the number of cycles of CPU work instructions, the memory usage, the number of network IO times, the network IO traffic, the number of storage IO times, and the total number of storage IO >.

The number of the CPU work instruction cycles is used for accurately measuring the actual use condition of the CPU by the virtual machine. The memory usage is an accumulated value of the memory usage per second in the memory existence time period t. The network IO and the storage IO are divided into times and total amount to distinguish the frequent IO condition and the large data volume IO condition.

In step S120, each virtual machine to be created and each created virtual machine are scheduled in the time period to be scheduled according to the service requirement of the user and the historical resource usage of the multiple types of resources.

According to the method and the device, migration scheduling is carried out on the virtual machines to be created and the created virtual machines in the future scheduling time period according to the service requirements and the historical resources of the various resources, so that reasonable allocation of the resources is achieved, and the purpose of further reducing cluster energy consumption is achieved.

The step of scheduling each virtual machine to be created in step S120 will be described in detail below with reference to fig. 2.

FIG. 2 illustrates a flow diagram for scheduling each virtual machine to be created according to some embodiments of the present disclosure.

As shown in fig. 2, in the time period to be scheduled, scheduling each virtual machine to be created includes steps S121 to S125. The business requirements include a first business requirement.

In step S121, at least one active physical machine that can deploy each virtual machine to be created is determined according to the first service requirement. For example, a first traffic demand is a technical characteristic of each virtual machine to be created. In some embodiments, the technical characteristic includes high availability or security.

For example, the created virtual machines include virtual machines 1, 2, 3, 4, and the active physical machines that deploy virtual machines 1, 2, 3, 4 are physical machines A, B, A, C, respectively. The virtual machine to be created includes the virtual machine 5. In some embodiments, a high availability indicates that virtual machine 5 cannot be deployed on the same physical machine as virtual machine 2. Security means that virtual machine 5 must be deployed on the same physical machine as virtual machine 3. For virtual machine 5, in the event that the first traffic demand is highly available, the active physical machines where virtual machine 5 may be deployed include physical machine a and physical machine C.

In step S122, for each type of resource of each active physical machine, the provided resource amount is acquired.

In step S123, the peak resource and the valley resource of each active physical machine are determined according to the provided resource amount of each type of resource of each active physical machine.

Determining the peak and valley resources for each active physical machine based on the provided resource amounts of the various types of resources for each active physical machine is accomplished, for example, by the following steps.

First, a first normalization process is performed on the provided resource amount of each type of resource.

In some embodiments, the first normalization process is implemented as follows.

First, for each type of resource, a ratio of the total amount of available resources of each active physical machine to the maximum total amount of available resources in each active physical machine is calculated. For example, the total amount of available resources is obtained by acquisition.

The total amount of the available resources is the maximum value of the available resources of each type of resources of the physical machine.

The maximum value of the number of cycles of the CPU work instruction is the total number of cycles in all t periods of the physical machine. The maximum value of the memory usage is the total memory of the physical machine minus the memory usage of the management program and the system program. The maximum value of the network IO times is the maximum network IO times which are conducted in the system within t time historically, and the network IO times are updated when a new maximum value exists. The maximum value of the network IO flow is the maximum network transmission data volume which can be reached within t time calculated according to the network bandwidth. The maximum value of the IO storage times is the maximum IO storage times performed within t time in the system in history, and the IO storage times are updated when a new maximum value exists. The maximum storage IO total amount is the maximum transmission data amount which can be reached in t time calculated according to the storage bandwidth.

The ratio is then multiplied based on the available resource usage of each active physical machine.

Secondly, calculating the average value of the provided resource quantity of each type of resource to obtain a first average value. It should be understood that the provided resource amount here is the provided resource amount after the first normalization processing is performed. For example, for 6 types of resources, i.e., the CPU work instruction cycle number, the memory usage amount, the network IO frequency, the network IO traffic, the storage IO frequency, and the total storage IO amount, the provided resource amounts of the active physical machine are 0.7, 0.4, 0.3, 0.5, 0.6, and 0.5, respectively. The first mean value is (0.7+0.4+0.3+0.5+0.6+0.5) ÷ 6 ═ 0.5.

Then, the resource whose resource amount is provided is greater than the first average value is determined as the peak resource of each active physical machine.

And finally, determining the resources with the provided resource quantity smaller than or equal to the first average value as valley resources of each active physical machine.

In step S124, the peak resource and the valley resource of each virtual machine to be created are determined according to the historical resource usage of the created virtual machine having the same specification as each virtual machine to be created.

In some embodiments, the following steps are further included before scheduling each virtual machine to be created and each created virtual machine in step S120 shown in fig. 1.

And for each created virtual machine, performing second normalization processing on the historical resource usage of each type of resource in each historical time period.

The second normalization processing is realized, for example, as follows.

In some embodiments, for each type of resource, in the case that the total amount of the available resources of each active physical machine is the same, the historical resource usage is normalized based on the total amount of the available resources of any active physical machine.

In other embodiments, for each type of resource, in the case that the total amount of the resources that can be provided by each active physical machine is different, the historical resource usage is normalized with reference to the result of normalizing the total amount of the resources that can be provided by each active physical machine. For example, the total amount of available resources for each active physical machine is normalized by the following formula. For each type of resource, the total amount of resources available for active physical machine a × (total amount of resources available for active physical machine ÷ maximum total amount of resources available in each active physical machine).

For example, step S124 is implemented by determining the peak resource and the valley resource of each virtual machine to be created according to the historical resource usage of the created virtual machine having the same specification as each virtual machine to be created.

Firstly, determining a historical time period corresponding to a time period to be scheduled as a reference time period. The reference period is plural. For example, the time period to be scheduled is 10 to 11 points in a day. Then, the historical time period corresponding to the time period to be scheduled is 10 to 11 points in the multiple days of the history. The reference time period is 10 to 11 points in the historical multiple days, each day of the historical multiple days having a reference time period.

Secondly, for each type of resources of each created virtual machine with the same specification as that of each virtual machine to be created, determining the average value of the historical resource usage of a plurality of reference time periods as the estimated resource usage of each virtual machine to be created. In this way, the accuracy of the prediction can be improved.

And thirdly, calculating the average value of the estimated resource consumption of each type of resource to obtain a second average value. In some embodiments, outlier processing is performed on the estimated resource usage prior to calculating the second average. This way, the reliability of the second average value is improved, and the accuracy of determining the peak value resource and the valley value resource is improved.

And then, determining the resources with the estimated resource usage larger than the second average value as the peak resource of each virtual machine to be created.

And finally, determining the estimated resource consumption which is less than or equal to the second average value as the valley resource of each virtual machine to be created.

In step S125, each virtual machine to be created is deployed to the most heterogeneous active physical machine of resources complementary to the peak and valley of each virtual machine to be created. The peak value complementation here includes that for the same type of resources, the virtual machine to be created is the peak value resource and the active physical machine is the valley value resource.

In some embodiments, step S121 is a scheduling stage of a first level of the virtual machine to be created, which is a policy stage. Step S122-step S125 constitute a second-level scheduling stage of a second-level scheduling decision mechanism of the virtual machine to be created, for example, a flex-grow (flexible allocation) stage.

Returning to step S120 of fig. 1, the step of scheduling each created virtual machine in step S120 will be described in detail below with reference to fig. 3.

FIG. 3 illustrates a flow diagram for scheduling various created virtual machines in accordance with some embodiments of the present disclosure.

As shown in fig. 3, the scheduling of each created virtual machine in the time period to be scheduled includes steps S121 '-S123'. The business requirements also include a second business requirement. For example, the second business requirement is that virtual machines 1 and 2 cannot be deployed on the same physical machine.

In step S121', for each active physical machine, at least one created set of virtual machines that can be deployed on each active physical machine is determined according to the second business requirement of the user. For example, for active physical machine a, the at least one set of created virtual machines that may be deployed on active physical machine a includes virtual machine 1, virtual machine 3, and virtual machine 4.

In step S122', the peak resource and the valley resource of each created virtual machine are determined according to the historical resource usage of each type of resource of each created virtual machine.

First, for each created virtual machine, second normalization processing is performed on the historical resource usage of each type of resource for each historical time period.

And secondly, calculating the average value of the historical resource usage of various resources to obtain a third average value.

And then, determining the peak resource of each created virtual machine according to the resource with the historical resource usage larger than the third average value.

And finally, determining the valley resource of each created virtual machine according to the resource with the historical resource usage less than or equal to the third average value.

In step S123', for each created virtual machine set, in the case that there are at least one type of resource peak-valley complements of two created virtual machines, the created virtual machines of each created virtual machine set are migrated to the active physical machines corresponding to each created virtual machine set. Peak-to-valley complementation here includes for the same class of resources, one created virtual machine being a peak resource and another created virtual machine being a valley resource.

In some embodiments, scheduling each created virtual machine further comprises step S124 '-step S125'.

In step S124', for each active physical machine, a sum of historical resource usage of the respective created virtual machines already deployed on each active physical machine is determined.

In step S125', in a case that the sum is greater than the total amount of resources that can be provided for each active physical machine, migrating at least one created virtual machine that has been deployed on each active physical machine to other active physical machines except for each active physical machine until the sum of the historical resource usage amounts of the created virtual machines that have been deployed on each active physical machine is less than or equal to the total amount of resources that can be provided.

In some embodiments, scheduling each created virtual machine further comprises step S126 '-step S127'.

In step S126', in a case that the sum is smaller than the preset proportion of the total amount of the resources that can be provided by each active physical machine, migrating the created virtual machines that have been deployed on each active physical machine to other active physical machines except each active physical machine. For example, the other active physical machines include the other active physical machines that may provide the largest resource margin. In some embodiments, the resource margin may be provided as the total amount of resources that may be provided minus the amount of resources that have been provided. In other embodiments, the resource margin may be provided by subtracting the amount of the provided resource from the total amount of the available resource, and then subtracting the amount of the emergency resource. A certain emergency resource space is reserved on each physical machine, so that the system can bear service flow under emergency conditions such as flow jitter and flow burst.

Under the condition that the sum is smaller than the preset proportion of the total amount of the resources which can be provided by each active physical machine, for the current active physical machine, the historical resource usage of each created virtual machine which is deployed on the current active physical machine reaches the trough.

In step S127', each active physical machine is controlled to switch to the sleep mode.

In some embodiments, scheduling each created virtual machine further comprises step S128'.

In step S128', in the case that the sum of the total amount of the providable resources of all the active physical machines is less than the sum of the historical resource usage of all the created virtual machines, the physical machines partially in the dormant state are awakened until the sum of the total amount of the providable resources of all the active physical machines is greater than or equal to the sum of the historical resource usage of all the created virtual machines.

In some embodiments, the energy-saving scheduling method further includes the following steps.

And in the time period to be scheduled, setting each active physical machine to be in a high-performance mode under the condition that the resource with the provided resource quantity larger than a fourth threshold exists in the active physical machines. And setting each active physical machine to be in the energy-saving mode under the condition that the provided resource amount of each type of resource is less than or equal to the fourth threshold value.

According to the energy-saving scheduling method, multi-resource dimensionality is considered, different types of virtual machines are scheduled according to historical resource usage and service requirements of users, energy consumption is further reduced, and the method is more targeted.

FIG. 4A illustrates a schematic diagram of resource allocation for an active physical machine according to some embodiments of the present disclosure.

As shown in fig. 4A, the abscissa represents the resource type, and the ordinate represents the normalized resource amount of each type of resource. For each type of resource of the active physical machine, the resource amount allocation condition comprises the provided resource amount, the available resource allowance and the emergency resource amount. The sum of the provided resource amount, the providable resource margin and the emergency resource amount is the total amount of providable resources of the active physical machine. For example, memory usage, network IO traffic, and total amount of storage IO are underestimated resources.

FIG. 4B illustrates a diagram of projected resource usage for a virtual machine to be created, according to some embodiments of the present disclosure.

As shown in fig. 4B, the abscissa is the resource type, and the ordinate is the normalized resource amount of each type of resource. For the virtual machine to be created, the resource types include the number of cycles of the CPU work instruction, the memory usage, the number of network IO times, the network IO flow, the number of storage IO times, and the total number of storage IO. For example, memory usage and network IO traffic are peak resources.

FIG. 4C is a schematic diagram illustrating resource allocation of the active physical machine after deployment of the virtual machine to be created as shown in FIG. 4B to the active physical machine as shown in FIG. 4A according to some embodiments of the present disclosure.

As shown in fig. 4C, the abscissa is the resource type, and the ordinate is the normalized resource amount of each type of resource. For the virtual machine to be created as shown in fig. 4B, the memory usage and the network IO traffic are peak resources. For the active physical machine shown in fig. 4A, the memory usage, the network IO traffic, and the total storage IO amount are underestimated resources. The resource types complementary to the peak-valley of the virtual machine to be created are memory usage and network IO traffic. The assumption is that the peak-to-valley complement the most active physical machines. This arrangement may be referred to as valley filling.

FIG. 5 illustrates a schematic diagram of physical machine state control, according to some embodiments of the present disclosure.

As shown in fig. 5, when the physical machine is in the sleep mode, if the energy-saving scheduling system determines that more physical machines are needed to provide resources, the energy-saving scheduling system wakes up the physical machine, so that the physical machine is switched from the sleep mode to the energy-saving mode. And under the condition that the physical machine is in the energy-saving mode, if the provided resource usage of one type of resources is larger than the fourth threshold value, namely the performance is improved, the physical machine is switched from the energy-saving mode to the high-performance mode. And under the condition that the physical machine is in the high-performance mode, if the provided resource amount of each type of resource is less than or equal to the fourth threshold value, namely the performance is adjusted downwards, the physical machine is switched from the high-performance mode to the energy-saving mode. Under the condition that the physical machine is in the energy-saving mode or the high-performance mode, if the virtual machines on the physical machine are all migrated to other physical machines, namely the resources are emptied, the physical machine is switched to the sleep mode from the energy-saving mode or the high-performance mode.

The present disclosure minimizes energy consumption by controlling the state of the physical machine periodically.

Fig. 6 illustrates a state diagram of a physical server cluster after energy-saving scheduling according to some embodiments of the present disclosure.

As shown in fig. 6, by the energy saving method of the present disclosure, the modes of the servers (physical machines) in different racks under each network device are different, so that energy consumption is reduced to the maximum extent, and resource utilization rate is improved.

Fig. 7 illustrates a block diagram of an energy-saving scheduling apparatus according to some embodiments of the present disclosure.

As shown in fig. 7, the energy-saving scheduler 7 includes an acquisition module 71 and a scheduling module 72.

The obtaining module 71 is configured to obtain historical resource usage of multiple types of resources for each historical time period for each created virtual machine, for example, to execute step S110 shown in fig. 1.

The scheduling module 72 is configured to schedule each virtual machine to be created and each created virtual machine in the time period to be scheduled according to the service requirement of the user and the historical resource usage of the multiple types of resources, for example, execute step S120 shown in fig. 1.

Fig. 8 illustrates a block diagram of an energy-saving scheduling apparatus according to some embodiments of the present disclosure.

As shown in fig. 8, the energy-saving scheduling device 8 includes a memory 81; and a processor 82 coupled to the memory 81, wherein the memory 81 is used for storing instructions for executing the corresponding embodiment of the energy-saving scheduling method. The processor 82 is configured to perform the power saving scheduling method in any of the embodiments of the present disclosure based on instructions stored in the memory 81.

FIG. 9 illustrates a block diagram of a computer system for implementing some embodiments of the present disclosure.

As shown in FIG. 9, the computer system 90 may be embodied in the form of a general purpose computing device. The computer system 90 includes a memory 910, a processor 920, and a bus 900 that connects the various system components.

The memory 910 may include, for example, system memory, non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), and other programs. The system memory may include volatile storage media such as Random Access Memory (RAM) and/or cache memory. The non-volatile storage medium stores, for instance, instructions to perform corresponding embodiments of at least one of the energy-saving scheduling methods. Non-volatile storage media include, but are not limited to, magnetic disk storage, optical storage, flash memory, and the like.

The processor 920 may be implemented as discrete hardware components, such as a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gates or transistors, or the like. Accordingly, each of the modules, such as the judging module and the determining module, may be implemented by a Central Processing Unit (CPU) executing instructions in a memory for performing the corresponding step, or may be implemented by a dedicated circuit for performing the corresponding step.

Bus 900 may use any of a variety of bus architectures. For example, bus structures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, and Peripheral Component Interconnect (PCI) bus.

The computer system 90 may also include an input-output interface 930, a network interface 940, a storage interface 950, and so forth. These interfaces 930, 940, 950 and the memory 99 may be connected to the processor 920 via a bus 900. The input/output interface 930 may provide a connection interface for an input/output device such as a display, a mouse, a keyboard, and the like. The network interface 940 provides a connection interface for various networking devices. The storage interface 950 provides a connection interface for external storage devices such as a floppy disk, a usb disk, and an SD card.

Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.

These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable apparatus to produce a machine, such that the execution of the instructions by the processor results in an apparatus that implements the functions specified in the flowchart and/or block diagram block or blocks.

These computer-readable program instructions may also be stored in a computer-readable memory that can direct a computer to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart and/or block diagram block or blocks.

The present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects.

By the energy-saving scheduling method and device and the computer storage medium in the embodiment, energy consumption is further reduced.

So far, the energy-saving scheduling method and apparatus, and the computer-readable storage medium according to the present disclosure have been described in detail. Some details that are well known in the art have not been described in order to avoid obscuring the concepts of the present disclosure. It will be fully apparent to those skilled in the art from the foregoing description how to practice the presently disclosed embodiments.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于指令的能量特性和机器学习有效地操作处理系统的技术

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!