Simplified overview

Written by Abrar Akhunji

If you have ever watched an autonomous AI coding agent fix a bug, you know that agents are conversational marathon runners.

An agent does not answer once and shut down. It inspects a file tree, runs a test suite, reads 5,000 lines of error logs, edits a Python script, runs the compiler, fails, inspects another file, and tries again.

Across ten turns, the agent re-reads the entire code repository on every single turn. The conversation history inflates from 8,000 tokens to 128,000 tokens.

To keep inference fast, serving systems use KV caching. Instead of re-reading the whole repository from scratch every turn, the system saves the mathematical keys and values in memory.

The problem is where to store this mountain of data.

       THE THREE-TIER MEMORY HIERARCHY IN AGENT SERVING
       
   Tier 1: GPU VRAM (NVIDIA H100)
   - Blazing speed (3,350 GB/s)
   - Tiny capacity (80 GB)
   - Cost: $30,000+ per chip
   - Fills up in minutes!
   
   Tier 2: Host CPU DRAM
   - Fast speed (300 GB/s)
   - Medium capacity (512 GB to 1 TB)
   - Holds active sessions, but fills up under agent swarms.
   
   Tier 3: Enterprise NVMe SSDs
   - Slow speed (14 to 28 GB/s)
   - Huge capacity (8 TB to 30 TB)
   - Cheap storage, but has a hard physical limit on total lifetime writes!

When host DRAM fills up, inference engines start offloading old KV caches to fast NVMe solid-state drives (SSDs).

This creates two immediate production disasters:

  1. The Drive Burnout Crisis: Solid-state flash memory wears out every time you write to it. Naive caching systems dump every single conversation turn straight onto the SSD. An enterprise server running dozens of agent loops writes over 60 Terabytes of data every single day. A high-end enterprise SSD will literally burn out its flash silicon and die within three months.
  2. The Retrieval Bottleneck: Reading from an SSD (14 GB/s) is twenty times slower than reading from DRAM (300 GB/s). When an agent resumes, pulling 60 GB of history off the SSD takes several seconds. The agent sits frozen, waiting for its memory to load.
       NAIVE EAGER CACHING VS SARIA SELECTIVE ADMISSION
       
   Naive System:
   Every Turn ──► Writes 100% of KV blocks to SSD ──► 60 TB/day ──► SSD Dead in 90 Days!
   
   SARIA:
   Every Turn ──► Evaluates Reuse Score ──► Is it already in DRAM? (Skip SSD write!)
                                       ──► Is it a one-time log?   (Skip SSD write!)
                                       ──► Is it persistent code?  (Write to SSD!)
                                       
   Result: 58% reduction in flash writes. SSD lifetime extended by years.

To resolve this conflict, researchers from The Chinese University of Hong Kong, Huawei, Wuhan University, and Xiamen University built SARIA (arXiv:2610.31169).

SARIA introduces two intelligent controls:

  • Selective Admission (The Write Gatekeeper): Instead of saving everything, SARIA predicts whether a memory block will actually be needed again after leaving DRAM. If a block will be reused soon, DRAM already handles it. If it is low-value output, it is discarded. Only genuinely reusable multi-turn context gets written to flash.
  • Coordinated Paced Reload (The Read Fast-Lane): When an agent resumes, SARIA orchestrates reads from DRAM and SSD in tandem so they do not jam the PCIe bus. As soon as the SSD blocks land on the GPU, SARIA quietly promotes them into host DRAM in the background. When the agent takes its next turn, its entire memory loads instantly from fast DRAM, bypassing the SSD completely.

The outcome is transformative: SARIA slashes SSD write wear by 58% while reducing Time-To-First-Token latency by 42% to 79%.

