GB-scale large apps like on-device LLMs and rich media editors are becoming the next-generation trend, but their heavy memory and I/O demands, especially during multitasking, cause devices to reclaim or kill processes, turning warm apps into cold launches. The challenge lies not in storing them, but in fast, accurate launching. For users, 1s is the usability cliff, yet our measurements show 86.6\% of GB-scale cold launches exceed it. Also, Android Vitals flags only $\geq$ 5s as slow, exposing a large satisfaction gap. Existing optimizations are designed in isolation and conflict. For example, preloading reduces I/O stalls but consumes scarce memory and is undone by reclamation, while reclamation and killing free memory but sacrifice background survivability, leading to repeated cold relaunches. Our key insight is that, although multitasking makes runtime behavior complex, each app's file access pattern remains predictable. The challenge lies in exploiting this predictability, i.e., preloading without exhausting memory, reclaiming without undoing gains, and killing selectively to preserve background survivability. We introduce AppFlow, a prediction-based system-wide scheduler that integrates a Selective File Preloader, an Adaptive Memory Reclaimer, and a Context-Aware Process Killer. Implemented across the Android framework and Linux kernel without app changes, AppFlow cuts GB-scale cold-launch latency by 66.5\% (e.g., 2s$\rightarrow$690ms) and sustains 95\% of launches within 1s over a 100-day test, significantly improving responsiveness and multitasking experience.
翻译:GB级别的大型应用(如设备端LLM和富媒体编辑器)正成为下一代技术趋势,但其沉重的内存与I/O需求(尤其在多任务场景下)导致设备频繁回收或终止进程,使热应用转为冷启动。核心挑战不在于存储这些应用,而在于实现快速精准的启动。对用户而言,1秒是可用性临界点,但我们的实测显示86.6%的GB级冷启动超过该阈值。同时,Android Vitals仅将≥5秒标记为慢启动,暴露出巨大的满意度落差。现有优化方案各自为政且相互冲突:预加载虽减少I/O停滞却消耗稀缺内存,且易被回收机制抵消;回收与终止机制虽释放内存却牺牲后台存活能力,导致重复冷启动。我们的核心洞见在于:尽管多任务使运行时行为复杂化,但每个应用的文件访问模式仍具可预测性。关键挑战在于利用这种可预测性——实现不耗尽内存的预加载、不抵消收益的回收机制,以及通过选择性终止保持后台存活能力。本文提出AppFlow,这是一个基于预测的全系统调度器,整合了选择性文件预加载器、自适应内存回收器与情境感知进程终止器。通过无需修改应用的Android框架与Linux内核协同实现,AppFlow将GB级冷启动延迟降低66.5%(例如从2秒缩短至690毫秒),在百日测试中维持95%的启动时间低于1秒,显著提升了系统响应速度与多任务体验。