一句话:提出前台/后台感知的 GC 与 swap 协同设计 Fleet,在增加缓存应用数的同时加速移动应用热启动。
移动应用热启动(从后台缓存状态启动)体验优于冷启动,但现有通过 swap 缓存更多应用或缩小 Java 堆的方法会损害热启动性能。本文提出 Fleet,一个前台/后台感知的 GC 与 swap 协同设计框架:将 GC 追踪范围限制为后台对象,避免触碰长生命周期的前台对象以提升缓存容量;识别下次热启动会访问的对象,并用运行时信息指导操作系统 swap 策略;同时将访问模式相似的小对象聚合到同一页面以提高 swap 效率。作者在 AOSP 中实现并评估多种应用,结果显示热启动速度提升 1.59 倍,缓存应用数达到 Android 的 1.21 倍。
Faster app launching is crucial for the user experience on mobile devices. Apps launched from a background cached state, called hot-launching, have much better performance than apps launched from scratch. To increase the number of hot-launches, leading mobile vendors now cache more apps in the background by enabling swap. Recent work also proposed reducing the Java heap to increase the number of cached apps. However, this paper found that existing methods deteriorate app hot-launch performance while increasing the number of cached apps. To simultaneously improve the number of cached apps and hot-launch performance, this paper proposes Fleet, a foreground/background-aware GC-swap co-design framework. To enhance app-caching capacity, Fleet limits the tracing range of GC to background objects only, avoiding touching long-lifetime foreground objects. To improve hot-launch performance, Fleet identifies objects that will be accessed during the next hot-launch and uses runtime information to guide the swap scheme in the OS. In addition, Fleet aggregates small objects with similar access patterns into the same pages to improve swap efficiency. We implemented Fleet in AOSP and evaluated its performance with different types of apps. Experimental results show that Fleet achieves a 1.59× faster hot-launch time and caches 1.21× more apps than Android.
@inproceedings{HuangZQLALX24,
title = {More Apps, Faster Hot-Launch on Mobile Devices via Fore/Background-aware GC-Swap Co-design},
author = {Jiacheng Huang and Yunmo Zhang and Junqiao Qiu and Yu Liang and Rachata Ausavarungnirun and Qingan Li and Chun Jason Xue},
booktitle = {ASPLOS},
year = {2024},
doi = {10.1145/3620666.3651377}
}