Container CPU Usage Limiting via Network Traffic Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current CPU resource limitation mechanisms, such as cgroups, fail to account for network access CPU usage in container environments, leading to potential CPU and network abuse as they only restrict container process CPU usage without considering network access CPU consumption.

Innovation Solution

The method involves determining network CPU usage by measuring the time spent in software interrupt service routines, assigning weights to packet types, and calculating total container CPU usage, which is then used to adjust the container CPU consumption quota and network bandwidth settings to ensure compliance with predefined limits.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If cgroups are used to limit container CPU usage, then container process CPU usage can be restricted, but network access CPU usage is not accounted for, leading to potential CPU abuse

Engineering Contradiction:
ImproveCPU usage limitation accuracyVSAvoidCPU monitoring complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments CPU usage monitoring into two distinct components: process CPU usage (tracked by cgroups) and network access CPU usage (tracked by measuring software interrupt service routine execution time). This segmentation allows each component to be monitored independently using appropriate mechanisms, then combined to provide comprehensive CPU usage accounting that prevents abuse while maintaining system manageability.

Inventive Principle:
Principle #1Segmentation

2Speed

If network bandwidth is increased for a container, then network performance improves, but CPU usage for packet processing increases, potentially exceeding CPU quotas

Engineering Contradiction:
Improvenetwork throughputVSAvoidCPU energy consumption
Core Design Contradiction:
SpeedVSUse of energy by moving object

Solution Approach 1:

The patent implements a feedback mechanism that continuously monitors network packet processing CPU usage and adjusts network bandwidth allocations accordingly. When network CPU usage approaches or exceeds the container's CPU quota, the system reduces network bandwidth to bring CPU usage back within limits. This feedback loop ensures that network performance improvements do not cause unsustainable CPU consumption.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent dynamically adjusts network bandwidth settings based on real-time CPU usage conditions. The system transitions from static bandwidth allocation to dynamic bandwidth control, where bandwidth is adjusted up or down depending on whether the container is approaching its CPU quota limit. This dynamic adjustment allows the system to optimize network performance when CPU resources are available while preventing CPU abuse when resources are constrained.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11249809B1Limiting container CPU usage based on network traffic
Publication Date: 2022.02.15 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11249809B1 patent drawing
  • US11249809B1 patent drawing
  • US11249809B1 patent drawing

AI summary

In an approach to limiting container CPU usage based on network traffic, a packet CPU usage for each packet type of one or more packet types is determined. A network CPU usage is calculated for a specific container based on the network CPU usage for each packet type. A container process CPU usage and a total container CPU usage are calculated for the specific container, where the total container CPU usage is the sum of the network CPU usage and the container process CPU usage. Responsive to determining that the total container CPU usage exceeds a threshold, the container CPU consumption quota and the container network bandwidth setting for the specific container are adjusted to reduce the total container CPU usage, using a set of pre-configured parameters.