Resource scheduling method and device in cloud environment, medium and equipment

By predicting data center load and adjusting host queues, combined with ant colony optimization to optimize resource allocation, the problem of unreasonable resource scheduling in cloud computing is solved, reducing data center power consumption and improving resource utilization.

CN119847728BActive Publication Date: 2025-10-17SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411775951.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-10-17
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

Existing static resource scheduling algorithms are not suitable for cloud computing environments and cannot effectively manage the application and release of virtual machines, resulting in high power consumption and unreasonable resource allocation in data centers.

Method used

By predicting the data center load for the next cycle, adjusting the start and stop of host queues, allocating virtual machine resources reasonably, and using ant colony optimization to optimize host utilization, data center power consumption is reduced.

Benefits of technology

It effectively reduces the power consumption of data centers, improves the rationality of resource allocation and the utilization rate of host machines, avoids frequent power on/off cycles, and adapts to the dynamic nature of cloud computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847728B_ABST
    Figure CN119847728B_ABST
Patent Text Reader

Abstract

The application provides a resource scheduling method and device in a cloud environment, a medium and equipment. The method comprises the following steps: predicting a data center load in a next period according to a data center load in a current period and a data center load in a previous period; adjusting an open host queue and a closed host queue according to a predicted value of the data center load in the next period and a management strategy; when a virtual machine application request of a user is received, searching for a host machine satisfying required resources of a virtual machine applied by the user in the open host queue, taking the searched host machine as a target host machine; and assigning the virtual machine applied by the user to the target host machine, creating the virtual machine applied by the user on the target host machine, and adding the created virtual machine to a virtual machine queue. The application provides a suitable resource scheduling strategy for a cloud computing environment, and can effectively reduce power consumption of a data center.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of resource scheduling, and in particular to a resource scheduling method and device in a cloud environment, a medium and equipment. BACKGROUND

[0002] With the continuous improvement of computer performance and the rapid development of Internet technology, a new computing method, cloud computing, has emerged to meet the growing computing needs and massive data processing needs of people. Resource scheduling is a core problem in cloud computing. For grid computing, many static resource scheduling algorithms have been proposed and applied. However, these static resource scheduling algorithms for grid computing are not suitable for resource scheduling in cloud computing, and the reasons include the following three aspects:

[0003] First, the resource scheduling problem in grid computing mostly only considers how to reasonably allocate a batch of grid tasks to grid resources to achieve optimal allocation of current resources. However, in cloud computing, there is always application and release of virtual machines. Therefore, static resource scheduling algorithms are not suitable for cloud computing.

[0004] Second, the running time of a grid task in grid computing is determined by the static resource scheduling strategy it selects. However, the usage time of a virtual machine in cloud computing is determined by the user, and the cloud computing resource scheduling strategy cannot determine the usage time of the virtual machine.

[0005] Finally, the purpose of resource scheduling in grid computing is to reduce task running time. However, the usage time of a virtual machine in cloud computing cannot be changed, so the main purpose of resource scheduling in cloud computing becomes how to reduce the power consumption of the data center. It can be seen that the purposes are different.

[0006] Based on the above reasons, it can be determined that static resource scheduling algorithms cannot be used in a cloud environment, and therefore a suitable resource scheduling scheme needs to be provided for the cloud environment. SUMMARY

[0007] To solve at least one of the above technical problems, the present application provides a resource scheduling method and device in a cloud environment, a medium and equipment.

[0008] According to a first aspect, the present application provides a resource scheduling method in a cloud environment, which includes:

[0009] predicting the data center load of the next period according to the data center load of the current period and the data center load of the last period;

[0010] adjust the open host queue and the closed host queue according to a predicted value of a data center load in a next period and a management policy formulated for reducing power consumption of the data center, wherein the open host queue comprises each host in the data center in an open state, and the closed host queue comprises each host in the data center in a closed state;

[0011] when receiving a virtual machine application request of a user, searching for a host satisfying required resources of a virtual machine applied by the user in the open host queue, and taking the searched host as a target host;

[0012] allocating the virtual machine applied by the user to the target host, creating the virtual machine applied by the user on the target host, and adding the created virtual machine to a virtual machine queue, wherein the virtual machine queue comprises each virtual machine created on each host of the data center.

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

[0014] if the host satisfying the required resources of the virtual machine applied by the user cannot be searched in the open host queue, searching for the host satisfying the required resources of the virtual machine applied by the user in the closed host queue, and taking the searched host as the target host;

[0015] turning on the target host, and transferring the target host from the closed host queue to the open host queue, so as to adjust the open host queue and the closed host queue;

[0016] allocating the virtual machine applied by the user to the target host, creating the virtual machine applied by the user on the target host, and adding the created virtual machine to the virtual machine queue.

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

[0018] when receiving a virtual machine release request of a user, destroying a virtual machine needed to be released by the user on a corresponding host, and deleting the virtual machine needed to be released by the user from the virtual machine queue;

[0019] turning off a host where the virtual machine needed to be released by the user is located, and transferring the host where the virtual machine needed to be released by the user is located from the open host queue to the closed host queue, so as to adjust the open host queue and the closed host queue.

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

[0021] periodically calculating an average utilization of each host in the active host queue;

[0022] determining whether the average utilization is less than a utilization threshold;

[0023] if yes, using an ant colony algorithm to re-allocate mapping relationships between each virtual machine and a host in the active host queue for the purpose of improving the average utilization of each host in the active host queue, and performing virtual machine migration according to the mapping relationships.

