Two-Stage Memory Compression for Swap Space Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing computing devices face performance degradation during memory reclamation due to prioritizing compression speed over compression ratio, leading to delayed access and performance issues when using algorithms with high compression ratios for memory reclamation.

Innovation Solution

Implement a two-stage compression method where a high-speed compression algorithm is used initially to maintain performance during memory reclamation, followed by a secondary compression using an algorithm with a higher compression ratio when the CPU is idle, selectively targeting rarely accessed memory data for further compression to improve memory efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If a compression algorithm with high compression ratio is used during memory reclamation, then more memory space is available, but compression speed decreases and system performance degrades

Engineering Contradiction:
Improvememory spaceVSAvoidcompression speed
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The compression process is divided into two distinct stages: a first compression stage using a high-speed algorithm (e.g., LZ4) to quickly reduce memory pressure, and a second compression stage using a high-ratio algorithm (e.g., zstandard) to maximize space utilization. This segmentation allows the system to achieve both speed and compression ratio by performing each function in its optimal stage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The first compression stage performs preliminary compression action using a fast algorithm to immediately reduce memory usage and create available space. This preliminary action prepares the data for subsequent secondary compression, ensuring that memory reclamation is achieved quickly while leaving room for optimization later.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If a compression algorithm with high compression speed is used during memory reclamation, then system performance is maintained, but compression ratio is low and less memory space is available

Engineering Contradiction:
Improvecompression speedVSAvoidmemory space
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The compression process is divided into two distinct stages: a first compression stage using a high-speed algorithm (e.g., LZ4) to quickly reduce memory pressure, and a second compression stage using a high-ratio algorithm (e.g., zstandard) to maximize space utilization. This segmentation allows the system to achieve both speed and compression ratio by performing each function in its optimal stage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs compression actions periodically in two phases: initially using fast compression to address immediate memory pressure, then periodically applying secondary compression to maximize space utilization. This periodic action allows the system to balance between speed and compression ratio based on timing and memory conditions.

Inventive Principle:
Principle #19Periodic action

3Speed

If memory reclamation is performed quickly to maintain system performance, then response speed is high, but compression ratio is low and memory efficiency is reduced

Engineering Contradiction:
Improveresponse speedVSAvoidmemory efficiency
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The compression process is divided into two distinct stages: a first compression stage using a high-speed algorithm (e.g., LZ4) to quickly reduce memory pressure, and a second compression stage using a high-ratio algorithm (e.g., zstandard) to maximize space utilization. This segmentation allows the system to achieve both speed and compression ratio by performing each function in its optimal stage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The first compression stage performs preliminary compression action using a fast algorithm to immediately reduce memory usage and create available space. This preliminary action prepares the data for subsequent secondary compression, ensuring that memory reclamation is achieved quickly while leaving room for optimization later.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP3812904B1Swap area in memory using multiple compression algorithms
Publication Date: 2024.02.14 SAMSUNG ELECTRONICS CO LTD
  • EP3812904B1 patent drawingFigure 1
  • EP3812904B1 patent drawingFigure 2
  • EP3812904B1 patent drawingFigure 3

AI summary

A computing device and an operating method thereof are provided. The computing device includes a memory and a processor configured to: perform a first compression on a data object stored in the memory according to a first compression method, store the first compressed data object in a swap data storage area, and reclaim a portion of the memory in which the first compressed data object was stored; register information about the first compressed data object in a first management table; obtain the information about the first compressed data object from the first management table based on a usage ratio of the processor; and perform a second compression on the first compressed data object according to a second compression method, store the second compressed data object in the swap data storage area, and reclaim a portion of the swap data storage area in which the first compressed data object was stored.