Search

US-20260127040-A1 - SYSTEM AND METHOD OF DYNAMICALLY ADJUSTING VIRTUAL MACHINES FOR A WORKLOAD

US20260127040A1US 20260127040 A1US20260127040 A1US 20260127040A1US-20260127040-A1

Abstract

A method for dynamically adjusting a number of virtual machines for a workload, includes: receiving a probability indicator for each of a plurality of N sequential stages, where N is a natural number greater than 1, of a likelihood that a virtual machine assigned to a workload will be evicted during the N sequential stages; predicting a target number of virtual machines to configure in a current stage for a subsequent stage from among the plurality of N sequential stages based on the probability indicator, a target capacity for the workload, and a current price for maintaining a virtual machine; and configuring a number of virtual machines for the workload during the current stage based on the target number to be loaded for the workload for the subsequent stage.

Inventors

  • Soumya RAM
  • Yandan WANG
  • Camille Jean COUTURIER
  • Jue Zhang
  • Fangkai Yang
  • Si QIN
  • Qingwei Lin
  • Chetan Bansal
  • Bowen PANG
  • Vivek Gupta
  • Preston Tapley STEPHENSON
  • Alexander David FISCHER
  • Mahmoud Sayed
  • Robert Edward MINNEKER
  • Eli Cortez Custodio VILARINHO
  • Felipe VIEIRA FRUJERI
  • Inigo GOIRI PRESA
  • Sidhanth M. PANJWANI

Assignees

  • MICROSOFT TECHNOLOGY LICENSING, LLC

Dates

Publication Date
20260507
Application Date
20250902