[0024] In one embodiment, the predicting the data center load of the next period according to the data center load of the current period and the data center load of the last period comprises:

[0025] comparing the data center load of the current period and the data center load of the last period, if the data center load of the current period is greater than the data center load of the last period, then the change trend of the data center load is an upward trend, and if the data center load of the current period is less than the data center load of the last period, then the change trend of the data center load is a downward trend;

[0026] calculating an adjustment value according to the change trend of the data center load;

[0027] if the change trend is the upward trend, then the adjustment value is added to the data center load of the current period to obtain the data center load of the next period, and if the change trend is the downward trend, then the adjustment value is subtracted from the data center load of the current period to obtain the data center load of the next period.

[0028] In one embodiment, the calculating the adjustment value according to the change trend of the data center load comprises:

[0029] if the change trend is the upward trend, then the data center load of the current period is compared with an average value of data center loads of a plurality of historical periods;

[0030] if the data center load of the current period is less than the average value of data center loads of the plurality of historical periods, then a first calculation formula is used to calculate the adjustment value, the first calculation formula being:

[0031] IncVal' = IncVal + (Re alIncVal - IncVal) · AdaptDgr

[0032] IncVal' = VT • (IncVal + (Re_alIncVal - DecVal) • AdaptDgr)

[0033] If the data center load in the current period is greater than or equal to the average of the data center loads in the plurality of historical periods, a second calculation formula is used to calculate the adjustment value, and the second calculation formula is:

[0034] IncVal' = VT • (IncVal + (Re_alIncVal - DecVal) • AdaptDgr)

[0035] = Min(IncVal + (Re_alIncVal - IncVal) • AdaptDgr, IncVal • PastGreater)

[0036] wherein the PastGreater is a proportion of the data center loads in the plurality of historical periods that are greater than the data center load in the current period.

[0037] In one embodiment, the calculating the adjustment value according to the change trend of the data center load comprises:

[0038] If the change trend is a decreasing trend, the data center load in the current period is compared with the average of the data center loads in the plurality of historical periods.

[0039] If the data center load in the current period is greater than the average of the data center loads in the plurality of historical periods, a third calculation formula is used to calculate the adjustment value, and the third calculation formula is:

[0040] IncVal' = VT • (IncVal + (Re_alIncVal - DecVal) • AdaptDgr)

[0041] wherein the IncVal' is the adjustment value calculated for the next period in the current period, the VT is a historical platform reduction value coefficient, the IncVal is the adjustment value calculated for the current period in the last period, the Re_alIncVal is the actual increased load value of the data center in the current period, the DecVal is the actual increased load value of the data center in the last period, and the AdaptDgr is a historical average load coefficient.

[0042] If the data center load in the current period is less than or equal to the average of the data center loads in the plurality of historical periods, a fourth calculation formula is used to calculate the adjustment value, and the fourth calculation formula is:

[0043] IncVal' = VT • (IncVal + (Re_alIncVal - DecVal) • AdaptDgr)

[0044] VT Min (IncVal + (Re alIncVal - DecVal) AdaptDgr, DecVal PastLess)

[0045] wherein, PastLess is a proportion of the data center load in a plurality of historical periods that is less than the data center load in the current period.

[0046] According to a second aspect, an embodiment of the present application provides a resource scheduling apparatus in a cloud environment, comprising:

[0047] a load prediction module configured to predict a data center load in a next period according to a data center load in a current period and a data center load in a previous period;

[0048] a first adjustment module configured to adjust an open host queue and a closed host queue according to a predicted value of the data center load in the next period and a management strategy formulated for the purpose of reducing power consumption of the data center; wherein the open host queue comprises each host in the data center in an open state, and the closed host queue comprises each host in the data center in a closed state;

[0049] a first search module configured to search for a host satisfying required resources of a virtual machine applied by a user in the open host queue when receiving a virtual machine application request of the user, and take the searched host as a target host;

[0050] a first allocation module configured to allocate the virtual machine applied by the user to the target host, to create the virtual machine applied by the user on the target host, and to add the created virtual machine to a virtual machine queue; wherein the virtual machine queue comprises each virtual machine created on each host in the data center.

[0051] In an embodiment, the apparatus can further comprise:

[0052] a second search module configured to search for a host satisfying required resources of a virtual machine applied by a user in the closed host queue if the host satisfying the required resources of the virtual machine applied by the user cannot be found in the open host queue, and take the searched host as a target host;

[0053] a second adjustment module configured to turn on the target host, and transfer the target host from the closed host queue to the open host queue, to realize adjustment of the open host queue and the closed host queue;

[0054] a second allocation module, configured to allocate the virtual machine applied for by the user to the target host machine, to create the virtual machine applied for by the user on the target host machine, and to add the created virtual machine to the virtual machine queue.

[0055] In one embodiment, the apparatus can further include:

[0056] a virtual machine release module, configured to, upon receiving a virtual machine release request of the user, destroy the virtual machine needed to be released by the user on the corresponding host machine, and delete the virtual machine needed to be released by the user from the virtual machine queue;

[0057] a third adjustment module, configured to close the host machine on which the virtual machine needed to be released by the user is located, and transfer the host machine on which the virtual machine needed to be released by the user is located from the open host machine queue to the closed host machine queue, to realize adjustment of the open host machine queue and the closed host machine queue.

