Shared Memory Page Cache Deduplication for Cloud VM Clusters
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional systems face inefficiencies in memory page swapping due to slow operations and resource waste, particularly when identical pages are swapped across multiple servers in cloud environments, leading to increased latency and storage redundancy.
Innovation Solution
Implementing a distributed shared memory system with a global hash map and RDMA interconnects to uniquely identify and de-duplicate memory pages across a cluster of virtual machines, allowing for efficient swapping and storage of only unique pages in a shared in-memory cache.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If pages are swapped to disk on demand by operating system or hypervisor, then memory allocation limits are enforced, but swapping operation is slow and consumes significant processor and I/O resources
Solution Approach 1:
The patent introduces a shared memory cache as an intermediary between main memory and disk storage. When pages need to be swapped out, they are first written to the shared memory cache (which is much faster than disk), and only when the cache is full or pages are evicted are they then written to disk. This intermediary layer significantly reduces the frequency and impact of slow disk I/O operations while still enforcing memory allocation limits.
Solution Approach 2:
The system performs preliminary actions by pre-allocating and pre-warming the shared memory cache before actual swapping needs occur. The cache is prepared in advance with appropriate capacity and structure, so that when swapping becomes necessary, the system can immediately begin using it without the overhead of initializing disk-based swapping mechanisms. This preliminary preparation reduces the latency of swapping operations.
2Ease of operation
If identical pages are swapped from memory to disk across multiple servers, then memory management is performed independently per server, but storage redundancy increases and resources are wasted
Solution Approach 1:
The patent merges the memory management systems of multiple servers by introducing a shared memory cache that is accessible by all servers in the cluster. Instead of each server independently managing its own page files, identical pages from different servers are detected and stored only once in the shared cache. This combining approach eliminates storage redundancy while maintaining the operational independence of each server through a centralized coordination mechanism.
Solution Approach 2:
The system uses copying with deduplication: when a page is swapped out, the system checks if an identical copy already exists in the shared cache. If it does, only a reference or pointer to the existing copy is stored rather than duplicating the actual page data. This copying mechanism allows multiple servers to access the same physical page storage, eliminating redundancy while preserving the ability of each server to manage its memory independently.
3Adaptability or versatility
If multiple servers swap identical pages to disk, then each server uses separate page file slots, but I/O resources are consumed multiple times for the same data
Solution Approach 1:
The patent merges the I/O operations of multiple servers by routing all swapping operations through a shared memory cache. Instead of each server independently writing to its own disk, all servers write to the shared cache located on a common storage resource. This consolidation means that identical pages are written to disk only once, even if multiple servers need them, dramatically reducing I/O resource consumption while preserving server independence through logical addressing and reference mechanisms.
Data Source
AI summary
A data processing system includes a plurality of virtual machines each having associated memory pages; a shared memory page cache that is accessible by each of the plurality of virtual machines; and a global hash map that is accessible by each of the plurality of virtual machines. The data processing system is configured such that, for a particular memory page stored in the shared memory page cache that is associated with two or more of the plurality of virtual machines, there is a single key stored in the global hash map that identifies at least a storage location in the shared memory page cache of the particular memory page. The system can be embodied at least partially in a cloud computing system.