Claims (20)

  1. 1 .- 20 . (canceled)
  2. 21 . A system comprising: a processor; and memory storing instructions that, when executed, perform operations comprising: receiving, for sequential stages of a time horizon, a probability indicator that a virtual machine assigned to a workload will be evicted during one of the sequential stages; predicting a target number of virtual machines to configure in a current stage of the sequential stages for a subsequent stage of the sequential stages based on the probability indicator and a target capacity for the workload, wherein predicting the target number comprises estimating an anticipated changed capacity for each of the sequential stages by: estimating an anticipated changed capacity for the current stage based on the target capacity for the workload and a likelihood that the virtual machine will be evicted during the current stage; estimating an anticipated changed capacity for the subsequent stage based on the target capacity for the workload, the anticipated changed capacity for the current stage, and a likelihood that the virtual machine will be evicted during the current stage; and estimating an anticipated changed capacity for a last stage of the sequential stages based on the target capacity for the workload, the anticipated changed capacity of the current stage, the anticipated changed capacity of the subsequent stage, and a likelihood that the virtual machine will be evicted during the last stage; and configuring a number of virtual machines for the workload during the current stage based on the target number to be loaded for the workload for the subsequent stage.
  3. 22 . The system of claim 21 , wherein: estimating the anticipated changed capacity for each of the sequential stages further comprises determining a current number of virtual machines assigned to the workload at a start of the current stage; and the anticipated changed capacity for the current stage corresponds to a change in the current number of virtual machines at an end of the current stage.
  4. 23 . The system of claim 21 , wherein predicting the target number comprises constraining the target number based on the target capacity for the workload.
  5. 24 . The system of claim 23 , wherein predicting the target number further comprises constraining the target number based on a cost budget allocated for the workload.
  6. 25 . The system of claim 24 , wherein predicting the target number further comprises calculating a final value for the target number, wherein the final value minimizes or reduces a cost function and satisfies constraints based on the target capacity and the cost budget allocated for the workload.
  7. 26 . The system of claim 21 , wherein the target capacity is predefined by a user and corresponds to a number of virtual machines to be maintained for the workload.
  8. 27 . The system of claim 21 , wherein the likelihood that the virtual machine assigned to the workload will be evicted during one of the sequential stages is based on an operational state of one or more hardware clusters associated with the virtual machine.
  9. 28 . The system of claim 27 , wherein the operational state comprises at least one of: a current capacity in a geographical area associated with the one or more hardware clusters; a current bandwidth in the geographical area associated with the one or more hardware clusters; or current workloads being serviced in the geographical area associated with the one or more hardware clusters.
  10. 29 . The system of claim 21 , wherein the likelihood that the virtual machine assigned to the workload will be evicted during one of the sequential stages is determined using a machine learning regression model.
  11. 30 . The system of claim 21 , wherein configuring the number of virtual machines for the workload during the current stage comprises at least one of: adding one or more virtual machines to the workload; or removing one or more virtual machines from the workload.
  12. 31 . The system of claim 21 , wherein at least one constraint is defined to limit a number of virtual machines that can be added to or removed from any stage of the sequential stages.
  13. 32 . A method comprising: receiving, for sequential stages of a time horizon, a probability indicator that a virtual machine assigned to a workload will be evicted during one of the sequential stages; predicting a target number of virtual machines to configure in a current stage of the sequential stages for a subsequent stage of the sequential stages based on the probability indicator and a target capacity for the workload, wherein predicting the target number comprises estimating an anticipated changed capacity for each of the sequential stages by: estimating an anticipated changed capacity for the current stage based on the target capacity for the workload and a likelihood that the virtual machine will be evicted during the current stage; estimating an anticipated changed capacity for the subsequent stage based on the target capacity for the workload, the anticipated changed capacity for the current stage, and a likelihood that the virtual machine will be evicted during the current stage; and estimating an anticipated changed capacity for a last stage of the sequential stages based on the target capacity for the workload, the anticipated changed capacity of the current stage, the anticipated changed capacity of the subsequent stage, and a likelihood that the virtual machine will be evicted during the last stage; and configuring a number of virtual machines for the workload during the current stage based on the target number to be loaded for the workload for the subsequent stage.
  14. 33 . The method of claim 32 , wherein a length of each of the sequential stages corresponds to a configuration time of a virtual machine.
  15. 34 . The method of claim 32 , wherein predicting the target number comprises: constraining the target number based on the target capacity for the workload and a budget allocated for the workload; and calculating a final value for the target number, wherein the final value minimizes or reduces a cost function.
  16. 35 . The method of claim 34 , wherein the final value for the target number is determined according to an integer linear program.
  17. 36 . The method of claim 34 , wherein constraints based on the target capacity and the budget are inputs constraining the target number in the cost function.
  18. 37 . The method of claim 32 , wherein: estimating the anticipated changed capacity for each of the sequential stages further comprises determining a current number of virtual machines assigned to the workload at a start of the current stage; and the anticipated changed capacity for the current stage corresponds to a change in the current number of virtual machines at an end of the current stage.
  19. 38 . The method of claim 32 , wherein predicting the target number of virtual machines comprises determining a cost associated with the anticipated changed capacity of each of the current stage and the subsequent stage.
  20. 39 . The method of claim 38 , wherein determining the cost comprises: determining a current price for maintaining a virtual machine for the workload; calculating a current cost associated with the anticipated changed capacity of the current stage based on the current price; and calculating a current cost associated with the anticipated changed capacity of the subsequent stage based on the current price.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of U.S. patent application Ser. No. 17/806,191 filed Jun. 9, 2022, entitled “System and Method of Dynamically Adjusting Virtual Machines for a Workload,” which is incorporated herein by reference in its entirety. BACKGROUND A virtual machine is a compute resource that is implemented as software on a physical host computer to emulate functionality of another separate computer. A plurality of virtual machines hosted by a cloud services provider may be monetized based on an on-demand model and a spot model. The on-demand model ensures that a virtual machine is always available to service a user's request, and the spot model allows users to utilize temporary excess capacity of virtual machines when available, typically at a lower cost than that of the on-demand model. However, to ensure that the capacity of on-demand virtual machines is not affected, spot virtual machines may be evicted at any time when no spare capacity remains. The above information disclosed in this Background section is for enhancement of understanding of the background of the present disclosure, and therefore, it may contain information that does not constitute prior art. SUMMARY Embodiments of the present disclosure are directed to systems and methods for dynamically adjusting a number of virtual machines to maintain or substantially maintain a target capacity for a workload while reducing costs. According to one or more embodiments a method for dynamically adjusting a number of virtual machines for a workload, includes: receiving a probability indicator for each of a plurality of N sequential stages, where N is a natural number greater than 1, of a likelihood that a virtual machine assigned to a workload will be evicted during the N sequential stages; predicting a target number of virtual machines to configure in a current stage for a subsequent stage from among the plurality of N sequential stages based on the probability indicator, a target capacity for the workload, and a current price for maintaining a virtual machine; and configuring a number of virtual machines for the workload during the current stage based on the target number to be loaded for the workload for the subsequent stage. In an embodiment, the N sequential stages may correspond to different time horizons from each other. In an embodiment, a length of each of the N sequential stages may correspond to a configuration time of a virtual machine, and the configuring of the number of virtual machines for the workload may take a length of one stage to complete. In an embodiment, the predicting of the target number may include: constraining, based on a target capacity for the workload, the target number based on an anticipated changed capacity estimated for each of the plurality of N sequential stages; constraining, based on a budget allocated for the workload, the target number based on a cost associated with the anticipated changed capacity of each of the current stage and the subsequent stage; and calculating, based on a cost function, a final value for the target number that minimizes the cost function, while satisfying at least the constraints based on the target capacity and the budget. In an embodiment, the final value for the target number may be determined according to an integer linear program, and the constraints based on the target capacity and the budget may be inputs constraining the target number in the cost function. In an embodiment, the plurality of N sequential stages may include the current stage, an (N−1)-th stage after the current stage as the subsequent stage, and an N-th stage after the (N−1)-th stage as a last stage from among the plurality of N sequential stages, and the probability indicator may include: a first probability indicator of a likelihood that a virtual machine assigned to the workload will be evicted during the current stage; an (N−1)-th probability indicator of a likelihood that a virtual machine assigned to the workload will be evicted during the subsequent stage; and an N-th probability indicator of a likelihood that a virtual machine assigned to the workload will be evicted during the last stage. In an embodiment, to estimate the anticipated changed capacity for each of the plurality of N sequential stages, the method may include: determining a current number of virtual machines assigned to the workload at a start of the current stage; estimating the anticipated changed capacity for the current stage that satisfy the target capacity, the anticipated changed capacity for the current stage corresponding to a change in the current number of virtual machines at an end of the current stage based on the first probability indicator and a value of the target number that is constrained by the target capacity; estimating an anticipated changed capacity for the subsequent stage that satisfy the target capacity based on the anticipated changed capacity for the current stage