[0058] In one embodiment, the apparatus can further include:

[0059] a power adjustment module, configured to periodically calculate average utilization of each host machine in the open host machine queue, to determine whether the average utilization is less than a utilization threshold, and to, if yes, re-allocate mapping relationship between each virtual machine and the host machine in the open host machine queue by using an ant colony algorithm for the purpose of improving average utilization of each host machine in the open host machine queue, and to perform virtual machine migration according to the mapping relationship.

[0060] In one embodiment, the load prediction module includes:

[0061] a trend determination unit, configured to compare the data center load of the current period and the data center load of the last period, to determine that the change trend of the data center load is an upward trend if the data center load of the current period is greater than the data center load of the last period, and to determine that the change trend of the data center load is a downward trend if the data center load of the current period is less than the data center load of the last period;

[0062] a first calculation unit, configured to calculate an adjustment value according to the change trend of the data center load;

[0063] a second calculation unit, configured to, if the change trend is an upward trend, increase the adjustment value on the basis of the data center load of the current period to obtain the data center load of the next period, and to, if the change trend is a downward trend, decrease the adjustment value on the basis of the data center load of the current period to obtain the data center load of the next period.

[0064] In one embodiment, the first calculation unit is specifically configured to perform the following steps:

[0065] If the change trend is an increasing trend, the data center load of the current period is compared with the average value of the data center loads of the plurality of historical periods;

[0066] If the data center load of the current period is less than the average value of the data center loads of the plurality of historical periods, the adjustment value is calculated by using a first calculation formula, the first calculation formula being:

[0067] IncVal'= IncVal + (Re_alIncVal - IncVal) · AdaptDgr

[0068] wherein IncVal' is the adjustment value calculated for the next period in the current period, IncVal is the adjustment value calculated for the current period in the last period; Re_alIncVal is the actual increased load value of the data center in the current period, and AdaptDgr is the historical average load coefficient;

[0069] If the data center load of the current period is greater than or equal to the average value of the data center loads of the plurality of historical periods, the adjustment value is calculated by using a second calculation formula, the second calculation formula being:

[0070] IncVal'= IncVal + (Re_alIncVal - IncVal) · AdaptDgr

[0071] = Min(IncVal + (Re_alIncVal - IncVal) · AdaptDgr, IncVal · PastGreater)

[0072] wherein PastGreater is the proportion of the data center loads greater than the data center load of the current period in the plurality of historical periods.

[0073] In one embodiment, the first calculation unit is specifically configured to perform the following steps:

[0074] If the change trend is a decreasing trend, the data center load of the current period is compared with the average value of the data center loads of the plurality of historical periods;

[0075] If the data center load of the current period is greater than the average value of the data center loads of the plurality of historical periods, the adjustment value is calculated by using a third calculation formula, the third calculation formula being:

[0076] IncVal'= VT · (IncVal + (Re_alIncVal - DecVal) · AdaptDgr)

[0077] IncVal' = VT · Min (IncVal + (Re_alIncVal - DecVal) · AdaptDgr, DecVal · PastLess)

[0078] If the data center load in the current period is less than or equal to the average of the data center loads in the plurality of historical periods, the adjustment value is calculated by using a fourth calculation formula, which is:

[0079] IncVal' = VT · Min (IncVal + (Re_alIncVal - DecVal) · AdaptDgr, DecVal · PastLess)

[0080] VT · Min (IncVal + (Re_alIncVal - DecVal) · AdaptDgr, DecVal · PastLess)

[0081] Wherein, PastLess is the proportion of the data center loads in the plurality of historical periods that are less than the data center load in the current period.

[0082] According to a third aspect, an embodiment of the present application provides a computer readable storage medium having stored thereon a computer program that, when executed in a computer, causes the computer to perform the method according to the first aspect.

[0083] According to a fourth aspect, an embodiment of the present application provides a computing device, comprising a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method according to the first aspect.

[0084] The resource scheduling method and device in the cloud environment provided by the embodiment of the present application firstly predict the data center load in the next period, and then adjust the start host queue and the close host queue according to the predicted value of the data center load in the next period and the management strategy formulated for the purpose of reducing the power consumption of the data center, so as to reduce the power consumption of the data center. When receiving the virtual machine application request of a user, the host satisfying the required resources of the virtual machine applied by the user is searched for in the start host queue, the searched host is taken as a target host, then the virtual machine applied by the user is allocated to the target host, the virtual machine applied by the user is created on the target host, and the created virtual machine is added to the virtual machine queue. It can be seen that the data center load in the next period is predicted, the start host queue and the close host queue are adjusted according to the predicted result and the management strategy, the power consumption of the data center can be reduced, the host can be reasonably started and stopped and the resource reservation can be performed, the host can be prevented from being frequently started and stopped, and the purpose of resource reservation is achieved. The embodiment of the present application provides a suitable resource scheduling strategy for the cloud computing environment, the power consumption of the data center can be effectively reduced, and the performance of the data center is improved. BRIEF DESCRIPTION OF DRAWINGS

[0085] Figure 1 It is a flowchart of the resource scheduling method in the cloud environment in an embodiment of the present application.

[0086] Figure 2 It is a structural block diagram of the resource scheduling device in the cloud environment in an embodiment of the present application. DETAILED DESCRIPTION

[0087] In a first aspect, the embodiment of the present application provides a resource scheduling method in a cloud environment, referring to Figure 1 The method comprises the following steps S110-S140:

