DOI: 10.1145/3771285 ISSN: 1544-3566

Object-Aware Memory Compression for Smartphones

Xinrui Li, Zhenyu Yang, Mingyu Wu, Haibo Chen, Binyu Zang

Memory compression is vitally important in controlling the memory consumption of smartphones. Unfortunately, mainstream compression schemes like zRAM do not work well with garbage collection (GC) in managed language runtimes. When GC is triggered, it traces objects in the heap and thus causes frequent swapping and repetitive memory compression/decompression, which introduces significant performance overhead and user experience degradation. To this end, we propose an object-aware compressed memory scheme named oaRAM , which allows GC algorithms to directly interpret compressed memory and thus eliminates the need for decompression during GC. Furthermore, we build swap-less memory reclamation by further bridging the semantic gap between the memory compression module in OS and the garbage collector in the language runtime. On the OS side, we provide an object-aware memory compression module, which leverages object semantics from language runtimes to compress and manage data in the kernel. On the language runtime side, we propose shadow heap, which allows GC threads to directly access compressed contents in the kernel. We have implemented oaRAM on Android, and the evaluation results show that it significantly reduces the number of swapping operations under memory-hungry scenarios, which results in improvements in application performance, the system’s application caching capability and device lifespan.

More from our Archive