# US 12,008,411 B2 · Dynamic container-based application resource tuning and resizing

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,008,411 B2
- Document ID: US12008411B2
- Status: Granted
- Kind: B2
- Application number: 17/222,165
- Filed: 2021-04-05
- Published: 2021-07-22
- Granted: 2024-06-11
- Earliest claimed: 2017-11-29
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Benjamin M. Parees; Gabriel G. Montero; Cesar A. Wong
- Web page: https://patentgrep.com/patent/US12008411B2

## CPC

- G06F 9/5055: {considering software capabilities, i.e. software resources associated or available to the machine}
- G06F 9/5077: {Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455)}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 9/5011: {the resources being hardware resources other than CPUs, Servers and Terminals}
- G06F 9/5016: {the resource being the memory}
- G06F 2209/508: Monitor
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Dynamic container-based application resource tuning and resizing is disclosed. One or more container resource constraint values associated with a first container are accessed. One or more application resource constraint values based on the one or more container resource constraint values are determined. A first application execution of an application is initiated in the first container. The one or more application resource constraint values are provided to the first application execution. An analysis of a plurality of resource usage metrics generated during the first application execution of the application is performed. Each resource usage metric quantifies a use of a corresponding resource associated with the first container during the first application execution. One or more optimized container resource constraint values are determined based on the analysis.

## Claims

### Claim 1

A method comprising:
generating, by a computing device comprising a processor device, cgroup data to associate one or more container resource constraint values with a first container;
initiating, by the computing device, the first container with the one or more container resource constraint values, the first container comprising a tuner;
prior to initiating a first application execution of an application, querying, by the tuner, the cgroup data to determine the one or more container resource constraint values, wherein the one or more container resource constraint values indicate a corresponding one or more limits on computing resource usage by the first container;
translating, by the tuner, the one or more container resource constraint values into one or more application resource constraint values;
initiating, by the tuner, the first application execution of the application in the first container;
providing, by the tuner, the one or more application resource constraint values to the first application execution;
performing an analysis of a plurality of resource usage metrics generated during the first application execution of the application, each resource usage metric quantifying a use of a corresponding computing resource associated with the first container during the first application execution; and
determining one or more optimized container resource constraint values based on the analysis.

### Claim 2 (depends on 1)

The method of claim 1 further comprising causing an initiation of a second container having the one or more optimized container resource constraint values for a second application execution of the application.

### Claim 3 (depends on 2)

The method of claim 2 wherein causing the initiation of the second container further comprises sending a message to a container deployment engine with the one or more optimized container resource constraint values, the message directing the container deployment engine to initiate the second container with the one or more optimized container resource constraint values.

### Claim 4 (depends on 2)

The method of claim 2 further comprising terminating the first container subsequent to causing the initiation of the second container.

### Claim 5 (depends on 2)

The method of claim 2 further comprising:
determining one or more optimized application resource constraint values based on the one or more optimized container resource constraint values;
initiating the second application execution of the application in the second container; and
providing the one or more optimized application resource constraint values to the second application execution.

### Claim 6 (depends on 1)

The method of claim 1 further comprising:
prior to initiating the first container, associating the one or more container resource constraint values with the first container.

### Claim 7 (depends on 6)

The method of claim 6 wherein associating the one or more container resource constraint values with the first container comprises generating container group (cgroup) data for the first container that includes the one or more container resource constraint values.

### Claim 8 (depends on 1)

The method of claim 1 wherein the one or more container resource constraint values comprise a maximum memory constraint value and a number of central processor units (CPUs) constraint value.

### Claim 9 (depends on 1)

The method of claim 1 wherein the one or more application resource constraint values comprise one or more of a maximum heap size constraint value, an initial Java heap size constraint value, and a Java thread stack size constraint value.

### Claim 10 (depends on 1)

The method of claim 1 wherein the one or more application resource constraint values comprise one or more of a maximum amount of memory constraint value, a maximum amount of processor utilization constraint value, a maximum number of threads constraint value, a maximum amount of a cache memory constraint value, or a maximum heap size constraint value.

### Claim 11 (depends on 1)

The method of claim 1 further comprising generating the plurality of resource usage metrics by iteratively retrieving current resource usage metrics from a container deployment engine over a period of time.

### Claim 12 (depends on 1)

The method of claim 1 wherein the application is executable from either of a first executable or a second executable, the first executable requiring a different amount of computing resources to execute than the second executable; and
wherein initiating the first application execution of the application in the first container further comprises:
determining, based on the one or more container resource constraint values associated with the first container, to initiate the application from the first executable; and
initiating the first application execution of the application in the first container from the first executable.

### Claim 13 (depends on 12)

The method of claim 12 further comprising:
causing an initiation of a second container having the one or more optimized container resource constraint values for a second application execution of the application;
determining, based on the one or more optimized container resource constraint values associated with the second container, to initiate the application from the second executable; and
initiating the second application execution of the application in the second container from the second executable.

### Claim 14 (depends on 1)

The method of claim 1 wherein providing the one or more application resource constraint values to the first application execution comprises generating a configuration file used by the first application execution that contains the one or more application resource constraint values.

### Claim 15 (depends on 1)

The method of claim 1 wherein providing the one or more application resource constraint values to the first application execution comprises including the one or more application resource constraint values as runtime parameters when initiating the first application execution of the application in the first container.

### Claim 16

A computing device, comprising:
a memory; and
a processor device coupled to the memory to:
generate cgroup data to associate one or more container resource constraint values with a first container;
initiate the first container with the one or more container resource constraint values, the first container comprising a tuner;
prior to initiating a first application execution of an application, query, by the tuner, the cgroup data to determine the one or more container resource constraint values, wherein the one or more container resource constraint values indicate a corresponding one or more limits on computing resource usage by the first container;
translate, by the tuner, the one or more container resource constraint values into one or more application resource constraint values;
initiate, by the tuner, the first application execution of the application in the first container;
provide, by the tuner, the one or more application resource constraint values to the first application execution;
perform an analysis of a plurality of resource usage metrics generated during the first application execution of the application, each resource usage metric quantifying a use of a corresponding computing resource associated with the first container during the first application execution; and
determine one or more optimized container resource constraint values based on the analysis.

### Claim 17 (depends on 16)

The computing device of claim 16 wherein the processor device is to further cause an initiation of a second container having the one or more optimized container resource constraint values for a second application execution of the application.

### Claim 18

A computer program product stored on a non-transitory computer-readable storage medium and including instructions to cause a processor device to:
generate cgroup data to associate one or more container resource constraint values with a first container;
initiate the first container with the one or more container resource constraint values, the first container comprising a tuner;
prior to initiating a first application execution of an application, query, by the tuner, the cgroup data to determine the one or more container resource constraint values, wherein the one or more container resource constraint values indicate a corresponding one or more limits on computing resource usage by the first container;
translate, by the tuner, the one or more container resource constraint values into one or more application resource constraint values;
initiate, by the tuner, the first application execution of the application in the first container;
provide, by the tuner, the one or more application resource constraint values to the first application execution;
perform an analysis of a plurality of resource usage metrics generated during the first application execution of the application, each resource usage metric quantifying a use of a corresponding computing resource associated with the first container during the first application execution; and
determine one or more optimized container resource constraint values based on the analysis.

### Claim 19 (depends on 18)

The computer program product of claim 18 wherein the instructions further cause the processor device to cause an initiation of a second container having the one or more optimized container resource constraint values for a second application execution of the application.
