Container Image Layer Reordering for Build Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current Docker image build processes are inefficient due to the lack of proper layering, leading to increased build times and storage issues, as developers spend significant time analyzing and tracking image layers to improve caching, which is impractical and often results in storage space issues.

Innovation Solution

An automated method constructs a dependency graph between Docker image layers, identifies update frequencies, and reorders layers based on this graph to create a new standardized deployment image, sharing layers across builds and using Docker's cache-from API to enhance caching.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If Docker image layers are built in traditional order without reordering, then the build process is simple to implement, but build times increase and caching efficiency deteriorates

Engineering Contradiction:
Improvebuild timeVSAvoidlayer management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent changes the ordering parameter of image layers from traditional build order to an optimized order based on update frequency analysis. By analyzing which layers are updated most frequently and reordering them accordingly (with frequently updated layers at the bottom), the system maximizes caching efficiency and reduces rebuild times while maintaining build simplicity through automated analysis.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent performs preliminary analysis of layer update frequencies before the actual build process. By pre-analyzing historical update patterns and determining the optimal layer arrangement in advance, the system prepares the image structure to maximize caching benefits during subsequent builds, eliminating the need for manual layer optimization during each build cycle.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If developers manually analyze and track image layers to improve caching, then caching efficiency may improve, but time consumption and operational complexity increase

Engineering Contradiction:
Improvecaching efficiencyVSAvoidtime spent analyzing layers
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent implements self-service automation where the system automatically analyzes layer update frequencies, determines optimal layer arrangements, and rebuilds images with reordered layers without requiring developer intervention. The automated analysis tracks which layers are updated most frequently and autonomously reorders them to maximize caching efficiency, eliminating manual analysis time while maintaining high caching performance.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent incorporates feedback mechanisms by continuously monitoring layer update patterns and using this information to dynamically adjust layer ordering. The system analyzes historical update data, identifies which layers change most frequently, and uses this feedback to optimize the layer arrangement for maximum caching benefits, creating a self-improving build system.

Inventive Principle:
Principle #23Feedback

3Quantity of substance

If image layers are reordered based on update frequency, then storage space is reduced through better caching, but the initial processing and analysis time increases

Engineering Contradiction:
Improvestorage spaceVSAvoidinitial processing time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent performs the analysis and reordering process as a preliminary action during the initial image build or as a one-time setup step. By completing the layer frequency analysis and optimal arrangement determination beforehand, the system establishes an optimized layer structure that provides ongoing storage savings through improved caching, while the initial processing overhead is incurred only once rather than repeatedly.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10936293B2Container image layer reordering
Publication Date: 2021.03.02 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10936293B2 patent drawing
  • US10936293B2 patent drawing
  • US10936293B2 patent drawing

AI summary

A method, computer program product, and computer system for constructing, by a computing device, a dependency graph using dependency links provided between layers of an image. Versions of the image may be inspected. Update frequencies of the layers of the image may be identified. A rank to the layers of the image may be assigned based upon, at least in part, the update frequencies of the layers of the image. A new layer arrangement for the image may be generated by ordering the new layer arrangement between a lowest ranked layer and a highest ranked layer based upon, at least in part, the dependency graph. A new standardized deployment image may be built using the image layers reordered in the new layer arrangement.