[0088] S110, predicting the data center load in the next period according to the data center load in the current period and the data center load in the last period;

[0089] The period can be understood as a time. That is, it can be considered that the data center load in the next period is predicted according to the data center load in the current time and the data center load in the last time.

[0090] S120, adjusting the start host queue and the close host queue according to the predicted value of the data center load in the next period and the management strategy formulated for the purpose of reducing the power consumption of the data center; wherein the start host queue comprises each host in the data center in the start state, and the close host queue comprises each host in the data center in the close state;

[0091] The management strategy is formulated for reducing the power consumption of the data center.

[0092] Two queues need to be maintained, i.e., an on-host queue and an off-host queue, the on-host queue stores the identification information of each on-host, and the off-host queue stores the identification information of each off-host.

[0093] It can be seen that the on-off of the host is based on the predicted value of the data center load in the next period and the management strategy.

[0094] It can be seen that the two queues are adjusted in S120 based on the predicted value of the data center load in the next period and the management strategy, and the power consumption of the data center can be reduced after the adjustment.

[0095] S130, when receiving a virtual machine application request of a user, searching for a host satisfying the required resources of the virtual machine of the user application in the on-host queue, taking the searched host as a target host;

[0096] S140, assigning the virtual machine of the user application to the target host, creating the virtual machine of the user application on the target host, and adding the created virtual machine to a virtual machine queue; wherein the virtual machine queue includes each virtual machine created on each host of the data center.

[0097] A virtual machine queue needs to be maintained, which is used to record the identification information of each created virtual machine.

[0098] That is, when the user submits a virtual machine application request, the host satisfying the required resources of the virtual machine of the user application is searched in the on-host queue. If the host can be searched, the searched host is taken as a target host. Then the virtual machine of the user application is assigned to the target host, so that the virtual machine of the user application is created on the target host, and the created virtual machine is added to the virtual machine queue.

[0099] It can be seen that the data center load in the next period is predicted, the on-host queue and the off-host queue are adjusted according to the predicted result and the management strategy, the power consumption of the data center can be reduced, the host can be reasonably turned on and off, and the purpose of resource reservation can be achieved by avoiding frequent turning on and off of the host. The embodiment of the application provides a suitable resource scheduling strategy for the cloud computing environment, which can effectively reduce the power consumption of the data center and improve the performance of the data center.

[0100] In one embodiment, the method can further include the following steps S150-S170:

[0101] S150, if a host computer satisfying the required resources of the virtual machine applied by the user cannot be found in the start host computer queue, a host computer satisfying the required resources of the virtual machine applied by the user is found in the stop host computer queue, and the found host computer is taken as a target host computer;

[0102] S160, the target host computer is started, and the target host computer is transferred from the stop host computer queue to the start host computer queue, so as to adjust the start host computer queue and the stop host computer queue;

[0103] S170, the virtual machine applied by the user is allocated to the target host computer, so as to create the virtual machine applied by the user on the target host computer, and the created virtual machine is added to the virtual machine queue.

[0104] That is, if a host computer satisfying the required resources of the virtual machine applied by the user cannot be found in the start host computer queue, the stop host computer queue is searched, and the found host computer is taken as a target host computer. Since the target host computer is in a stop state, the target host computer needs to be started, and then the identification information of the target host computer is deleted from the stop host computer queue and added to the start host computer queue, so as to adjust the two queues. Then, the virtual machine applied by the user is allocated to the target host computer, so as to create the virtual machine applied by the user on the target host computer, and the created virtual machine is added to the virtual machine queue, so as to update the virtual machine queue.

[0105] In one embodiment, the method can further include steps S180-S190.

[0106] S180, when receiving a virtual machine release request of the user, destroying the virtual machine needed to be released by the user on the corresponding host computer, and deleting the virtual machine needed to be released by the user from the virtual machine queue;

[0107] S190, stopping the host computer where the virtual machine needed to be released by the user is located, and transferring the host computer where the virtual machine needed to be released by the user is located from the start host computer queue to the stop host computer queue, so as to adjust the start host computer queue and the stop host computer queue.

[0108] That is, when a user applies for releasing a virtual machine, the virtual machine is destroyed on the host computer where the virtual machine is located, and the identification information of the virtual machine is deleted from the virtual machine queue. Then, the host computer where the virtual machine is located is closed, the identification information of the host computer is deleted from the open host computer queue and added to the closed host computer queue. That is, the host computer is transferred from the open host computer queue to the closed host computer queue, so as to adjust the two queues.

[0109] In one embodiment, the method can further include S200-S220:

[0110] S200, periodically calculating the average utilization rate of each host computer in the open host computer queue;

[0111] S210, judging whether the average utilization rate is less than the utilization rate threshold;

[0112] S220, if yes, using an ant colony algorithm to re-distribute the mapping relationship between each virtual machine and the host computer in the open host computer queue for the purpose of improving the average utilization rate of each host computer in the open host computer queue, and performing virtual machine migration according to the mapping relationship.

[0113] That is, the average value of the utilization rate of each host computer in the open host computer queue is periodically calculated, and then the average utilization rate is obtained. It is judged whether the average utilization rate is less than the utilization rate threshold. If it is less than the utilization rate threshold, it means that the utilization rate of the open host computer queue is low at this time, and the utilization rate needs to be improved. In the case of needing to improve the utilization rate, the ant colony algorithm is used to re-distribute the mapping relationship between each virtual machine and the host computer in the open host computer queue, that is, to re-distribute and allocate. Finally, virtual machine migration is performed according to the mapping relationship.

