arXiv:2609.01338v1 cs.OS

mzCache: 멀티태스킹 환경에서의 온디바이스 LLM 메모리 관리

mzCache: On-Device LLM Memory Management under Multitasking

Hongseung Yu, Minsung Kim, Jongseok Park, Kyunghan Lee

제출 2026-09-01

한국어 초록

온디바이스 모바일 대규모 언어 모델(LLM) 추론(inference)이 큰 주목을 받고 있습니다. 그러나 모바일 기기는 사용자가 애플리케이션 간을 빈번하게 전환하는 매우 동적인 멀티태스킹 환경에서 동작합니다. 이는 메모리 압박을 유발하여 운영체제에 의해 LLM 메모리(모델 가중치 및 KV 캐시)가 축출(evict)되도록 만듭니다. 새로운 추론 요청이 도착하면, 추론 시스템은 느린 스토리지 읽기를 통해 축출된 메모리를 복원하거나 전체 KV 캐시를 재계산해야 하므로 응답성을 심각하게 저하시킵니다. 이를 해결하기 위해 멀티태스킹 환경에 특화된 메모리 관리를 지원하는 온디바이스 LLM 추론 시스템인 mzCache를 제안합니다. 예측할 수 없는 메모리 압박 속에서 mzCache는 LLM 메모리를 탄력적으로 축출하고 모바일 SoC의 통합 메모리를 활용하여, CPU 측의 동시 복원과 함께 GPU에서 대기 시간 없는(zero-wait) 추론을 가능하게 합니다. mzCache는 복원 지향적 메모리 관리를 통해 이를 실현합니다. LLM 메모리는 세분화된 공유 버퍼로 분할되어 프로세서 간 동시 접근과 함께 부분 축출 및 복원을 가능하게 하며, 하이브리드 스왑 및 역방향 축출(backward-out eviction) 정책을 통해 어떠한 축출 상태에서도 낮은 지연 시간으로 복원할 수 있도록 보장합니다. llama.cpp를 기반으로 구현되어 안드로이드 애플리케이션으로 배포된 mzCache는 스토리지 기반 부분 오프로드와 비교하여 첫 번째 토큰 생성 시간(Time-to-First-Token)을 2.1-5.5$\times$ 단축하며 실제 멀티태스킹 시나리오에서 그 효과를 입증합니다.

원문 초록

On-device mobile Large Language Model (LLM) inference is gaining significant attention. However, mobile devices operate in highly dynamic multitasking environments where users frequently switch between applications. This creates memory pressure, forcing LLM memory (model weights and KV cache) to be evicted by the operating system. When a new inference request arrives, the inference system must restore the evicted memory through slow storage reads or recompute the entire KV cache, severely degrading responsiveness. To address this, we present mzCache, an on-device LLM inference system with specialized memory management for multitasking environments. Under unpredictable memory pressure, mzCache elastically evicts LLM memory and leverages the unified memory of mobile SoCs to enable zero-wait inference on the GPU with concurrent CPU-side restoration. mzCache realizes this through restoration-oriented memory management: LLM memory is partitioned into fine-grained shared buffers to enable partial eviction and restoration with concurrent cross-processor access, while hybrid swap and backward-out eviction policies ensure low-latency restoration from any eviction state. Implemented on llama.cpp and deployed as an Android application, mzCache achieves 2.1-5.5$\times$ reduction in Time-to-First-Token compared to storage-backed partial offload and demonstrates its effectiveness in real multitasking scenarios.

제출 이력

확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.

  1. arXiv:2609.01338v1제출 시각 미확인

함께 살펴볼 논문

공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.

공통 태그로 연결된 공개 논문이 아직 없습니다.

토론

이 논문과 연결된 포럼 글이 아직 없습니다.