Kernel Same-page Merging Delta Records for Memory Deduplication
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current Kernel Same-page Merging (KSM) techniques miss opportunities for merging similar pages, consume CPU resources, and are vulnerable to timing attacks, leading to inefficient memory deduplication and security threats in cloud computing environments.
Innovation Solution
The use of delta records and Intel Data Streaming Accelerator (DSA) to efficiently merge similar pages, offload CPU-intensive operations, and delay the unmerging process, thereby enhancing memory deduplication and security by tracking differences and obfuscating the unmerge process.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If KSM merges only identical pages, then memory deduplication is achieved, but similar pages are missed and memory savings are suboptimal
Solution Approach 1:
The patent changes the merging criterion from exact identity to similarity based on delta records. Pages are merged if their delta records (representing differences) are below a threshold, allowing flexible adjustment of similarity thresholds to balance memory savings against merging complexity.
Solution Approach 2:
Delta records serve as an intermediary representation between pages. Instead of directly comparing entire pages, the system uses delta records to capture differences, enabling efficient similarity-based merging without copying full page contents.
2Quantity of substance
If KSM performs page merging operations, then memory deduplication is achieved, but CPU resources are consumed
Solution Approach 1:
The system performs preliminary actions by creating delta records during normal memory operations. These delta records are accumulated and processed in batches, reducing the frequency of CPU-intensive merging operations while maintaining continuous memory deduplication capability.
Solution Approach 2:
The kernel automatically manages delta record creation and merging without requiring external CPU intervention. The system self-regulates by monitoring memory accesses and autonomously deciding when merging is beneficial, reducing overall CPU resource consumption.
3Productivity
If KSM merges pages quickly, then memory deduplication efficiency is improved, but timing attacks can expose data
Solution Approach 1:
The system uses feedback from memory access patterns and delta record analysis to dynamically adjust merging behavior. By monitoring which pages are merged and when, the system can obfuscate timing patterns that would otherwise expose data to attackers while maintaining efficient deduplication.
Solution Approach 2:
The merging process is made dynamic and adaptive rather than static. Pages are merged based on changing memory access patterns and delta record characteristics, allowing the system to adjust timing and behavior to prevent predictable timing attacks while maintaining productivity.
Data Source
AI summary
Methods and apparatus for efficiently merging non-identical pages in Kernel Same-page Merging (KSM) for efficient and improved memory deduplication and security. The methods and apparatus identify memory pages with similar data and selectively merge those pages based on criteria such as a threshold. Memory pages in memory for a computing platform are scanned to identify pages storing similar but not identical data. A delta record between the similar memory pages is created, and it is determined whether a size of the delta (i.e., amount of content that is different) is less than a threshold. If so, the delta record is used to merge the pages. In one aspect, operations for creating delta records and merging the content of memory pages using delta records is offloaded from a platform's CPU. Support for memory reads and memory writes are provided utilizing delta records, including merging and unmerging pages under applicable conditions.


