ObjectCache: 用于KV缓存重用的分层对象存储检索
ObjectCache: Layerwise Object-Storage Retrieval for KV Cache Reuse
AI总结:
提出ObjectCache系统,利用S3兼容对象存储存储KV缓存,通过协同设计存储协议和传输调度,在GPU消费顺序下交付数据,重叠数据传输与计算,从而在不增加集群成本的前提下最小化TTFT延迟。
摘要:
前缀KV缓存已成为LLM服务中的关键机制:它通过避免共享前缀(即系统提示)的请求之间的冗余计算来减少首令牌时间(TTFT)。然而,累积的KV缓存通常超过GPU内存和本地DRAM的容量。为了保持低延迟,当前系统将KV缓存保存在远程DRAM池中,从而增加了服务集群的规模和成本。在本文中,我们探索了一种不同的方法:将KV缓存存储在S3兼容的对象存储中,使容量不再成为约束,同时最小化对TTFT的影响。我们提出了ObjectCache,它协同设计存储协议和传输调度,使存储服务器按照GPU消费的顺序交付KV缓存数据,并在并发请求之间重叠数据传输与计算。我们在一个100 Gbps的RoCE集群上使用NIXL(一个抽象存储和内存的推理库)、Ceph RGW(一个用于集群的对象网关)和DAOS(一个开源存储系统)对ObjectCache进行了原型实现。对于当今系统中常见的64K上下文,ObjectCache相比本地DRAM仅增加5.6%的延迟;对于4K上下文,由于可用于掩盖传输的计算较少,ObjectCache相比最优的本地逐层基线增加了56-75毫秒。在共享带宽限制下,我们的调度器相比等带宽共享将增加的TTFT减少了1.2-1.8倍。
英文摘要:
Prefix KV caching has become a key mechanism in LLM serving: it reduces time to first token (TTFT) by avoiding redundant computation across requests that share a prefix (i.e., the system prompt). However, the accumulated KV cache is often larger than what GPU memory and local DRAM can hold. To preserve latency, current systems keep the KV cache in remote DRAM pools, increasing serving-cluster size and cost. In this paper, we explore a different approach: storing the KV cache in S3-compatible object storage so that capacity is no longer the constraint, while minimizing the impact on TTFT. We propose ObjectCache, which co-designs the storage protocol and transfer schedule so that the storage server delivers KV cache data in the order the GPU consumes it, overlapping data transfer with compute across concurrent requests. We prototype ObjectCache on a 100 Gbps RoCE cluster with NIXL (an inference library that abstracts storage and memory), Ceph RGW (an Object Gateway for clusters), and DAOS (an open source storage system). For 64K contexts, common in today's systems, ObjectCache adds only 5.6\% latency over local DRAM; for 4K contexts, where less compute is available to mask transfer, ObjectCache adds 56--75\,ms over the optimal local layerwise baseline. Under shared bandwidth caps, our scheduler reduces added TTFT by 1.2--1.8x compared with equal bandwidth sharing.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。