Demystifying Cost-Efficiency in LLM Serving over Heterogeneous GPUs

Youhe Jiang, Fangcheng Fu, Xiaozhe Yao, Guoliang He, Xupeng Miao, Ana Klimovic, Bin Cui, Binhang Yuan, Eiko Yoneki

TL;DR

This paper demonstrates that serving Large Language Models (LLMs) on clusters of mixed (heterogeneous) GPUs is significantly more cost-efficient than using standard homogeneous setups. By intelligently matching diverse request types to the specific compute and memory strengths of different GPU architectures, the authors' novel scheduling framework achieves up to 41% higher throughput and 54% lower latency within the same budget.

What Problem Does This Paper Address?

Serving LLMs is notoriously expensive, primarily because standard practices rely on homogeneous GPU clusters (e.g., all NVIDIA H100s). However, LLM workloads are inherently "heterogeneous": some requests have long prompts (compute-intensive prefill phase), while others generate long responses (memory-intensive decoding phase).

Figure 1: The real-world workload traces from the Swiss AI Center comprise over 500,000 traces collected over one month. We categorize the workload types based on input and output token lengths (longer than 512 and 128 are char- acterized as long).

Using a single GPU type for all these tasks is inefficient. A high-end data center GPU might be overkill for simple decoding, while a cheaper card might struggle with heavy prefilling. Furthermore, cloud GPU availability is often spotty—you can't always get twenty H100s when you need them. This paper tackles how to build and manage a cost-effective serving system using whatever mix of GPUs is available on the cloud.

Methods

The authors propose a three-pronged optimization strategy:

  1. GPU Composition: Deciding which types and how many GPUs to rent based on real-time cloud availability and a fixed budget.
  2. Deployment Configuration: Determining the best parallelism strategy (Tensor, Pipeline, and Data Parallelism) for each model replica on the chosen hardware.
  3. Workload Assignment: Intelligently routing specific types of incoming requests to the most suitable GPU replicas.

To solve this complex joint optimization problem, they formulated it as a Mixed-Integer Linear Programming (MILP) model. Because MILP can be slow for large clusters, they introduced a binary-search-on-T (makespan) approach to quickly find the most efficient serving plan. They also incorporated practical heuristics, such as pruning "dominated" configurations that are clearly inefficient, to further speed up the solver.

Datasets

The study uses a diverse set of real-world and synthetic workload traces:

  • Swiss AI Center Traces: Over 500,000 traces collected over one month.
  • Azure-Trace: Production traces from Microsoft Azure.
  • WildGPT & ShareGPT: Publicly available datasets of LLM interactions.
  • Models: Evaluation was performed using Llama3-8B and Llama3-70B.

Key Insights and Ideas

  • Hardware-Workload Matching: Data center GPUs (H100, A100) are compute powerhouses, making them ideal for long-input "prefill" tasks. Conversely, workstation GPUs (L40, A6000) offer significantly better memory bandwidth and capacity per dollar, making them the cost-efficiency champions for long-output "decoding" tasks.
  • The Consumer GPU Surprise: For smaller models like Llama3-8B, consumer-grade GPUs like the RTX 4090 provide excellent performance-per-dollar, often outperforming high-end enterprise cards in throughput-per-unit-cost.
  • Co-optimization is Mandatory: Optimizing just the hardware or just the routing isn't enough. The "aha moment" is that the best results come from simultaneously deciding what to rent, how to configure the software, and how to route the traffic.
Figure 3: Benchmarked results for Llama3-70B model with different GPU types on different workload types. The left three columns represent the throughput results, x-axis represents different GPU types, y-axis represents throughput per unit price (i.e., throughput divided by GPU cost). The right three columns represent the latency results, x-axis represents the P5-100 latency results (P5-P100 Latencies means from left to right, the x sticks represent P5 Latency, P10 Latency, P15 Latency . . . ), y-axis represents total price (i.e., each latency time multiplied by GPU cost). Results for Llama3-8B model are demonstrated in Appendix A.

Key Results

  • Throughput Gains: Compared to homogeneous baselines, the proposed approach achieved up to 41% higher throughput (20% on average) for the same price budget.
  • Latency Reduction: The framework reduced serving latency by up to 54% (20% on average).
  • Outperforming State-of-the-Art: The system consistently beat existing heterogeneous serving frameworks like HexGen (by up to 18%) and Helix (by 25-35%) because it explicitly accounts for workload diversity and GPU composition.
  • Scalability: The binary search optimization reduced search time by approximately 4x with less than 1% deviation from the optimal MILP solution.

Limitations and Future Work

  • Profiling Overhead: The method relies on one-time profiling of models on different hardware. While standard, this can be time-consuming for a vast array of new models.
  • Static Planning: The core algorithm assumes a relatively stable workload distribution and GPU availability during the planning phase. While the authors discuss "online replanning" for dynamic shifts, a fully integrated real-time dynamic scheduler remains a future direction.
  • Inter-node Communication: While the authors consider connectivity, the impact of varying network topologies in highly decentralized heterogeneous environments could be explored further.

Summary updated

BibTeX
@inproceedings{jiang2025demystifying,
  author = {Youhe Jiang and Fangcheng Fu and Xiaozhe Yao and Guoliang He and Xupeng Miao and Ana Klimovic and Bin Cui and Binhang Yuan and Eiko Yoneki},
  title = {{Demystifying Cost-Efficiency in LLM Serving over Heterogeneous GPUs}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=xnEv5pq4cB},
}
Figure