Computing resource prediction for optimizing resource utilization and computing workload density
The techniques disclosed herein enable systems to efficiently allocate computing resources for various computing workloads through a shared peak resource usage prediction. To achieve this, a predictive model analyzes a historical dataset defining resource usage of a computing environment for a past timeframe, and calculates a peak environment resource usage for a future or current timeframe. In addition, the predictive model estimates a peak number of computing workloads for the computing environment. Using the peak resource usage and/or the peak number of computing workloads, the system derives resource requests for allocating computing resources to a plurality of computing workloads. The computing workloads are subsequently assigned to computing nodes within the computing environment for execution. Furthermore, computing workloads within a computing node are configured to share computing resources to accommodate sudden surges in demand. In this way, the system can reduce computing resource wastage for computing environments.
1 . A method for automated computing resource reallocation in a cluster operating a plurality of computing nodes executing a plurality of computing workloads, the method comprising:
extracting, by a processing system executing a predictive model, a historical dataset from the cluster operating the plurality of computing nodes for a past timeframe, the historical dataset defining computing resource usage of the cluster operating the plurality of computing nodes during the past timeframe;
calculating, by execution of the predictive model, a peak computing resource usage of the cluster operating the plurality of computing nodes at a given time based on the historical dataset, wherein the peak computing resource usage represents a predicted peak computing resource usage for a current timeframe;
deriving a computing resource request for each computing workload of the plurality of computing workloads to be deployed to the cluster operating the plurality of computing nodes based on the predicted peak computing resource usage for the current timeframe;
generating a computing resource allocation for each computing workload of the plurality of computing workloads to be deployed to the cluster operating the plurality of computing nodes according to the computing resource request derived for each computing workload of the plurality of computing workloads;
assigning, as part of a computing workload deployment, each computing workload of the plurality of computing workloads to the cluster operating the plurality of computing nodes for execution using the computing resource allocation generated for each computing workload of the plurality of computing workloads;
determining, during execution of a first computing workload, that a first resource utilization of the first computing workload within a computing node operating within the cluster is above a resource utilization threshold;
determining, during execution of a second computing workload, that a second resource utilization of the second computing workload within the computing node operating within the cluster is below the resource utilization threshold; and
reallocating at least one of a computing core, an amount of memory, or a volume of storage from the second computing workload to the first computing workload based on the first resource utilization being above the resource utilization threshold and the second resource utilization being below the resource utilization threshold.
2 . The method of claim 1 , wherein:
the cluster operating the plurality of computing nodes comprises a Kubernetes cluster;
and
each computing workload of the plurality of computing workloads comprises a container.
3 . The method of claim 1 , wherein the peak computing resource usage of the cluster operating the plurality of computing nodes is calculated by a prophet model configured with the historical dataset.
4 . The method of claim 1 , wherein deriving the computing resource request for each computing workload of the plurality of computing workloads comprises dividing the predicted peak computing resource usage by a number of computing workloads of the plurality of computing workloads.
5 . The method of claim 1 , wherein the plurality of computing workloads is assigned to the cluster operating the plurality of computing nodes by a scheduler that is configured with the computing resource allocation generated for each computing workload of the plurality of computing workloads.
6 . The method of claim 1 , further comprising:
predicting a peak utilization time for each computing workload of the plurality of computing workloads, wherein the peak utilization time is within the current timeframe;
calculating a likelihood that the peak utilization time for a third computing workload overlaps with the peak utilization time for a fourth computing workload;
determining that the likelihood is greater than a threshold likelihood; and
assigning the third computing workload and the fourth computing workload to different computing nodes within the cluster operating the plurality of computing nodes in response to determining that the likelihood is greater than the threshold likelihood.
7 . The method of claim 1 , wherein the past timeframe and the current timeframe comprise a same quantity of time.
8 . The method of claim 1 , wherein the computing resource request comprises at least one of a requested number of computing cores, a requested amount of memory, or a requested volume of storage.
9 . A system for automated computing resource reallocation in a cluster operating a plurality of computing nodes executing a plurality of computing workloads, the system comprising:
a processing unit; and
a computer-readable storage medium having encoded thereon computer-readable instructions that, when executed by the processing unit, cause the system to:
extract a historical dataset from the cluster operating the plurality of computing nodes for a past timeframe, the historical dataset defining computing resource usage of the cluster operating the plurality of computing nodes during the past timeframe;
calculate, by execution of a predictive model, a peak computing resource usage of the cluster operating the plurality of computing nodes at a given time based on the historical dataset, wherein the peak computing resource usage represents a predicted peak computing resource usage for a current timeframe;
derive a computing resource request for each computing workload of the plurality of computing workloads to be deployed to the cluster operating the plurality of computing nodes based on the predicted peak computing resource usage for the current timeframe;
generate a computing resource allocation for each computing workload of the plurality of computing workloads to be deployed to the cluster operating the plurality of computing nodes according to the computing resource request derived for each computing workload of the plurality of computing workloads;
assign, as part of a computing workload deployment, each computing workload of the plurality of computing workloads to the cluster operating the plurality of computing nodes for execution using the computing resource allocation generated for each of the plurality of computing workloads;
determine, during execution of a first computing workload, that a first resource utilization of the first computing workload within a computing node operating within the cluster is above a resource utilization threshold;
determine, during execution of a second computing workload, that a second resource utilization of the second computing workload within the computing node operating within the cluster is below the resource utilization threshold; and
reallocate at least one of a computing core, an amount of memory, or a volume of storage from the second computing workload to the first computing workload based on the first resource utilization being above the resource utilization threshold and the second resource utilization being below the resource utilization threshold.
10 . The system of claim 9 , wherein:
the cluster operating the plurality of computing nodes comprises a Kubernetes cluster;
and
each computing workload of the plurality of computing workloads comprises a container.
11 . The system of claim 9 , wherein the peak computing resource usage of the cluster operating the plurality of computing nodes is calculated by a prophet model configured with the historical dataset.
12 . The system of claim 9 , wherein deriving the computing resource request for each computing workload of the plurality of computing workloads comprises dividing the predicted peak computing resource usage by a number of computing workloads of the plurality of computing workloads.
13 . The system of claim 9 , wherein the plurality of computing workloads is assigned to the cluster operating the plurality of computing nodes by a scheduler that is configured with the computing resource allocation generated for each of the plurality of computing workloads.
14 . The system of claim 9 , wherein the computer-readable instructions further cause the system to:
predict a peak utilization time for each computing workload of the plurality of computing workloads, wherein the peak utilization time is within the current timeframe;
calculate a likelihood that the peak utilization time for a third computing workload overlaps with the peak utilization time for a fourth computing workload;
determine that the likelihood is greater than a threshold likelihood; and
assign the third computing workload and the fourth computing workload to different computing nodes within the cluster operating the plurality of computing nodes in response to determining that the likelihood is greater than the threshold likelihood.
15 . The system of claim 9 , wherein the past timeframe and the current timeframe comprise a same quantity of time.
16 . The system of claim 9 , wherein the computing resource request comprises at least one of a requested number of computing cores, a requested amount of memory, or a requested volume of storage.
17 . A computer-readable storage medium for automated computing resource reallocation in a cluster operating the plurality of computing nodes executing a plurality of computing workloads, the computer-readable storage medium having encoded thereon computer-readable instructions that, when executed by a processing unit, cause a system to:
extract a historical dataset from the cluster operating the plurality of computing nodes for a past timeframe, the historical dataset defining computing resource usage of the cluster operating the plurality of computing nodes during the past timeframe;
calculate, by execution of a predictive model, a peak computing resource usage of the cluster operating the plurality of computing nodes at a given time based on the historical dataset, wherein the peak computing resource usage represents a predicted peak computing resource usage for a current timeframe;
derive a computing resource request for each computing workload of the plurality of computing workloads to be deployed to the cluster operating the plurality of computing nodes based on the predicted peak computing resource usage for the current timeframe;
generate a computing resource allocation for each computing workload of the plurality of computing workloads to be deployed to the cluster operating the plurality of computing nodes according to the computing resource request derived for each computing workload of the plurality of computing workloads;
assign, as part of a computing workload deployment, each computing workload of the plurality of computing workloads to the cluster operating the plurality of computing nodes for execution using the computing resource allocation generated for each of the plurality of computing workloads;
determine, during execution of a first computing workload, that a first resource utilization of the first computing workload within a computing node operating within the cluster is above a resource utilization threshold;
determine, during execution of a second computing workload, that a second resource utilization of the second computing workload within the computing node operating within the cluster is below the resource utilization threshold; and
reallocate at least one of a computing core, an amount of memory, or a volume of storage from the second computing workload to the first computing workload based on the first resource utilization being above the resource utilization threshold and the second resource utilization being below the resource utilization threshold.
18 . The computer-readable storage medium of claim 17 , wherein the peak computing resource usage of the cluster operating the plurality of computing nodes is calculated by a prophet model configured with the historical dataset.
19 . The computer-readable storage medium of claim 17 , wherein deriving the computing resource request for each computing workload of the plurality of computing workloads comprises dividing the predicted peak computing resource usage by a number of computing workloads of the plurality of computing workloads.
20 . The computer-readable storage medium of claim 17 , wherein the computer-readable instructions further cause the system to:
predict a peak utilization time for each computing workload of the plurality of computing workloads, wherein the peak utilization time is within the current timeframe;
calculate a likelihood that the peak utilization time for a third computing workload overlaps with the peak utilization time for a fourth computing workload;
determine that the likelihood is greater than a threshold likelihood; and
assign the third computing workload and the fourth computing workload to different computing nodes within the cluster operating the plurality of computing nodes in response to determining that the likelihood is greater than the threshold likelihood.