Search

US-12619474-B2 - Dynamic pod resource limit adjusting based on data analytics

US12619474B2US 12619474 B2US12619474 B2US 12619474B2US-12619474-B2

Abstract

Dynamic adjusting of pod resource limits is provided at runtime of a container orchestration platform pod. The process includes deploying a container orchestration platform pod with one or more pod resources in a computing environment, where the pod resources have one or more associated pod resource limits. Further, the process includes monitoring a runtime resource usage of the container orchestration platform pod, and predicting, by a trained machine learning model, upcoming resource usage of the container orchestration platform pod. The predicting uses, at least in part, the monitored runtime resource usage. Further, the process includes dynamically adjusting a pod resource limit of the one or more pod resource limits of the container orchestration platform pod in the computing environment. The dynamically adjusting is based on the monitored runtime resource usage, and the predicted upcoming resource usage.

Inventors

  • Jing You
  • Kun Yang
  • Peng Hui Jiang
  • Sushma HIREMATH
  • Qian Du
  • Amit Anand
  • Khushboo Singh
  • Kumari MUKTTA

Assignees

  • INTERNATIONAL BUSINESS MACHINES CORPORATION

Dates

Publication Date
20260505
Application Date
20230505

Claims (20)

  1. 1 . A computer-implemented method of facilitating processing within a computing environment, the computer-implemented method comprising: initializing a container orchestration platform pod to be deployed, the initializing comprising: obtaining a dynamic resource definition comprising a resource usage formula to be used in dynamically allocating pod resources for the container orchestration platform pod to be deployed; parsing the resource usage formula of the dynamic resource definition and generating, based on parsing the resource usage formula, one or more initial pod resource limits; deploying the container orchestration platform pod with one or more pod resources in the computing environment, the one or more pod resources having associated therewith the generated one or more initial pod resource limits; monitoring a runtime resource usage of the container orchestration platform pod; predicting, by a trained machine learning model, a value of upcoming resource usage of the container orchestration platform pod, the predicting using, at least in part, the monitored runtime resource usage; and dynamically adjusting a pod resource limit of the one or more pod resource limits of the container orchestration platform pod in the computing environment, the dynamically adjusting being based on the monitored runtime resource usage, and the predicted value of upcoming resource usage.
  2. 2 . The computer-implemented method of claim 1 , further comprising obtaining the trained machine learning model by training a machine learning model on historical resource usage data of the container orchestration platform pod.
  3. 3 . The computer-implemented method of claim 2 , further comprising using the predicted upcoming resource usage of the container orchestration platform pod in continuing training of the trained machine learning model.
  4. 4 . The computer-implemented method of claim 2 , wherein the machine learning model comprises a linear regression model.
  5. 5 . The computer-implemented method of claim 1 , wherein the deploying further comprises creating a deployment object to be used in deploying the container orchestration platform pod; and initializing and deploying the container orchestration platform pod with the one or more pod resources in the computing environment, the initializing applying the generated one or more initial pod resource limits to the deploying of the container orchestration platform pod with the one or more pod resources.
  6. 6 . The computer-implemented method of claim 1 , wherein the monitored runtime resource usage comprises runtime central processing unit usage of the container orchestration platform pod and runtime memory usage of the container orchestration platform pod.
  7. 7 . The computer-implemented method of claim 1 , wherein the dynamically adjusting comprises dynamically increasing during runtime the pod resource limit of the container orchestration platform pod in the computing environment.
  8. 8 . The computer-implemented method of claim 1 , wherein the dynamically adjusting comprises dynamically decreasing during runtime the pod resource limit of the container orchestration platform pod in the computing environment.
  9. 9 . The computer-implemented method of claim 1 , wherein the dynamically adjusting is further based on an auto-scaling mode for the container orchestration platform pod.
  10. 10 . The computer-implemented method of claim 9 , wherein the auto-scaling mode is a post-intervention mode, and the dynamically adjusting is further based on a number of instances of the container orchestration platform pod staying at a specified pod instance limit for a set period of time.
  11. 11 . The computer-implemented method of claim 9 , wherein the auto-scaling mode is a first-in mode, and the dynamically adjusting proceeds before auto-scaling of a number of instances of the container orchestration platform pod.
  12. 12 . The computer-implemented method of claim 1 , further comprising dynamically adjusting the one or more pod resource limits of one or more other container orchestration platform pods in the computing environment based on the dynamically adjusting of the pod resource limit of the container orchestration platform pod.
  13. 13 . A computer system for facilitating processing within a computing environment, the computer system comprising: a memory; and at least one processor in communication with the memory, wherein the computer system is configured to perform a method, the method comprising: initializing a container orchestration platform pod to be deployed, the initializing comprising: obtaining a dynamic resource definition comprising a resource usage formula to be used in dynamically allocating pod resources for the container orchestration platform pod to be deployed; parsing the resource usage formula of the dynamic resource definition and generating, based on parsing the resource usage formula, one or more initial pod resource limits; deploying the container orchestration platform pod with one or more pod resources in the computing environment, the one or more pod resources having associated therewith the generated one or more initial pod resource limits; monitoring a runtime resource usage of the container orchestration platform pod; predicting, by a trained machine learning model, a value of upcoming resource usage of the container orchestration platform pod, the predicting using, at least in part, the monitored runtime resource usage; and dynamically adjusting a pod resource limit of the one or more pod resource limits of the container orchestration platform pod in the computing environment, the dynamically adjusting being based on the monitored runtime resource usage, and the predicted value of upcoming resource usage.
  14. 14 . The computer system of claim 13 , further comprising obtaining the trained machine learning model by training a machine learning model on historical resource usage data of the container orchestration platform pod.
  15. 15 . The computer system of claim 13 , wherein the deploying further comprises creating a deployment object to be used in deploying the container orchestration platform pod; and initializing and deploying the container orchestration platform pod with the one or more pod resources in the computing environment, the initializing applying the generated one or more initial pod resource limits to the deploying of the container orchestration platform pod with the one or more pod resources.
  16. 16 . The computer system of claim 13 , wherein the dynamically adjusting is further based on an auto-scaling mode for the container orchestration platform pod.
  17. 17 . The computer system of claim 16 , wherein the auto-scaling mode is a post-intervention mode, and the dynamically adjusting is further based on a number of instances of the container orchestration platform pod staying at a specified pod instance limit for a set period of time.
  18. 18 . The computer system of claim 16 , wherein the auto-scaling mode is a first-in mode, and the dynamically adjusting proceeds before auto-scaling of a number of instances of the container orchestration platform pod.
  19. 19 . The computer system of claim 13 , further comprising dynamically adjusting the one or more pod resource limits of one or more other container orchestration platform pods in the computing environment based on the dynamically adjusting of the pod resource limit of the container orchestration platform pod.
  20. 20 . A computer program product for facilitating processing within a computing environment, the computer program product comprising: one or more computer-readable storage media and program instructions embodied therewith, the program instructions being readable by a processing circuit to cause the processing circuit to perform a method comprising: initializing a container orchestration platform pod to be deployed, the initializing comprising: obtaining a dynamic resource definition comprising a resource usage formula to be used in dynamically allocating pod resources for the container orchestration platform pod to be deployed; parsing the resource usage formula of the dynamic resource definition and generating, based on parsing the resource usage formula, one or more initial pod resource limits; deploying the container orchestration platform pod with one or more pod resources in the computing environment, the one or more pod resources having associated therewith the generated one or more initial pod resource limits; monitoring a runtime resource usage of the container orchestration platform pod; predicting, by a trained machine learning model, a value of upcoming resource usage of the container orchestration platform pod, the predicting using, at least in part, the monitored runtime resource usage; and dynamically adjusting a pod resource limit of the one or more pod resource limits of the container orchestration platform pod in the computing environment, the dynamically adjusting being based on the monitored runtime resource usage, and the predicted value of upcoming resource usage.

