LLM-Mesh: Enabling Elastic Sharing for Serverless LLM Inference

Chuhao Xu, Zijun Li, Quan Chen, Han Zhao, Minyi GuoarXiv 2025 · DOI

Introduction

As Large Language Models (LLMs) become central to modern applications, the demand for efficient serverless inference has skyrocketed. However, the current paradigm for deploying these models is surprisingly rigid. Most existing serverless platforms adhere to a policy of exclusive GPU allocation: when a request arrives, a model is loaded onto a dedicated GPU, which remains locked to that specific model for the duration of its residency.

This approach, while simple, creates a massive mismatch between resource allocation and real-world usage patterns. LLM-Mesh (introduced as SLINFER) addresses this inefficiency by moving away from exclusive allocation toward a system of on-demand, elastic sharing across heterogeneous hardware, including both CPUs and GPUs.

The Mismatch in Serverless Inference

The authors identify three critical factors that make exclusive allocation unsustainable for small-to-mid-sized models:

  1. Model Size Disparity: Approximately 87% of models downloaded from HuggingFace have fewer than 8 billion parameters. These models do not saturate the compute or memory capacity of high-end accelerators like the NVIDIA A100, leading to significant resource waste.
  2. Bursty Traffic Patterns: Serverless workloads are characterized by infrequent and unpredictable bursts. Many private or specialized models receive fewer than five requests per hour, yet they often occupy expensive GPU memory while idling.
  3. Resource Scarcity: While GPUs are scarce and costly, modern data centers are populated with CPUs equipped with advanced matrix accelerators (such as Intel’s AMX) that often sit underutilized.
Figure 4: The long-tail distribution of model popularity, where most models receive very few requests per hour.

When a whole GPU is locked for an infrequently used model, the result is "fragmentation"—low average utilization (often around 23%) paired with long request queues for other models waiting for hardware to become available.

The LLM-Mesh Architecture

LLM-Mesh introduces a resource-efficient inference system designed to maximize serving capacity through three core subsystems:

Headroom-Driven Compute Subsystem

Traditional schedulers operate at the request level, but LLM-Mesh schedules at the token level. It introduces a "headroom" metric: the maximum time a request can delay its next token generation without violating its Service Level Objective (SLO). By prioritizing tasks with the shortest headroom, the system can interleave requests from different models across the same hardware with microsecond precision.

Hazard-Aware Memory Subsystem

Managing the KV-cache—the memory that stores the context of an ongoing conversation—is a primary challenge in shared environments. Resizing these caches frequently incurs high overhead. LLM-Mesh employs a "watermark" strategy, scaling memory up early to accommodate anticipated bursts and scaling down lazily to avoid re-allocation costs. Furthermore, it uses "shadow validation" to simulate whether admitting a new request will trigger an Out-of-Memory (OOM) error before the request is actually processed.

Figure 1: Resource demand timeline and memory fragmentation issues in traditional nodes vs. the elastic sharing approach.

Efficiency-Oriented Consolidator

To prevent model instances from being scattered inefficiently across the cluster, LLM-Mesh utilizes proactive preemption. The system can preempt a small, isolated instance of a model to allow a larger, more efficient batch-processing instance of that same model to consolidate on a single node, reducing communication overhead and improving throughput.

Evaluation and Key Insights

The researchers evaluated LLM-Mesh using real-world traces from Azure and LMSYS-Chat-1M, testing it against standard benchmarks like ShareGPT and LongBench.

One of the most significant findings is the viability of CPUs as first-class LLM hosts. Modern CPUs (4th Gen Intel Xeon and newer) proved capable of meeting production-grade SLOs for 7B and 13B models, particularly for shorter input sequences. By treating CPUs as primary compute resources rather than just fallbacks, LLM-Mesh significantly expands the available serving pool.

Key results from a cluster of 32-core CPUs and A100 GPUs include:

  • Capacity Gains: Elastic sharing alone improved serving capacity by 47% to 62%.
  • Heterogeneous Integration: When leveraging idle CPUs, the capacity boost jumped to between 86% and 154%.
  • Throughput and SLOs: The system achieved a 74% higher average batch size than baselines like ServerlessLLM and maintained high SLO attainment even when scaling to 128 concurrent models.

Conclusion

LLM-Mesh demonstrates that the path to scalable serverless AI lies in dynamic, elastic sharing rather than static partitioning. By quantifying urgency through the headroom metric and managing memory hazards proactively, the system transforms underutilized hardware into a high-performance inference mesh. While the current design is optimized for models up to ~13B parameters, it provides a blueprint for the next generation of resource-efficient AI infrastructure.

Summary updated

BibTeX
@misc{xu2025llm,
  author = {Chuhao Xu and Zijun Li and Quan Chen and Han Zhao and Minyi Guo},
  title = {{LLM-Mesh: Enabling Elastic Sharing for Serverless LLM Inference}},
  year = {2025},
  eprint = {2507.00507},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.00507},
}
Figure