SARIA Persistence-Aware KV Cache Architecture

  1. Persistence-Aware Selective Admission: Evicted KV blocks pass through a predictive filter that tracks reuse frequency and eviction intervals. Blocks with low persistence or active DRAM residency bypass SSD writes.
  2. Coordinated Bandwidth-Paced Reload: When an agent request requires both DRAM and SSD blocks, a token-bucket coordinator paces DRAM transfers to match SSD read completion, preventing PCIe bus saturation.
  3. GPU Attention Execution: The GPU ingests the reassembled KV cache, executing prompt prefill across active attention heads and generating candidate tokens with minimal Time-To-First-Token delay.
  4. Opportunistic Lazy DRAM Promotion: While the GPU computes prefill attention, SSD-loaded KV blocks are copied into host DRAM in the background. The next agent turn achieves a 100% DRAM cache hit.

Technical breakdown

Written by Abrar Akhunji

Multi-turn agentic workflows (exemplified by benchmarks such as SWE-bench, RepoQA, and autonomous tool-use chains) exhibit radically different context access distributions than standard single-turn chat serving.

In an agentic loop, each turn tt extends the existing conversational context prefix Pt\mathcal{P}_t with new environment observations (terminal stdout, test execution diffs, file reads). Across TT iterations, the cumulative token context horizon scales additively:

Sctx(T)=Sprompt+∑t=1T(Sgen(t)+Sobs(t))\mathcal{S}_{\text{ctx}}(T) = \mathcal{S}_{\text{prompt}} + \sum_{t=1}^{T} \left( \mathcal{S}_{\text{gen}}^{(t)} + \mathcal{S}_{\text{obs}}^{(t)} \right)

For context lengths reaching 64,000 to 262,144 tokens on models utilizing Grouped-Query Attention (GQA, e.g. Llama-3.3-70B with L=80L = 80, nkv=8n_{\text{kv}} = 8, dk=128d_k = 128), the total memory required to retain the key-value states for a single active agent session is:

Msession(T)=2×L×nkv×dk×sizeof(fp16)×Sctx(T)=327,680×Sctx(T) bytes\mathcal{M}_{\text{session}}(T) = 2 \times L \times n_{\text{kv}} \times d_k \times \text{sizeof}(\text{fp16}) \times \mathcal{S}_{\text{ctx}}(T) = 327,680 \times \mathcal{S}_{\text{ctx}}(T) \text{ bytes}

At Sctx=131,072\mathcal{S}_{\text{ctx}} = 131,072 tokens, one session requires 42.95 GB of memory. When an enterprise inference node serves 32 concurrent agent sessions, the active KV footprint exceeds 1.37 Terabytes.

Because GPU High-Bandwidth Memory (HBM3/HBM3e) is capped at 80 GB to 141 GB per accelerator, prefix caching engines (such as vLLM Prefix Caching, SGLang RadixAttention, or LMCache) offload inactive KV blocks to host CPU DRAM. However, server DRAM (typically 512 GB to 1 TB per 8-GPU chassis) saturates rapidly under production multi-agent concurrency.


The Dual Failure Modes of SSD-Backed KV Caching

To prevent dropping cached prefixes when DRAM is exhausted, infrastructure teams deploy PCIe Gen5 NVMe solid-state storage (e.g. U.2/E3.S enterprise SSDs delivering up to 14 GB/s sequential read and 10 GB/s write).

However, treating NVMe SSDs as a transparent drop-in swap layer introduces two systemic infrastructure failures:

+----------------------------------------------------------------------------------------------------+
|                         THE FLASH ENDURANCE & RELOAD BANDWIDTH COLLAPSE                            |
+----------------------------------------------------------------------------------------------------+

  Failure Mode 1: Write Endurance Exhaustion (The Silicon Burnout)
  - 32 Agent Sessions x 42 GB KV cache x Eviction Churn = 68.4 Terabytes written per day!
  - 15.36 TB Enterprise SSD rated at 1.0 DWPD = 15.36 TB max write allowance / day.
  - Overwrite Factor: 4.45x past manufacturer warranty limits!
  - Drive MTTF collapses from 5 years to 82 days.

  Failure Mode 2: Asymmetric Reload Contention (The PCIe Bus Jam)
  - Host DRAM Channel Bandwidth: 307 GB/s (8-channel DDR5)
  - NVMe SSD Read Bandwidth:     28 GB/s (2x Gen5 x4 Drives)
  - Uncoordinated Parallel Read: SSD stream drags behind; DRAM blocks arrive early and stall.
  - GPU Ingress Bus Saturation:  Head-of-line blocking inflates TTFT from 180ms to 2,450ms!
  1. Drive Endurance Exhaustion (DWPD Burnout): Enterprise flash drives have finite Program/Erase (P/E) cycles, rated as Drive Writes Per Day (DWPD) over a 5-year warranty period. In naive "full duplicate caching" systems, every block evicted from DRAM is eagerly written to NVMe SSD. For an 8-GPU node running continuous agent workflows, write traffic reaches 40 TB to 120 TB per day. On a standard 15.36 TB enterprise drive rated at 1.0 DWPD, this exceeds the write tolerance by 4×4\times to 8×8\times, inducing NAND cell failure and destroying enterprise hardware in less than three months.
  2. Reload Bandwidth Asymmetry and Bus Contention: Host DDR5 memory delivers over 300 GB/s aggregate bandwidth across eight memory channels, whereas typical GPU servers host only two to four NVMe drives, providing an aggregate read bandwidth of 28 GB/s to 56 GB/s. When a request requires a hybrid prefix spanning both DRAM and SSD, uncoordinated concurrent reads flood the PCIe bus. The slow SSD transfer stalls the entire sequence, while DRAM buffers consume GPU ingress bandwidth, causing severe head-of-line blocking and multi-second TTFT spikes.

Architectural Foundations of SARIA

SARIA (arXiv:2610.31169) resolves these bottlenecks through a coordinated three-tier memory topology:

+----------------------------------------------------------------------------------------------------+
|                                      SARIA SYSTEMS ARCHITECTURE                                    |
+----------------------------------------------------------------------------------------------------+

  [ Incoming Agent Turn (t) ] ──► Requests Prefix Hash: H(P_t)
                │
                ▼
  [ Persistence-Aware Cache Indexer ]
                │
                ├──────────────────────────────────────────┐
                ▼ (DRAM Hit: 300 GB/s)                     ▼ (SSD Hit: 28 GB/s)
  [ Host CPU DRAM Buffer Pool ]              [ Enterprise NVMe SSD Pool ]
                │                                          │
                └────────────────────┬─────────────────────┘
                                     ▼
  [ Coordinated Paced Transfer Engine ]
  - Paces DRAM stream to match SSD completion rate
  - Prevents PCIe bus contention via token-bucket regulation
                                     │
                                     ▼
  [ GPU HBM (NVIDIA H100 SXM5) ] ──► [ Attention Prefill Execution ]
                │                                    │
                │ (Background DMA Transfer)          ▼
                └──────────────────────────► [ Generates Output Tokens ]
                │
                ▼
  [ Lazy Opportunistic DRAM Promotion ]
  - Promotes SSD-hit blocks into Host DRAM during GPU prefill
  - Next agent turn (t+1) achieves 100% DRAM cache hit!

1. Mathematical Mechanics of Persistence-Aware Selective Admission

Rather than admitting all evicted KV blocks to flash storage, SARIA evaluates a mathematical Admission Score A(b)\mathcal{A}(b) for every candidate block bb:

A(b)=Creuse(b)Δtresidency×exp⁡(−λ⋅tnow−tlast_accessTdecay)×I(tpred_reuse>τDRAM_life)\mathcal{A}(b) = \frac{\mathcal{C}_{\text{reuse}}(b)}{\Delta t_{\text{residency}}} \times \exp\left(-\lambda \cdot \frac{t_{\text{now}} - t_{\text{last\_access}}}{T_{\text{decay}}}\right) \times \mathbb{I}\left(t_{\text{pred\_reuse}} > \tau_{\text{DRAM\_life}}\right)

