Managed Runtime Heap Memory Compression and Offloading
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Managed runtimes face challenges in handling large datasets due to memory allocation issues, leading to out-of-memory exceptions and poor performance, despite sufficient free memory, as existing memory management techniques do not efficiently allocate contiguous memory segments.
Innovation Solution
The proposed solution involves selectively compressing or offloading live objects to secondary memory or storage based on size, age, and access frequency, using a 'mark and sweep' garbage collection approach, which splits objects with references into sub-objects to prevent decompression or reloading of reference fields, and utilizes compression accelerators for efficient memory management.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If memory compaction is performed to create contiguous memory segments, then allocation success rate improves, but memory access time increases due to object movement
Solution Approach 1:
The patent divides the heap memory into multiple regions and uses memory mapping to create virtual contiguous segments without physically moving objects. This segmentation approach allows the system to present contiguous memory to applications while maintaining the original physical object locations, thus avoiding access time penalties.
Solution Approach 2:
The patent introduces a memory manager as an intermediary layer between applications and physical memory. This memory manager uses memory mapping techniques to translate virtual contiguous addresses to physical memory locations, enabling contiguous allocation appearance without actual object movement, thereby resolving the contradiction between allocation success and access time.
2Quantity of substance
If manual object offloading to secondary memory is implemented, then heap memory availability improves, but system complexity increases due to serialization and rehydration processes
Solution Approach 1:
The memory manager automatically performs object identification, compression, and offloading to secondary memory based on predefined criteria (object size, age, accessibility). This self-service mechanism eliminates the need for manual intervention and complex serialization/rehydration processes by using direct memory mapping and compression techniques, thus improving heap availability while maintaining system simplicity.
3Quantity of substance
If compression is applied to objects in heap memory, then memory utilization improves, but processing overhead increases due to compression and decompression operations
Solution Approach 1:
The patent applies compression selectively based on local object characteristics such as size, age, and accessibility patterns. Not all objects are compressed uniformly; instead, the system identifies specific candidates for compression that meet certain criteria, thereby improving memory utilization while minimizing the processing overhead associated with compression and decompression operations.
Data Source
AI summary
Live objects in heap memory exceeding a threshold size and that have not been recently accessed are compressed or offloaded to secondary memory or storage. Compressing or offloading an object can further be based on how old the object is, which can be determined based on how many garbage collections the object has survived. Objects comprising references to other objects can be split into two sub-objects, one containing value fields that is compressed or offloaded and one containing reference fields that remains uncompressed in heap memory. Heap memory can undergo compaction after objects are compressed or offloaded. Compression accelerators can be used for compression and the decision of whether to compress or offload an object can be based on accelerator throughput, latency, availability, as well as other computing system metrics or characteristics. The compressing and offloading of objects and subsequent compaction can make more heap memory available for object allocation.


