CA-3192548-C - OPTIMIZING PLACEMENTS OF WORKLOADS ON MULTIPLE PLATFORMS AS A SERVICE BASED ON COSTS AND SERVICE LEVELS
Abstract
A computer-implemented method, a computer program product, and a computer system for optimizing workload placements in a system of multiple platforms as a service. A computer first places respective workloads on respective platforms that yield lowest costs for the respective workloads. The computer determines whether mandatory constraints are satisfied. The computer checks best effort constraints, in response to the mandatory constraints being satisfied. The computer determines a set of workloads for which the best effort constraints are not satisfied and determines a set of candidate platforms that yield the lowest costs and enable the best effort constraints to be satisfied. From the set of workloads, the computer selects a workload that has a lowest upgraded cost and updates the workload by setting an upgraded platform index.
Inventors
- Lior Aronovich
Assignees
- INTERNATIONAL BUSINESS MACHINES CORPORATION
Dates
- Publication Date
- 20260505
- Application Date
- 20211026
- Priority Date
- 20201206
Claims (8)
- 34 CLAIMS What is claimed is: 1. A computer-implemented method for optimizing placements of multiple workloads on multiple platforms, the method comprising: mapping, for each respective workload of the multiple workloads, a respective platform index in a workload-platform matrix, the respective platform index identifying a respective platform of the multiple platforms that yields a respective lowest cost for running the respective workload; executing an iterative process for solving an optimization problem to find optimal placements multiple workloads on the multi platforms, steps of each iteration including: determining, for each respective workload of the multiple workloads, whether running the respective workload on the identified respective platform satisfies mandatory constraints regarding budgets for running the respective workload on the identified respective platform, platform eligibility for running the respective workload, and platform resource capacities; in response to determining that, for each respective workload of the multiple workloads, running the respective workload on the identified respective platform satisfies the mandatory constraints, checking, for each respective workload of the multiple workloads, a best effort constraint regarding required durations to complete the respective workload by the identified respective platform; and determining whether at least one or more workloads of the multiple workloads do not satisfy the best effort constraint; in response to determining that the at least one or more workloads of the multiple workloads do not satisfy the best effort constraint, CA 3192548 determining, for each workload of the at least one or more workloads, a respective candidate platform of the multiple platforms that yields the respective lowest cost and enables the best effort constraint to be satisfied, determining, for each workload of the at least one or more workloads, a respective upgraded platform index in the workload-platform matrix, the respective upgraded platform index identifying the respective candidate platform of the multiple platforms, calculating, for each workload of the at least one or more workloads, an upgraded cost, and in response to determining that there is a workload in the at least one or more workloads that has a respective candidate platform of the multiple platforms that enables the best effort constraint to be satisfied, selecting, from the at least one or more workloads, a workload that has a lowest upgraded cost, and mapping the workload that has the lowest upgraded cost to the respective upgraded platform index in the workload-platform matrix; in response to determining that the at least one or more workloads contain no workload with a respective candidate platform of the multiple platforms that can enable the best effort constraint to be satisfied, outputting current placements as the optimal placements of the multiple workloads on the multiple platforms, wherein the current placements are determined in a current iteration without upgrading platform indexes; for each respective workload of the multiple workloads, determining whether the respective workload is running and in response to determining that the respective workload is running on a nonoptimal platform, migrating the respective workload according to the optimal placements.
- 2. The computer-implemented method of claim 1, further comprising: in response to determining that, for each respective workload of the multiple workloads, running the respective workload on the identified respective platform does not satisfy the mandatory constraints, determining whether previous placements of the multiple workloads on 36 the multiple platforms satisfy the mandatory constraints, wherein the previous placements are determined in a previous iteration which is an iteration immediately before the current iteration; in response to determining that the previous placements satisfy the mandatory constraints, outputting the previous placements as the optimal placements; and in response to determining that the previous placements do not satisfy the mandatory constraints, outputting no optimal placements.
- 3. The computer-implemented method of claim 1, further comprising: in response to determining that a workload in the at least one or more workloads of the multiple workloads has no respective candidate platform of the multiple platforms satisfying the best effort constraint, marking the workload having no respective candidate platform as not feasible for upgrading.
- 4. The computer-implemented method of claim 1, further comprising: determining whether the at least one or more workloads of the multiple workloads contain at least one workload that is feasible for upgrading; in response to determining that the at least one or more workloads contain no workload that is feasible for upgrading, setting the current placements as the optimal placements of the multiple workloads on the multiple platforms.
- 5. The computer-implemented method of claim 1, wherein an objective of the optimization problem is to minimize a total cost for running the multiple workloads on the multiple platforms.
- 6. A computer program product for optimizing placements of multiple workloads on multiple platforms, the computer program product comprising a computer readable storage medium storing program instructions which, when executed by one or more processors, cause a computer system to implement the method of any one of claims 1 to 5.
- 7. A computer system for optimizing placements of multiple workloads on multiple platforms, the computer system comprising one or more processors, one or more computer readable storage devices, and program instructions stored on at least one of the one or more 37 computer readable storage devices for execution by at least one of the one or more processors to cause the computer system to implement the method of any one of claims 1 to 5.
- 8. A system of multiple platforms, comprising: multiple workloads, comprising pending workloads and running workloads; the multiple platforms, comprising remote platforms and local platforms; a system for mapping the multiple workloads and the multiple platforms; the system for mapping the multiple workloads and the multiple platforms comprising one or more processors, one or more computer readable storage devices, and program instructions stored on at least one of the one or more computer readable storage devices for execution by at least one of the one or more processors to cause the system to implement the method of any one of claims 1 to 5. CA 3192548
Description
OPTIMIZING PLACEMENTS OF WORKLOADS ON MULTIPLE PLATFORMS AS A SERVICE BASED ON COSTS AND SERVICE LEVELS BACKGROUND [0001] The present invention relates generally to a platform-as-a-service (PaaS) model, and more particularly to optimizing placements of workloads on multiple platforms as a service based on costs and service levels. [0002] In a platform-as-a-service (PaaS) model, workloads are placed to run on platforms rather 10 than on virtual or physical machines. The platforms may include any combination of underlying resources, and this is usually not exposed to users of the platforms. The platforms typically expose an interface that enables to place, run, monitor, and control workloads on the platforms. [0003] Some aspects arc usually required to be handled in working with infrastructure-as-aservice (IaaS) platforms, such as selecting virtual machine (VM) types, creating and maintaining 15 VM images, connecting or disconnecting VMs to or from clusters, returning VMs, waiting for VMs to provision, and tracking VMs, are eliminated in working with PaaS platforms. In PaaS, the two main concepts are workloads and platforms that run the workloads. [0004] The PaaS platforms can be local and remote. Users. create accounts on PaaS platforms, and workloads can then be uploaded and run on these PaaS platforms via the created accounts. The 20 capability to run workloads on both local and remote platforms provides several benefits. Cost savings is one of the prominent benefits. Without spending money to build and maintain resources to accommodate spikes in resource usage that occur only occasionally, the hybrid cloud mechanism enables to offload workload from local platforms to remote platforms, and therefore the additional resources are payed only when it is needed, thereby reducing the total cost of ownership. Another 1 CA 03192548 2023-3-13 benefit is the flexibility in using multiple cloud providers and platforms with different attributes, depending on considerations such as workload requirements and cost. Improved security is an additional benefit. Cloud providers can offer increased security, isolation, and communication over a private network, addressing security and compliance aspects. The hybrid cloud mechanism 5 provides scalability by placing workloads dynamically on cloud platforms. In addition, by leveraging resources of cloud providers, the exposure to outages and downtime can be minimized. 2 CA 03192548 2023· 3· 13 SUMMARY [0005] In one aspect, a computer-implemented method for optimizing placements of workloads on multiple platforms as a service is provided. The computer-implemented method includes: setting, for respective workloads, platform indexes identifying respective platforms that yield lowest costs 5 for running the respective workloads; determining, for the respective workloads, whether mandatory constraints are satisfied; in response to determining that the mandatory constraints are satisfied, checking best effort constraints; determining a set of workloads for which the best effort constraints are not satisfied; in response to that the set of workloads is not empty, for the set of workloads, determining a set of candidate platforms that yield the lowest costs and enable the best effort 10 constraints to be satisfied; determining upgraded platform indexes identifying respective ones of the candidate platforms and calculating upgraded costs for the set of workloads; selecting, from the set of workloads, a workload that has a lowest upgraded cost; upgrading the workload that has the lowest upgraded cost, by setting an upgraded platform index for the workload that has the lowest upgraded cost; and executing a next iteration of solving an optimization problem, until finding 15 optimal placements of the respective workloads on the respective platforms. [0006] In another aspect, a computer program product for optimizing placements of workloads on multiple platforms as a service is provided. The computer program product comprises a computer readable storage medium having program instructions embodied therewith, and the program instructions are executable by one or more processors. The program instructions are 20 executable to set, for respective workloads, platform indexes identifying respective platforms that yield lowest costs for running the respective workloads. The program instructions are further executable to determine, for the respective workloads, whether mandatory constraints are satisfied. In response to determining that the mandatory constraints are satisfied, the program instructions are further executable to check best effort constraints. The program instructions are further executable 25 to determine a set of workloads for which the best effort constraints are not satisfied. In response to 3 CA 03192548 2023-3-13 that the set of workloads is not empty, the program instructions are further executable to, for the set of workloads, determine a set of candidate platforms that yield the