Local LLM Deployment: Hardware Selection and PCIe Link Evaluation
When deploying large language models locally, a PCIe link that reads Gen1 at idle is usually just power management, not a hardware fault. This article explains how to correctly evaluate PCIe link speed under load, whether Gen3 x16 bandwidth is sufficient for LLM inference, and how to choose hardware—VRAM capacity, memory bandwidth, system RAM, storage, PCIe lanes, and power/cooling—for local model deployment, along with a structured troubleshooting workflow.
1. Starting from a Link Speed Anomaly
When deploying large models locally, many people start by checking the GPU’s PCIe link status. A common situation: the reported speed at idle is Gen1, i.e., 2.5 GT/s, which looks like a slot or cable problem. The most immediate instinct is to pull the card out and reseat it.
But this step is usually unnecessary. The PCIe link deliberately downshifts at idle as a power-saving mechanism executed jointly by the motherboard and the GPU. Once the GPU enters a loaded state, the link retrains to a higher speed—typically Gen3 x16, i.e., 8 GT/s across 16 lanes. Therefore, whether a link is healthy must be judged under load, not at idle.
This judgment standard can be summarized as one principle: measure the link state under load, then evaluate whether the bandwidth meets your needs.
2. Why the PCIe Link Downshifts at Idle
2.1 Link Training and Speed Negotiation
After a PCIe device powers on, the two ends perform Link Training to negotiate the available speed and lane width. The speed generation determines per-lane transfer rate, and the lane width determines how many lanes run in parallel. The negotiated result depends on the highest capability supported by both ends and current physical conditions.
2.2 Dynamic Power Management
To reduce power consumption, motherboards and devices support link-state power management and dynamic speed adjustment. At idle, the link can drop to a lower speed or even enter a low-power state. When data requests arrive, the link quickly recovers. These mechanisms are common on both consumer and server platforms.
So a low speed reading at idle only indicates the device is in a low-power state; it does not prove any hardware problem.
2.3 The Correct Way to Observe
On Unix-like systems, the kernel exposes device attributes under the /sys directory. The bus address (BDF) can be queried using the operating system’s device enumeration commands. For example:
cat /sys/bus/pci/devices/0000:01:00.0/max_link_speedcat /sys/bus/pci/devices/0000:01:00.0/max_link_widthcat /sys/bus/pci/devices/0000:01:00.0/current_link_speedcat /sys/bus/pci/devices/0000:01:00.0/current_link_width
Here, max_link_* indicates the hardware capability ceiling, while current_link_* indicates the current state. When judging, read current_link_* while model inference or a stress test is running, and compare it against max_link_*.
The judgment logic can be expressed as the following illustrative code:
def check_link_under_load(read_speed, read_width, run_load):run_load() # Put the GPU under load firstspeed = read_speed() # e.g., "8 GT/s"width = read_width() # e.g., 16if speed == "8 GT/s" and width == 16:return "Link OK: Gen3 x16"return "Further investigation needed: check slot, cable, BIOS settings, or lane allocation"
3. Is Gen3 x16 Bandwidth Enough?
3.1 Converting for Encoding Overhead
PCIe 3.0 runs at 8 GT/s per lane using 128b/130b encoding, meaning 128 of every 130 bits are payload data. The effective data rate works out as follows:
- Effective per-lane rate: 8 × (128/130) ÷ 8 ≈ 0.985 GB/s
- Effective x16 one-way bandwidth: 0.985 × 16 ≈ 15.75 GB/s
PCIe 1.x uses 8b/10b encoding. At Gen1, each lane runs at 2.5 GT/s, giving an effective rate of 2.5 × 0.8 ÷ 8 = 0.25 GB/s, or about 4 GB/s one-way at x16. This shows that Gen1 is the speed of a power-saving state, far below full-load capability.
gt_per_s = 8efficiency = 128 / 130 # 128b/130b encoding efficiencyper_lane = gt_per_s * efficiency / 8 # Effective per-lane bandwidth in GB/sx16 = per_lane * 16 # Effective x16 one-way bandwidthprint(round(per_lane, 3), round(x16, 2)) # 0.985 15.75
3.2 Theoretical vs. Actual Values
The numbers above are protocol-layer theoretical maximums. Actual transfers must also account for packet headers, flow control, software scheduling, and other overhead, so real-world throughput typically falls below the theoretical value. When evaluating, leave headroom rather than treating theoretical bandwidth as usable bandwidth.
3.3 Whether Bandwidth Becomes the Bottleneck
Whether PCIe bandwidth is sufficient depends on how frequently data crosses the PCIe bus. In LLM inference, common data flows include:
- Model weights are moved from storage to system memory, then to VRAM during the loading phase.
- Once weights reside in VRAM, computation during inference happens mostly within VRAM.
- With layer-wise loading or offloading strategies, some weights or intermediate results are repeatedly moved between VRAM and system memory, in which case PCIe bandwidth matters significantly more.
- For Mixture-of-Experts (MoE) models, if not all expert weights reside in VRAM, routing to different experts can trigger data transfers each time.
In these scenarios, the common bottlenecks are usually VRAM bandwidth and system memory bandwidth, not the PCIe link itself. VRAM bandwidth is typically far higher than the ~15.75 GB/s one-way bandwidth of PCIe x16, so as long as the model mainly resides in VRAM, PCIe is generally not the limiting factor.
4. Hardware Selection for Local Deployment
4.1 VRAM Capacity First
VRAM capacity determines whether the model can be loaded in full. Take a 7-billion-parameter model as an example: stored in 16-bit floating point, the weights occupy roughly 7B × 2 bytes ≈ 14 GB, with additional VRAM needed for activations, the KV cache, and runtime overhead. VRAM capacity is therefore usually the primary selection criterion.
4.2 VRAM Bandwidth
VRAM bandwidth affects throughput during generation. At the same VRAM capacity, a GPU with higher bandwidth typically generates faster. Compare capacity and bandwidth together when selecting hardware—don’t look at a single metric.
4.3 System Memory
System memory is used for model loading, data preprocessing, layer-wise offloading, and multi-process serving. Memory capacity should be significantly larger than the model file size, with headroom for the operating system and other services. If frequent offloading is needed, both memory bandwidth and capacity affect overall efficiency.
4.4 Storage
Model files are usually large, and loading speed affects first-startup time. High-speed solid-state storage shortens loading time and reduces waiting caused by slow reads.
4.5 PCIe Lanes and Multi-GPU Deployment
For multi-GPU setups, confirm how many PCIe lanes the motherboard and processor provide. When multiple GPUs operate simultaneously, lanes may be allocated at x8 or narrower widths. In that case, check each card’s actual link width under load, and evaluate against communication requirements whether to adjust slot placement or the parallelism strategy.
4.6 Power Supply and Cooling
Under heavy load, GPU power draw approaches full capacity. The power supply needs sufficient headroom and stable connectors. Inadequate cooling causes thermal throttling and performance loss—symptoms similar to link problems—so it must be considered during troubleshooting as well.
5. Troubleshooting Workflow
Follow this order to avoid replacing hardware prematurely:
- Record the link speed at idle as a baseline.
- Start inference or a stress test, and read
current_link_*once the load stabilizes. - If the link reaches its maximum speed and width under load, the physical link is healthy.
- If it is still below expectations under load, check power-saving and link settings in the BIOS, whether the slot is the primary lane, and whether cables and adapters are reliable.
- Meanwhile, monitor VRAM usage, VRAM bandwidth utilization, memory usage, and temperature to locate the real bottleneck.
- Only after ruling out software and hardware configuration issues should you consider changing the slot or the hardware.
6. Conclusion
When deploying large models locally, a lower PCIe link speed at idle is common power-saving behavior and should be judged under load. Gen3 x16 provides roughly 15.75 GB/s of effective one-way bandwidth, which is usually sufficient for inference scenarios where the model mainly resides in VRAM. Hardware selection should prioritize VRAM capacity, then balance VRAM bandwidth, system memory, storage, and power/cooling. When performance problems arise, use data to confirm where the bottleneck is before deciding whether to adjust the hardware.