[0114] In one embodiment, the method can further include S200-S220:

[0115] In actual scenarios, in order to improve the average utilization rate, virtual machines can be run as much as possible on some host computers in the open host computer queue, and some host computers can be left empty. These host computers that are left empty can be further judged according to the management strategy whether they need to be closed.

[0116] In one embodiment, the prediction of the data center load of the next period according to the data center load of the current period and the data center load of the last period in S110 can include S111-S113:

[0117] S111, comparing the data center load of the current period with the data center load of the last period, if the data center load of the current period is greater than the data center load of the last period, the change trend of the data center load is an upward trend; if the data center load of the current period is less than the data center load of the last period, the change trend of the data center load is a downward trend;

[0118] S112, calculating an adjustment value according to the change trend of the data center load;

[0119] S113, if the change trend is an upward trend, increasing the adjustment value on the basis of the data center load of the current period to obtain the data center load of the next period; if the change trend is a downward trend, decreasing the adjustment value on the basis of the data center load of the current period to obtain the data center load of the next period.

[0120] That is, first, the change trend of the data center load is determined according to the data center load of the current period and the data center load of the last period. Then, the adjustment value is calculated according to the change trend. Further, the adjustment value is increased or decreased on the basis of the data center load of the current period, that is, upward adjustment or downward adjustment is performed, to obtain the data center load of the next period, so as to complete the prediction of the data center load of the next period.

[0121] In one embodiment, the calculation of the adjustment value according to the change trend of the data center load in S112 can include a1-a3:

[0122] a1, if the change trend is an upward trend, comparing the data center load of the current period with the average value of the data center load of a plurality of historical periods;

[0123] a2, if the data center load of the current period is less than the average value of the data center load of a plurality of historical periods, a first calculation formula is used to calculate the adjustment value, the first calculation formula is:

[0124] IncVal'=IncVal+(Re_alIncVal-IncVal)·AdaptDgr

[0125] wherein, IncVal' is the adjustment value calculated in the current period for the next period, IncVal is the adjustment value calculated in the last period for the current period; Re_alIncVal is the actual increased load value of the data center in the current period, AdaptDgr is a historical average load coefficient; a3, if the data center load of the current period is greater than or equal to the average value of the data center load of a plurality of historical periods, a second calculation formula is used to calculate the adjustment value, the second calculation formula is:

[0126] IncVal'

[0127] = Min (IncVal + (Re alIncVal - IncVal) · AdaptDgr, IncVal · PastGreater)

[0128] wherein, PastGreater is the proportion of the data center load in the plurality of historical periods greater than the data center load in the current period.

[0129] It can be seen that when the change trend is an upward trend, there are also two cases: (1) the data center load in the current period is less than the average of the data center load in the plurality of historical periods; (2) the data center load in the current period is greater than or equal to the average of the data center load in the plurality of historical periods. In different cases, different calculation formulas are used to calculate the adjustment value, and at this time the adjustment value is an upward adjustment value, that is, an increase value.

[0130] In an embodiment, the calculation of the adjustment value according to the change trend of the data center load in S112 can include b1-b3:

[0131] b1, if the change trend is a downward trend, comparing the data center load in the current period with the average of the data center load in the plurality of historical periods;

[0132] b2, if the data center load in the current period is greater than the average of the data center load in the plurality of historical periods, a third calculation formula is used to calculate the adjustment value, and the third calculation formula is:

[0133] IncVal' = VT · (IncVal + (Re alIncVal - DecVal) · AdaptDgr)

[0134] wherein, IncVal' is the adjustment value calculated for the next period in the current period, VT is a historical platform reduction value coefficient, IncVal is the adjustment value calculated for the current period in the last period, Re alIncVal is the actual load value of the data center increased in the current period, DecVal is the actual load value of the data center increased in the last period, and AdaptDgr is a historical average load coefficient;

[0135] b3, if the data center load in the current period is less than or equal to the average of the data center load in the plurality of historical periods, a fourth calculation formula is used to calculate the adjustment value, and the fourth calculation formula is:

[0136] IncVal' = VT · (IncVal + (Re alIncVal - DecVal) · AdaptDgr)

[0137] VT·Min(IncVal+(Re_alIncVal-DecVal)·AdaptDgr, DecVal·PastLess)

[0138] Wherein, the PastLess is the proportion of the data center load in the current period which is less than the data center load in the multiple historical periods.

[0139] It can be seen that when the change trend is a downward trend, there are also two cases: (1) the data center load in the current period is greater than the average value of the data center load in the multiple historical periods; (2) the data center load in the current period is less than or equal to the average value of the data center load in the multiple historical periods. In different cases, different calculation formulas are used to calculate the adjustment value, and at this time the adjustment value is a downward adjustment value, that is, a reduction value.

[0140] In the embodiments of the present application, two points are mainly involved:

[0141] (1) predicting the data center load in the next period, and adjusting the opening host queue and the closing host queue according to the prediction result and the management strategy, so as to reasonably open and close the host and perform resource reservation. The advantage of this is that the data center load in the next period is predicted, the host is not frequently opened and closed, and the purpose of resource reservation is achieved.

