Breaking Down the Three Modules of LLM Inference Engines and Their Performance Limits
This article splits an LLM inference engine into three planes: control, execution, and data. For each plane, it explains how the design affects throughput, latency, and cost per unit of service, which optimizations apply, and which checks help teams find real bottlenecks and estimate how far they remain from theoretical limits.
After an LLM goes live, the throughput and latency of its inference engine directly affect service quality and cost per unit. Operator optimization, parallelism strategies, and memory management all keep advancing, but teams often do not know how far they are from the theoretical limit. Viewing the inference framework through three planes, the control plane, the execution plane, and the data plane, makes the problem much clearer.
1. Control Plane: Keeping GPUs Focused on Forward Computation
The control plane manages the full lifecycle of each request. This covers preprocessing, such as tokenization, image or video download and encoding in multimodal scenarios, and API protocol conversion. It also covers postprocessing, such as detokenization and grammar constraints, and request scheduling based on SLAs.
Its primary goal is to keep GPUs dedicated to pure computation. If CPU-side tasks interleave with Forward computation, GPUs sit idle while waiting for data. A practical approach is to build a separate preprocessing pipeline. This decouples data preparation from model computation, so only pure Forward computation reaches the GPU cluster.
For load balancing, the scheduler must consider context length, expected output length, node health, and GPU memory utilization. When long and short requests are mixed, one GPU can stay queued for a long time. Dynamic routing based on estimated cost helps. Monitoring and alerting from a cloud-native container platform can also adjust dispatch policies in real time.
When implementing this, check the following:
- The share of end-to-end latency spent on CPU preprocessing.
- Idle gaps in the GPU utilization curve.
- Queueing time across request buckets, grouped by request length.
A reasonable target for the control plane is to bring the visible latency of preprocessing close to zero and make dispatch results close to globally optimal. Because the output length of a request is unknown in advance, perfect optimality is usually out of reach.
2. Execution Plane: Overlapping Computation with Communication
The execution plane works directly with GPU hardware and runs the Forward pass efficiently. In tensor parallel or pipeline parallel setups, collective communication such as All-Reduce often becomes the bottleneck. A common approach is to use asynchronous communication so that data transfer overlaps with the surrounding compute operators. Multi-stream allocation and event synchronization can then hide network latency.
Fused kernels and graph capture reduce kernel launch overhead. Fusing several fine-grained operators into larger kernels reduces the round trips of data between GPU memory and registers. Graph capture techniques, such as CUDA Graph, batch the launch of a sequence of kernels, which lowers scheduling overhead on the CPU side.
The execution plane mainly optimizes time to first token (TTFT) and overall throughput, and these two metrics often constrain each other. For a given Chunk Size and concurrency level, teams can find a balance point on the Pareto frontier between them. The theoretical limit depends on hardware compute power and memory bandwidth, and it is difficult to get close to in practice.
When implementing this, check the following:
- Use a profiler to confirm that communication and computation truly overlap, rather than assuming that asynchronous calls in the code produce overlap.
- Measure the duration and gaps of kernel launches at each step.
- Verify that graph capture works with dynamic shapes. When there are many dynamic branches, capture separate graphs for each shape bucket.
- Sweep Chunk Size under the target workload, record how TTFT and throughput change, and identify the inflection point.
3. Data Plane: Storage and Routing of KV Cache
The data plane handles where KV Cache is stored, how it is moved, and how it is reused. The GPU memory used by KV Cache grows roughly linearly with context length. The size of the cache for a single token depends on the number of layers, the number of KV heads, the head dimension, and the data precision. Total memory also grows with the number of concurrent requests and the average context length. As a result, the concurrency limit of a system is often determined by KV Cache capacity.
Tiered storage is a common way to scale. Idle KV Cache can be offloaded to CPU memory, object storage, or high-performance file storage. The table below compares the three storage tiers. Exact values vary by hardware and deployment.
| Storage Tier | Capacity | Access Latency | Bandwidth | Typical Use Case | Main Risk |
|---|---|---|---|---|---|
| GPU memory | Smallest | Lowest | Highest | Hot data for active sessions | Limited capacity, prone to eviction |
| CPU memory | Medium | Relatively low, requires PCIe transfer | Limited by PCIe bandwidth | Warm data for recent sessions | Competes with other processes for memory bandwidth |
| Object or file storage | Largest | Highest, may cross the network | Limited by network bandwidth | Long-term persistence and reuse across instances | Large tail latency, strongly affected by network jitter |
Asynchronous reads and writes, along with prefetching, are the second goal of the data plane. Ideally, KV Cache loading and eviction happen in the background and stay off the critical path of Forward. The core idea is to use the time of model execution to hide the time of data prefetching.
An idealized model can estimate the upper bound of this gain. Assume that without caching, the baseline Prefill throughput is X. If cache-hit tokens add no transfer cost, use no compute resources, and do not interfere with model execution, only the uncached portion needs computation. Throughput then scales inversely with the miss ratio. At a 95% hit rate, the theoretical throughput is about X / (1 - 95%) = 20X.
This result depends on several conditions. Transfer cost for hit tokens must be zero. Prefetching must be fully hidden behind computation. Bandwidth contention and lock contention must not occur. The computation cost of uncached tokens must match the baseline. The figure represents an ideal upper bound, not a general performance guarantee. In practice, prefetch scheduling delays, PCIe or network bandwidth contention, and lock contention during cache replacement all break this perfect overlap.
Failed prefetches, bandwidth contention, and lock contention also increase tail latency. Monitor KV Cache hit rate, prefetch hit latency, and GPU memory utilization together. If any of these three metrics worsens, investigate the data plane first.
4. Coordination Across Planes and Future Direction
The three planes affect each other. The control plane reduces input and output waiting, the execution plane raises hardware utilization, and the data plane reduces repeated computation through cache reuse. Optimizing only one plane usually yields limited overall gains. For example, a faster execution plane will not raise end-to-end throughput if the control plane leaves GPUs idle.
Future inference engines may evolve in areas such as elastic scaling, hardware-software co-design, and automatic scheduling across storage tiers. They may also rely more deeply on cloud-native infrastructure.
Overall, the optimization ceiling of an inference engine is set by both hardware and workload. Each plane, however, has goals that can be quantified. Start by measuring the actual bottleneck in each module, then verify each item in the checklists above. This approach is more reliable than repeatedly tuning parameters by intuition.