Description

BACKGROUND One or more aspects relate, in general, to facilitating processing within a computing environment, and in particular, to dynamically adjusting, at runtime, pod resource limits of container orchestration platform pods in the computing environment. Container orchestration platforms and/or tools provide a framework for managing containers and microservice architectures at scale. Container orchestration automates the development, management, scaling, and networking of containers, and can be used with enterprises that need to deploy and manage hundreds or even thousands of containers. A container provides a microservice-based application with an application deployment unit and self-contained execution environment. Containers make it possible to run multiple parts of an application independently as microservices, on the same hardware, with greater control over individual application components and life cycles. A container orchestration platform typically supports a cluster, control plane, agent, and one or more pods. A cluster is a control plane and one or more compute machines, or nodes. The control plane is a collection of processes that control container orchestration platform nodes, and is the location where task assignments originate. The agent is a service that runs on the nodes and reads the container manifest, and ensures the defined containers are started and running. A pod is a group of one or more containers deployed to a single node. The containers in a pod share an IP address, IPC, host name, and other resources. SUMMARY Certain shortcomings of the prior art are overcome, and additional advantages are provided herein through the provision of a computer-implemented method of facilitating processing within a computing environment. The computer-implemented method includes: deploying a container orchestration platform pod with one or more pod resources in the computing environment. The pod resources have associated therewith one or more pod resource limits. Further, the computer-implemented method includes monitoring a runtime resource usage of the container orchestration platform pod and predicting, by a trained machine learning model, upcoming resource usage of the container orchestration platform pod, the predicting using, at least in part, the monitored runtime resource usage. In addition, the computer-implemented method includes dynamically adjusting a pod resource limit of the one or more pod resource limits of the container orchestration platform pod in the computing environment. The dynamically adjusting is based on the monitored runtime resource usage, and the predicted upcoming resource usage. Advantageously, processing is facilitated within a container architecture-based computing environment by providing enhanced use of resources. By dynamically adjusting pod resource limits, cost efficient usage of computing resources is provided, along with effective and dynamic utilization of resources, which supports on-demand resource allocation without unnecessary waste of resources. Further, the process saves costs, lowers carbon footprint, and reduces energy consumption by more efficiently using computing resources in a container-based computing environment. In one implementation, the computer-implemented method further includes obtaining the trained machine learning model by training a machine learning model on historical resource usage data of the container orchestration platform pod. Further, in one embodiment, the computer-implemented method further includes using the predicted upcoming resource usage of the container orchestration platform pod in continuing training of the trained machine learning model. In one example, the machine learning model includes a linear regression model. Advantageously, predicting, using the trained machine learning model, upcoming resource usage of the container orchestration platform pod, facilitates the dynamically adjusting of the pod resource limit of the container orchestration platform pod to provide, for instance, cost efficient usage of computing resources, and effective and dynamic utilization of resources, and to support on-demand resource allocation without waste of resources. In one implementation, the deploying includes initializing and deploying the container orchestration platform pod. The initialing and deploying includes, for instance, obtaining a dynamic resource definition to be used in dynamically allocating pod resources for the container orchestration platform pod being deployed. The dynamic resource definition includes a resource usage formula. Further, the initializing and deploying includes creating a deployment object to be used in deploying the container orchestration platform pod. In one embodiment, the creating includes parsing the resource usage formula of the dynamic resource definition, and generating, based on parsing the resource usage formula of the dynamic resource definition, one or more initial pod resource limits for u