[0142] (2) in order to adapt to the dynamic and real-time nature of cloud computing, the ant colony algorithm is run. When the average utilization rate of the opening host queue in the data center is low, the virtual machines are concentrated on some hosts by using the improved ant colony algorithm, so as to improve the average utilization rate. It can be seen that virtual machine migration is only performed when necessary, and the problem of additional power consumption of the data center caused by frequent virtual machine migration can be avoided.

[0143] It can be seen that in the method provided by the embodiments of the present application, the cloud computing resource scheduling strategy combining the prediction algorithm and the ant colony algorithm is used to reduce the power consumption of the data center.

[0144] In the cloud computing environment, resource scheduling is the core problem in cloud computing, and the advantages and disadvantages of the resource scheduling strategy in cloud computing directly affect the performance and power consumption of the entire data center. The present application has carried out in-depth research on the resource scheduling problem under cloud computing, and proposes a cloud computing resource scheduling strategy combining a prediction algorithm and an ant colony algorithm, which can effectively reduce the power consumption of the data center and improve the performance of the data center.

[0145] In a second aspect, the embodiments of the present application provide a resource scheduling device in a cloud environment, referring to Figure 2 The device 100 comprises:

[0146] The load prediction module 110 is configured to predict the data center load of a next period according to the data center load of the current period and the data center load of a previous period.

[0147] The first adjustment module 120 is configured to adjust the start host queue and the stop host queue according to the predicted value of the data center load of the next period and a management strategy formulated for the purpose of reducing the power consumption of the data center, wherein the start host queue comprises all the hosts in the start state in the data center, and the stop host queue comprises all the hosts in the stop state in the data center.

[0148] The first search module 130 is configured to search for a host satisfying the required resources of the virtual machine applied by the user in the start host queue when receiving the virtual machine application request of the user, and take the searched host as a target host.

[0149] The first allocation module 140 is configured to allocate the virtual machine applied by the user to the target host, create the virtual machine applied by the user on the target host, and add the created virtual machine to a virtual machine queue, wherein the virtual machine queue comprises all the virtual machines created on all the hosts in the data center.

[0150] In an embodiment, the apparatus can further comprise:

[0151] The second search module is configured to search for a host satisfying the required resources of the virtual machine applied by the user in the stop host queue if the host satisfying the required resources of the virtual machine applied by the user cannot be searched in the start host queue, and take the searched host as a target host.

[0152] The second adjustment module is configured to start the target host, and transfer the target host from the stop host queue to the start host queue, so as to adjust the start host queue and the stop host queue.

[0153] The second allocation module is configured to allocate the virtual machine applied by the user to the target host, create the virtual machine applied by the user on the target host, and add the created virtual machine to the virtual machine queue.

[0154] In an embodiment, the apparatus can further comprise:

[0155] The virtual machine release module is configured to destroy the virtual machine needed to be released by the user on the corresponding host when receiving the virtual machine release request of the user, and delete the virtual machine needed to be released by the user from the virtual machine queue.

[0156] The third adjusting module is configured to close the host computer where the virtual machine to be released by the user is located, and to transfer the host computer where the virtual machine to be released by the user is located from the start host computer queue to the close host computer queue, so as to adjust the start host computer queue and the close host computer queue.

[0157] In one embodiment, the apparatus can further include:

[0158] The power adjusting module is configured to periodically calculate the average utilization of each host computer in the start host computer queue, to determine whether the average utilization is less than a utilization threshold, and to use an ant colony algorithm to re-allocate the mapping relationship between each virtual machine and the host computer in the start host computer queue for the purpose of improving the average utilization of each host computer in the start host computer queue, and to perform virtual machine migration according to the mapping relationship.

[0159] In one embodiment, the load prediction module includes:

[0160] The trend determining unit is configured to compare the data center load of the current period and the data center load of the last period, to determine that the change trend of the data center load is an upward trend if the data center load of the current period is greater than the data center load of the last period, and to determine that the change trend of the data center load is a downward trend if the data center load of the current period is less than the data center load of the last period.

[0161] The first calculating unit is configured to calculate an adjustment value according to the change trend of the data center load.

[0162] The second calculating unit is configured to increase the adjustment value on the basis of the data center load of the current period to obtain the data center load of the next period if the change trend is an upward trend, and to decrease the adjustment value on the basis of the data center load of the current period to obtain the data center load of the next period if the change trend is a downward trend.

[0163] In one embodiment, the first calculating unit is specifically configured to perform the following steps:

[0164] If the change trend is an upward trend, the data center load of the current period is compared with the average value of the data center loads of a plurality of historical periods.

[0165] If the data center load of the current period is less than the average value of the data center loads of the plurality of historical periods, a first calculation formula is used to calculate the adjustment value, the first calculation formula being:

[0166] IncVal' = IncVal + (Re alIncVal - IncVal) · AdaptDgr

[0167] wherein IncVal' is the adjustment value calculated for the next period in the current period, IncVal is the adjustment value calculated for the current period in the last period, Re_alIncVal is the actual increased load value of the data center in the current period, and AdaptDgr is the historical average load coefficient;

[0168] If the data center load in the current period is greater than or equal to the average value of the data center load in the plurality of historical periods, the second calculation formula is used to calculate the adjustment value, and the second calculation formula is:

[0169] IncVal' = IncVal + (Re_alIncVal - IncVal) · AdaptDgr

[0170] = Min(IncVal+(Re_alIncVal-IncVal)·AdaptDgr,IncVal·PastGreater)

