Silk: Runtime-Guided Memory Management for Reducing Application Running Janks on Mobile Devices
Ying Yuan, Zhipeng Tan, Dan Feng, Shitong Wei, Jie Gan, Yang Xiao, Wenjie Qi, Jing Zhang · ACM Transactions on Architecture and Code Optimization · 2025
As an economical method to expand mobile devices’ memory, swap is expected to enhance application performance. However, this article found two limitations of the current kernel memory management on mobile devices running applications developed in high-level languages. Firstly, application threads access data based on small objects in the Android Runtime (ART) heap. Experimental results reveal that a single page contains multiple objects with varying hotness. The existing page-based kernel memory management fails to accurately recognize the objects’ hotness within a page, and mistakenly prioritizes the reclamation of app-hot objects, which increases the swap in of app-hot objects and causes application running janks. Secondly, ART employs garbage collection (GC) to reclaim invalid objects, yet the kernel’s LRU-based memory management lacks insight into objects’ hotness within the GC working set. This results in the delayed reclamation of GC-cold objects and frequent swapping of GC-hot objects, leading to memory thrashing and substantial degradation in application running performance. To mitigate these issues, we propose Silk, a runtime-guided memory management schema. Silk includes two components: (1) for the application thread, it identifies object hotness in the application working set and groups objects with similar hotness in the same page in ART, caching app-hot objects in memory to reduce swap in; (2)for the GC thread, it identifies object hotness in the GC working set and guides the kernel to prioritize reclaiming GC-cold objects, thus preventing memory thrashing. We implement Silk on Android mobile devices and evaluate it with different categories of popular applications. Experimental results demonstrate that Silk reduces swap in size by 45.4% and reduces application running janks by 55.3%, compared to state-of-the-art work. Additionally, Silk achieves comparable application switch acceleration to the state-of-the-art. 1