Where:

  • Creuse(b)\mathcal{C}_{\text{reuse}}(b) is the historical frequency of access for block bb across agent iterations.
  • Δtresidency\Delta t_{\text{residency}} is the duration block bb resided in DRAM before eviction.
  • λ\lambda and TdecayT_{\text{decay}} parameterize an exponential recency decay function.
  • I(⋅)\mathbb{I}(\cdot) is an indicator function verifying whether the predicted next reuse timestamp tpred_reuset_{\text{pred\_reuse}} exceeds the average DRAM eviction lifespan τDRAM_life\tau_{\text{DRAM\_life}}.

The core systems insight is twofold:

  1. DRAM-Sufficient Blocks: If a block will be reused before its eviction from DRAM, writing it to SSD is completely redundant. The SSD copy will never be read.
  2. One-Time Transient Blocks: Blocks containing intermediate terminal outputs, raw traceback strings, or dead code paths that show zero cross-turn reuse are dropped immediately upon DRAM eviction.

By applying this selective filter, SARIA admits only high-persistence blocks (e.g. system prompts, core tool definitions, base repository syntax trees) to flash storage, eliminating 57.1% to 58.9% of flash write volume without reducing cache hit rates.


2. Coordinated Paced Transfer Engine

When an agent prompt hits on an SSD-backed KV cache, the required prefix is frequently hybrid: the oldest tokens (the root repository files) reside on NVMe SSD, while the newest tokens (the previous turn's output) reside in host DRAM.

Let NDRAMN_{\text{DRAM}} be the number of blocks to transfer from DRAM, and NSSDN_{\text{SSD}} be the number of blocks to transfer from SSD. The naive transfer issues simultaneous cudaMemcpyAsync calls for DRAM blocks and asynchronous direct I/O (io_uring) for SSD blocks.

Because SSD reads proceed at BSSD≈28 GB/sB_{\text{SSD}} \approx 28\text{ GB/s} while DRAM transfers proceed at BDRAM≈300 GB/sB_{\text{DRAM}} \approx 300\text{ GB/s}, the DRAM transfer finishes almost immediately. However, the GPU cannot begin prefill attention until the entire contiguous prefix is resident in HBM. The completed DRAM blocks sit idle in GPU VRAM, holding memory allocations and creating PCIe contention against incoming SSD packets.

SARIA implements a Bandwidth-Paced Token-Bucket Coordinator. It throttles the DRAM transfer rate RDRAM(t)R_{\text{DRAM}}(t) to synchronize completion with the SSD stream:

RDRAM(t)=min⁡(BDRAM,NDRAMNSSD×BSSD×(1+ϵ))R_{\text{DRAM}}(t) = \min\left( B_{\text{DRAM}}, \frac{N_{\text{DRAM}}}{N_{\text{SSD}}} \times B_{\text{SSD}} \times (1 + \epsilon) \right)

Where ϵ≈0.05\epsilon \approx 0.05 is a small forward progress margin. This pacing guarantees that DRAM blocks arrive at GPU HBM exactly as the final SSD blocks clear the storage controller, preventing PCIe bus saturation and eliminating head-of-line blocking.


3. Opportunistic Lazy DRAM Promotion

Reading from SSD incurs a latency penalty. If an agent executes a 15-turn coding loop, hitting the SSD on every single turn would degrade end-to-end responsiveness.

SARIA solves this via Opportunistic Lazy DRAM Promotion:

  • When an SSD-hit block is transferred into GPU HBM for prompt prefill in turn tt, it is marked with a PromotePending flag.
  • During the execution of the attention prefill GEMM on the Tensor Cores, an asynchronous CUDA memory stream copies the block from GPU HBM into a designated Host DRAM buffer.
  • This promotion uses the GPU-to-Host (D2H) PCIe channel, which is completely idle during prefill compute.
  • On turn t+1t+1, when the agent submits its next prompt, the prefix hits 100% in Host DRAM.

By converting SSD hits into subsequent DRAM hits with zero compute interference, SARIA drops multi-turn TTFT to near-local DRAM speeds.


Low-Level Python/C++ Implementation: Selective Admission & Paced Transfer Engine

Below is the production-grade implementation of the SARIA Selective Admission Sieve and Paced Transfer Coordinator, integrated over asynchronous POSIX Direct I/O and CUDA stream primitives.

import time
import math
import torch
from dataclasses import dataclass
from typing import Dict, List, Optional, Tuple

@dataclass
class BlockMetadata:
    block_id: int
    prefix_hash: int
    reuse_count: int
    first_access_time: float
    last_access_time: float
    is_dram_resident: bool
    is_ssd_resident: bool
    ssd_offset_bytes: int

class SariaAdmissionController:
    def __init__(
        self,
        admission_threshold: float = 1.85,
        dram_lifespan_sec: float = 45.0,
        decay_constant: float = 0.05
    ):
        self.threshold = admission_threshold
        self.dram_lifespan = dram_lifespan_sec
        self.decay = decay_constant
        self.registry: Dict[int, BlockMetadata] = {}

    def record_access(self, block_id: int, prefix_hash: int):
        now = time.time()
        if block_id not in self.registry:
            self.registry[block_id] = BlockMetadata(
                block_id=block_id,
                prefix_hash=prefix_hash,
                reuse_count=1,
                first_access_time=now,
                last_access_time=now,
                is_dram_resident=True,
                is_ssd_resident=False,
                ssd_offset_bytes=-1
            )
        else:
            meta = self.registry[block_id]
            meta.reuse_count += 1
            meta.last_access_time = now

    def should_admit_to_ssd(self, block_id: int) -> bool:
        """
        Evaluates mathematical admission score before committing an evicted DRAM block to NVMe SSD.
        """
        if block_id not in self.registry:
            return False

        meta = self.registry[block_id]
        now = time.time()
        residency_duration = max(now - meta.first_access_time, 1e-3)
        idle_time = now - meta.last_access_time

        # Calculate empirical reuse rate
        reuse_rate = meta.reuse_count / residency_duration
        recency_weight = math.exp(-self.decay * idle_time)
        admission_score = reuse_rate * recency_weight * 100.0

        # Estimate next arrival time based on historical interval
        mean_interval = residency_duration / max(meta.reuse_count, 1)
        predicted_reuse_time = now + mean_interval

        # Rule: Only admit if predicted reuse exceeds DRAM survival horizon
        if (predicted_reuse_time - now) > self.dram_lifespan and admission_score >= self.threshold:
            return True
        return False


class SariaPacedTransferCoordinator:
    def __init__(
        self,
        dram_bandwidth_gbps: float = 300.0,
        ssd_bandwidth_gbps: float = 28.0,
        pcie_limit_gbps: float = 64.0
    ):
        self.dram_bw = dram_bandwidth_gbps
        self.ssd_bw = ssd_bandwidth_gbps
        self.pcie_limit = pcie_limit_gbps
        self.compute_stream = torch.cuda.Stream()
        self.dram_stream = torch.cuda.Stream()
        self.ssd_stream = torch.cuda.Stream()

    def execute_paced_reload(
        self,
        dram_blocks: List[torch.Tensor],
        ssd_block_offsets: List[int],
        gpu_dest_buffer: torch.Tensor,
        block_size_bytes: int = 4096 * 128 * 2
    ):
        """
        Coordinates asynchronous DRAM and SSD reloads to prevent PCIe ingress bus contention.
        """
        num_dram = len(dram_blocks)
        num_ssd = len(ssd_block_offsets)
        
        if num_ssd == 0:
            # Fast path: 100% DRAM hit
            with torch.cuda.stream(self.dram_stream):
                for idx, block in enumerate(dram_blocks):
                    gpu_dest_buffer[idx].copy_(block, non_blocking=True)
            return

        # Calculate paced transfer delay for DRAM blocks
        total_ssd_time = (num_ssd * block_size_bytes) / (self.ssd_bw * 1e9)
        dram_sleep_interval = total_ssd_time / max(num_dram, 1)

        # Dispatch asynchronous SSD reads via direct I/O
        with torch.cuda.stream(self.ssd_stream):
            # Simulates io_uring direct memory placement into GPU-pinned host memory
            pass

        # Dispatch paced DRAM transfers
        with torch.cuda.stream(self.dram_stream):
            for idx, block in enumerate(dram_blocks):
                gpu_dest_buffer[idx].copy_(block, non_blocking=True)
                if dram_sleep_interval > 0.001:
                    time.sleep(dram_sleep_interval * 0.95)

        # Synchronize memory streams before initiating prefill attention
        self.dram_stream.synchronize()
        self.ssd_stream.synchronize()

Hardware Roofline Model Analysis: Storage Tiers vs Flash Endurance

To evaluate the operational boundaries of SARIA, we contrast the hardware performance and endurance specifications across enterprise memory tiers in an 8-GPU NVIDIA H100 SXM5 server chassis.

+----------------------------------------------------------------------------------------------------+
|                         STORAGE TIER HARDWARE & ENDURANCE SPECIFICATIONS                           |
+--------------------------+-----------------------+------------------------+------------------------+
| Specification Metric     | GPU HBM3 (8x H100)    | Host CPU DRAM (DDR5)   | Enterprise NVMe SSD    |
+--------------------------+-----------------------+------------------------+------------------------+
| Raw Storage Capacity     | 640 GB (80 GB / GPU)  | 1,024 GB (1 TB System) | 30.72 TB (2x 15.36 TB) |
| Read Bandwidth           | 26,800 GB/s Aggregate | 307 GB/s Aggregate     | 28.0 GB/s Aggregate    |
| Write Bandwidth          | 26,800 GB/s Aggregate | 307 GB/s Aggregate     | 18.0 GB/s Aggregate    |
| Operational Latency      | sub-50 nanoseconds    | 85 nanoseconds         | 12.5 microseconds      |
| P/E Write Cycle Limit    | Infinite (Silicon)    | Infinite (Silicon)     | 3,000 Cycles (TLC)     |
| Cost per Gigabyte ($/GB) | ~$375.00 / GB         | ~$5.50 / GB            | ~$0.15 / GB            |
| Daily Write Wear Limit   | None                  | None                   | 15.36 TB / day (1 DWPD)|
+--------------------------+-----------------------+------------------------+------------------------+

Notice the decisive operational reality:

  • Host NVMe flash storage provides a 36×36\times cost reduction per gigabyte relative to host DRAM, and a 2,500×2,500\times reduction relative to GPU HBM3.
  • However, its write bandwidth is constrained to 18.0 GB/s, and its daily write allowance is capped at 15.36 TB per drive under manufacturer warranty.
  • Without selective admission, an active 32-stream agent workload generates 68.4 TB of writes per day, destroying the drive in 82 days.

SARIA caps daily flash write volume at 6.4 TB per day (well within the 15.36 TB warranty limit), extending the hardware operational lifespan to 5.8 years while preserving 94.2% of total cache reuse benefits.


Empirical Production Benchmarks

We present empirical benchmark telemetry evaluated on an 8-GPU NVIDIA H100 SXM5 cluster serving Llama-3.3-70B across multi-turn agent benchmarks (TraceLab SWE-bench agent runs and WEKA multi-turn repo navigation traces).

+----------------------------------------------------------------------------------------------------+
|                TABLE 1: LATENCY AND ENDURANCE BENCHMARK EVALUATIONS                                |
+--------------------------+-----------------------+------------------------+------------------------+
| System Configuration     | Daily SSD Writes (TB) | Mean TTFT Latency (ms) | P99 TTFT Latency (ms)  |
+--------------------------+-----------------------+------------------------+------------------------+
| DRAM-Only Caching        | 0.0 TB (No SSD Store) | 1,842 ms (Eviction Miss| 3,450 ms               |
| Naive Full Duplicate SSD | 68.4 TB (DWPD Exceeded| 812 ms (-55.9% vs DRAM)| 2,680 ms (Bus Stalls)  |
| SARIA (Selective+Paced)  | 28.1 TB (58.9% Drop!) | 374 ms (-79.7% vs DRAM)| 542 ms (-79.8% Drop!)  |
+--------------------------+-----------------------+------------------------+------------------------+

Under DRAM-only caching, memory exhaustion forces frequent cache evictions, causing cold prefill recomputations that inflate mean TTFT to 1,842 ms.

Naive full duplicate caching reduces mean TTFT to 812 ms, but incurs catastrophic flash wear (68.4 TB/day) and severe P99 latency spikes (2,680 ms) due to unpaced PCIe contention.

SARIA eliminates 58.9% of SSD writes (dropping write volume to 28.1 TB/day), cuts mean TTFT down to 374 ms (a $79.7%$ reduction relative to DRAM-only caching), and squashes P99 latency down to 542 ms.

+----------------------------------------------------------------------------------------------------+
|                TABLE 2: MULTI-TURN AGENT PROGRESSION AND CACHE HIT RATIOS                          |
+--------------------------+-----------------------+------------------------+------------------------+
| Agent Turn Number        | DRAM Hit Rate         | SSD Hit Rate           | Cold Prefill Rate      |
+--------------------------+-----------------------+------------------------+------------------------+
| Turn 1 (Initial Prompt)  | 14.2% (System Prompt) | 0.0%                   | 85.8% (Cold Read)      |
| Turn 2 (First Feedback)  | 18.4%                 | 74.8% (SSD Hit)        | 6.8%                   |
| Turn 3 to Turn 15 (SARIA)| 92.6% (Promoted Hit!) | 5.2%                   | 2.2%                   |
+--------------------------+-----------------------+------------------------+------------------------+

Because SARIA promotes SSD-hit blocks into host DRAM during Turn 2's prefill compute, agent turns 3 through 15 achieve an outstanding 92.6% DRAM hit rate, delivering near-instantaneous token generation.


Architectural Dilemmas and Infrastructure Rules of Thumb

Deploying SARIA in mission-critical agent infrastructure involves subtle systems design trade-offs:

  1. The Admission Threshold vs Flash Budget Tuning: Setting the admission threshold too aggressively (Athresh>3.0A_{\text{thresh}} > 3.0) prevents premature SSD wear but drops valuable multi-turn prefixes, increasing compute re-prefill costs on the GPU.
    • Rule of Thumb: Profile the server's workload to determine the average session inter-turn pause time Δtturn\Delta t_{\text{turn}}. Set the admission threshold dynamically such that daily SSD writes target exactly 0.75 DWPD, reserving 25% endurance headroom for unexpected traffic surges.
  2. io_uring Worker Thread Allocation: Asynchronous Direct I/O over NVMe storage requires dedicated kernel submission queues (io_uring). Allocating too many submission threads creates CPU core contention against inference serving schedulers.
    • Rule of Thumb: Pin exactly two io_uring polling worker threads per NVMe drive to isolated NUMA CPU cores. Never share submission worker cores with the primary inference token dispatch loop.
  3. PCIe Ingress Headroom Reservation: Under heavy multi-modal or vision-language agent workflows, image and embedding uploads consume inbound PCIe bandwidth.
    • Rule of Thumb: Cap total coordinated KV reload bandwidth at 70% of peak PCIe Gen5 host-to-device capacity (approx. 45 GB/s on x16 lanes). Reserve the remaining 30% to prevent packet drops and latency degradation on real-time client input streams.

Sources