[0171] wherein PastGreater is the proportion of the data center load in the plurality of historical periods that is greater than the data center load in the current period.

[0172] In one embodiment, the first calculation unit is specifically configured to perform the following steps:

[0173] If the change trend is a decreasing trend, the data center load in the current period is compared with the average value of the data center load in the plurality of historical periods;

[0174] If the data center load in the current period is greater than the average value of the data center load in the plurality of historical periods, the third calculation formula is used to calculate the adjustment value, and the third calculation formula is:

[0175] IncVal' = VT · (IncVal + (Re_alIncVal - DecVal) · AdaptDgr)

[0176] wherein IncVal' is the adjustment value calculated for the next period in the current period, VT is the historical platform reduction value coefficient, IncVal is the adjustment value calculated for the current period in the last period, Re_alIncVal is the actual increased load value of the data center in the current period, DecVal is the actual increased load value of the data center in the last period, and AdaptDgr is the historical average load coefficient;

[0177] If the data center load in the current period is less than or equal to the average value of the data center load in the plurality of historical periods, the fourth calculation formula is used to calculate the adjustment value, and the fourth calculation formula is:

[0178] IncVal' = VT · (IncVal + (Re_alIncVal - DecVal) · AdaptDgr)

[0179] VT Min (IncVal + (Re alIncVal - DecVal) AdaptDgr, DecVal PastLess)

[0180] wherein, PastLess is a proportion of the data center load in a plurality of historical periods that is less than the data center load in the current period.

[0181] It can be understood that the explanations, specific embodiments, advantages, examples, and the like of the device provided by the embodiments of the present application can refer to the corresponding parts in the method provided by the first aspect, and will not be repeated here.

[0182] In a third aspect, a computer readable medium is provided, and the computer readable medium stores computer instructions. When the computer instructions are executed by a processor, the processor executes the method provided by the first aspect.

[0183] Specifically, a system or device equipped with a storage medium can be provided, and the storage medium stores software program codes for implementing the functions of any of the above embodiments, and the computer (or CPU or MPU) of the system or device reads and executes the program codes stored in the storage medium.

[0184] In this case, the program codes read from the storage medium can implement the functions of any of the above embodiments, and thus the program codes and the storage medium storing the program codes constitute a part of the present application.

[0185] The storage medium for providing the program codes includes a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program codes can be downloaded from a server computer via a communication network.

[0186] In addition, it should be clear that not only the program codes read by the computer can be executed, but also part or all of the actual operations can be completed by the operating system and the like operating on the computer based on the instructions of the program codes, thereby implementing the functions of any of the above embodiments.

[0187] In addition, it can be understood that the program codes read from the storage medium can be written into the memory provided in the expansion board inserted into the computer or the memory provided in the expansion module connected to the computer, and then part or all of the actual operations can be executed by the CPU and the like installed on the expansion board or the expansion module based on the instructions of the program codes, thereby implementing the functions of any of the above embodiments.

[0188] It can be understood that the explanation, specific implementation, beneficial effects, examples and the like of the content in the computer readable medium provided by the embodiments of the present application can refer to the corresponding parts in the method provided by the first aspect, and will not be repeated here.

[0189] In a fourth aspect, an embodiment of the present specification provides a computing device, comprising a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method in any one of the embodiments of the specification.

[0190] It can be understood that the explanation, specific implementation, beneficial effects, examples and the like of the content in the computer readable medium provided by the embodiments of the present application can refer to the corresponding parts in the method provided by the first aspect, and will not be repeated here.

[0191] Each of the embodiments in the present specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments mainly describes the difference from other embodiments. Especially, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the related parts can refer to the part of the method embodiments.

[0192] Those skilled in the art should realize that, in one or more examples described above, the functions described in the present application can be realized by hardware, software, a plug-in or any combination thereof. When realized by software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on a computer readable medium.

[0193] The above specific embodiments further specifically explain the purpose, technical scheme and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement and the like made on the basis of the technical scheme of the present application should be included in the protection scope of the present application.

Claims

1. A resource scheduling method in a cloud environment, characterized in that: include: Predicting the data center load for the next cycle based on the data center load for the current cycle and the data center load for the previous cycle; Adjusting a host startup queue and a host shutdown queue based on a predicted value of the data center load for the next cycle and a management policy formulated to reduce data center power consumption; wherein the host startup queue includes each host in the data center that is in a startup state, and the host shutdown queue includes each host in the data center that is in a shutdown state; Upon receiving a user's virtual machine application request, searching the host queue for a host that meets the resources required for the user's virtual machine application, and using the found host as the target host; Allocating the virtual machine requested by the user to the target host machine to create the virtual machine requested by the user on the target host machine, and adding the created virtual machine to a virtual machine queue; wherein the virtual machine queue includes each virtual machine created on each host machine in the data center; The step of predicting the data center load of the next cycle based on the data center load of the current cycle and the data center load of the previous cycle includes: Compare the data center load of the current cycle with the data center load of the previous cycle. If the data center load of the current cycle is greater than the data center load of the previous cycle, the change trend of the data center load is an upward trend; if the data center load of the current cycle is less than the data center load of the previous cycle, the change trend of the data center load is a downward trend; Calculating an adjustment value according to a change trend of the data center load; If the change trend is an upward trend, the adjustment value is added to the data center load of the current cycle to obtain the data center load of the next cycle; if the change trend is a downward trend, the adjustment value is reduced based on the data center load of the current cycle to obtain the data center load of the next cycle.

