<p>Retrieval-Augmented Generation (RAG) systems enhance Large Language Models (LLMs) by integrating external knowledge retrieval, but this integration increases query latency and cloud costs. Effective caching is critical to mitigate these overheads, especially in large-scale multi-tenant deployments where balancing efficiency, fairness, and cost is challenging. This paper presents a comprehensive simulation study comparing five strategies: global Least Frequently Used (LFU), global Least Recently Used (LRU), Window-LFU (LFU with aging), LFU+Quota (a soft per-tenant quota), and tenant-partitioned caching under realistic skewed workloads (Zipf <InlineEquation ID="IEq1"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42979_2025_4467_Article_IEq1.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="65" /> </InlineMediaObject> <EquationSource Format="TEX">\( {\user2{\alpha = 1}}{\mathbf{.0}} \)</EquationSource> </InlineEquation>) across 10,000 tenants. Fairness is quantified using Jain’s index (<Emphasis Type="BoldItalic">J</Emphasis>) and a max-min proxy (minimum per-tenant hit rate <InlineEquation ID="IEq2"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42979_2025_4467_Article_IEq2.gif" Format="GIF" Height="16" Rendition="HTML" Resolution="72" Type="Linedraw" Width="36" /> </InlineMediaObject> <EquationSource Format="TEX">\( {\mathbf{H}}_{{\min }} \)</EquationSource> </InlineEquation>). Our results demonstrate that global LFU achieves the highest cache hit rate (74.26%) and near-perfect fairness (Jain’s <InlineEquation ID="IEq3"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42979_2025_4467_Article_IEq3.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="77" /> </InlineMediaObject> <EquationSource Format="TEX">\( {\mathbf{J = 0}}{\mathbf{.995}} \)</EquationSource> </InlineEquation>), outperforming LRU (72.78% hit rate, <InlineEquation ID="IEq4"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42979_2025_4467_Article_IEq4.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="77" /> </InlineMediaObject> <EquationSource Format="TEX">\( {\mathbf{J = 0}}{\mathbf{.984}} \)</EquationSource> </InlineEquation>) and vastly surpassing tenant-partitioned caching (3.7% hit rate, <InlineEquation ID="IEq5"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42979_2025_4467_Article_IEq5.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="77" /> </InlineMediaObject> <EquationSource Format="TEX">\( {\mathbf{J = 0}}{\mathbf{.899}} \)</EquationSource> </InlineEquation>). Window-LFU achieves comparable efficiency (73.90% hit rate) with sustained fairness (<InlineEquation ID="IEq6"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42979_2025_4467_Article_IEq6.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="77" /> </InlineMediaObject> <EquationSource Format="TEX">\( {\mathbf{J = 0}}{\mathbf{.991}} \)</EquationSource> </InlineEquation>), while LFU+Quota provides near-global efficiency (73.80% hit rate) with stronger tenant protections (higher <InlineEquation ID="IEq7"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42979_2025_4467_Article_IEq2.gif" Format="GIF" Height="16" Rendition="HTML" Resolution="72" Type="Linedraw" Width="36" /> </InlineMediaObject> <EquationSource Format="TEX">\( {\mathbf{H}}_{{\min }} \)</EquationSource> </InlineEquation>, <InlineEquation ID="IEq8"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42979_2025_4467_Article_IEq8.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="78" /> </InlineMediaObject> <EquationSource Format="TEX">\( {\mathbf{J}} \approx {\mathbf{0}}{\mathbf{.998}} \)</EquationSource> </InlineEquation>). The inherent workload skew enables frequency-aware policies to dominate, while strict partitioning leads to severe fragmentation and poor reuse. These findings highlight that frequency-based caches (LFU and Window-LFU) remain most efficient under skewed workloads, and LFU+Quota offers a practical efficiency–fairness trade-off for multi-tenant GenAI services.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Caching at Scale: Efficiency and Fairness Analysis in Multi-tenant RAG Systems

  • Hardik Ruparel,
  • Tatsat Patel

摘要

Retrieval-Augmented Generation (RAG) systems enhance Large Language Models (LLMs) by integrating external knowledge retrieval, but this integration increases query latency and cloud costs. Effective caching is critical to mitigate these overheads, especially in large-scale multi-tenant deployments where balancing efficiency, fairness, and cost is challenging. This paper presents a comprehensive simulation study comparing five strategies: global Least Frequently Used (LFU), global Least Recently Used (LRU), Window-LFU (LFU with aging), LFU+Quota (a soft per-tenant quota), and tenant-partitioned caching under realistic skewed workloads (Zipf \( {\user2{\alpha = 1}}{\mathbf{.0}} \) ) across 10,000 tenants. Fairness is quantified using Jain’s index (J) and a max-min proxy (minimum per-tenant hit rate \( {\mathbf{H}}_{{\min }} \) ). Our results demonstrate that global LFU achieves the highest cache hit rate (74.26%) and near-perfect fairness (Jain’s \( {\mathbf{J = 0}}{\mathbf{.995}} \) ), outperforming LRU (72.78% hit rate, \( {\mathbf{J = 0}}{\mathbf{.984}} \) ) and vastly surpassing tenant-partitioned caching (3.7% hit rate, \( {\mathbf{J = 0}}{\mathbf{.899}} \) ). Window-LFU achieves comparable efficiency (73.90% hit rate) with sustained fairness ( \( {\mathbf{J = 0}}{\mathbf{.991}} \) ), while LFU+Quota provides near-global efficiency (73.80% hit rate) with stronger tenant protections (higher \( {\mathbf{H}}_{{\min }} \) , \( {\mathbf{J}} \approx {\mathbf{0}}{\mathbf{.998}} \) ). The inherent workload skew enables frequency-aware policies to dominate, while strict partitioning leads to severe fragmentation and poor reuse. These findings highlight that frequency-based caches (LFU and Window-LFU) remain most efficient under skewed workloads, and LFU+Quota offers a practical efficiency–fairness trade-off for multi-tenant GenAI services.