2. The method according to claim 1, characterized in that Also includes: If a host machine that meets the resources required by the virtual machine requested by the user cannot be found in the open host machine queue, a host machine that meets the resources required by the virtual machine requested by the user is searched in the closed host machine queue, and the found host machine is used as the target host machine; Turning on the target host machine and transferring the target host machine from the host-off queue to the host-on queue to adjust the host-on queue and the host-off queue; The virtual machine requested by the user is allocated to the target host machine, so as to create the virtual machine requested by the user on the target host machine, and add the created virtual machine to the virtual machine queue.

3. The method according to claim 1, characterized in that Also includes: Upon receiving a virtual machine release request from a user, destroying the virtual machine that the user needs to release on the corresponding host machine and deleting the virtual machine that the user needs to release from the virtual machine queue; The host machine where the virtual machine that the user needs to release is located is shut down, and the host machine where the virtual machine that the user needs to release is located is transferred from the host machine startup queue to the host machine shutdown queue to adjust the host machine startup queue and the host machine shutdown queue.

4. The method according to claim 1, wherein Also includes: Regularly calculating the average utilization of each host in the enabled host queue; Determining whether the average utilization rate is less than a utilization rate threshold; If so, the mapping relationship between each virtual machine and the host in the host queue is reallocated using an ant colony algorithm to improve the average utilization rate of each host in the host queue, and virtual machine migration is performed according to the mapping relationship.

5. The method according to claim 4, characterized in that The calculating the adjustment value according to the change trend of the data center load includes: If the change trend is an upward trend, compare the data center load of the current period with the average value of the data center load of multiple historical periods; If the data center load in the current cycle is less than the average value of the data center loads in multiple historical cycles, the adjustment value is calculated using the first calculation formula, which is: IncVal'=IncVal+(Re_alIncVal-IncVal)·AdaptDgr Where, IncVal' is the adjusted value calculated for the next cycle in the current cycle, IncVal is the adjusted value calculated for the current cycle in the previous cycle; RealIncVal is the actual increased load value of the data center in the current cycle, and AdaptDgr is the historical average load factor; If the data center load in the current cycle is greater than or equal to the average value of the data center loads in multiple historical cycles, the adjustment value is calculated using the second calculation formula, which is: IncVal' =Min(IncVal+(Re_alIncVal-IncVal)·AdaptDgr,IncVal·PastGreater) Here, PastGreater is the ratio of the data center load in multiple historical cycles to the data center load in the current cycle.

6. The method according to claim 5, characterized in that The calculating the adjustment value according to the change trend of the data center load includes: If the change trend is a downward trend, comparing the data center load of the current period with the average value of the data center load of multiple historical periods; If the data center load in the current cycle is greater than the average data center load of multiple historical cycles, the adjustment value is calculated using the third calculation formula, which is: IncVal'=VT·(IncVal+(Re_alIncVal-DecVal)·AdaptDgr) Where, IncVal' is the adjusted value calculated for the next cycle in the current cycle, VT is the historical platform reduction coefficient, IncVal is the adjusted value calculated for the current cycle in the previous cycle, RealIncVal is the actual load increase of the data center in the current cycle, DecVal is the actual load increase of the data center in the previous cycle, and AdaptDgr is the historical average load coefficient; If the data center load in the current cycle is less than or equal to the average value of the data center loads in multiple historical cycles, the adjustment value is calculated using the fourth calculation formula, which is: IncVal'= VT·Min(IncVal+(Re_alIncVal-DecVal)·AdaptDgr, DecVal·PastLess) Here, PastLess is the ratio of the data center load in multiple historical cycles to the data center load in the current cycle.

7. A resource scheduling device in a cloud environment, characterized in that: include: A load prediction module is used to predict the data center load of the next cycle based on the data center load of the current cycle and the data center load of the previous cycle; A first adjustment module is configured to adjust a host startup queue and a host shutdown queue based on a predicted value of the data center load for the next cycle and a management policy formulated to reduce power consumption in the data center; wherein the host startup queue includes each host in the data center that is in a startup state, and the host shutdown queue includes each host in the data center that is in a shutdown state; A first search module is configured to, upon receiving a user's virtual machine application request, search the host queue for a host that meets the resources required for the user's virtual machine application, and use the found host as a target host; A first allocation module is configured to allocate a user-requested virtual machine to the target host machine, create the user-requested virtual machine on the target host machine, and add the created virtual machine to a virtual machine queue; wherein the virtual machine queue includes virtual machines created on respective host machines in the data center, and predict the data center load for the next cycle based on the data center load for the current cycle and the data center load for the previous cycle, including: Compare the data center load of the current cycle with the data center load of the previous cycle. If the data center load of the current cycle is greater than the data center load of the previous cycle, the change trend of the data center load is an upward trend; if the data center load of the current cycle is less than the data center load of the previous cycle, the change trend of the data center load is a downward trend; Calculating an adjustment value according to a change trend of the data center load; If the change trend is an upward trend, the adjustment value is added to the data center load of the current cycle to obtain the data center load of the next cycle; if the change trend is a downward trend, the adjustment value is reduced based on the data center load of the current cycle to obtain the data center load of the next cycle.

8. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 6.

9. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Resource scheduling method based on virtual machine

    CN107168805A

  • Method for optimizing energy efficiency of cloud infrastructure

    CN118394452A