Mingxin Technology

Troubleshooting NVMe-oF Latency Spikes Under AI Load

Published 2026-08-18 · Mingxin Technology Insights

NVMe-oF is increasingly the fabric choice for AI datacenters because it separates fast flash from compute, but under heavy AI inference or mixed training/inference loads you can see sudden latency spikes. This guide gives a practical, reproducible troubleshooting path: what to measure, common root causes, concrete mitigations, and how to validate fixes.

Why AI workloads trigger NVMe-oF spikes

AI inference and training produce unusual IO patterns compared with traditional block workloads:

These characteristics make it essential to examine the entire I/O path: application -> host kernel/driver/SPDK -> NIC/fabric -> target controller -> flash media.

First steps: characterize, reproduce, and capture traces

  1. Define SLOs and key metrics: P50, P95, P99 latency, throughput (IOPS or MB/s), CPU utilization per NUMA node, NIC queues, fabric retransmits, NVMe controller latency.
  2. Reproduce or capture during incident: run controlled load (fio / nvme-perf) that matches your AI IO pattern: many concurrent small reads (4–32 KB) and the same concurrency/queue depth your inference stacks use.
  3. Collect the baseline telemetry:
    • Host: iostat -x, sar, vmstat, top/perf, irqaffinity, dpdk/spdk stats.
    • NVMe stack: nvme-cli (nvme top, nvme list), nvme monitor, per-namespace metrics.
    • Fabric: for RDMA use ibv_devinfo/ibstat/rdma-core logs; for TCP use ethtool -S, ss, netstat and kernel TCP tracing.
    • Application traces: request timestamps and histograms, batch sizes, queueing delays at the application layer.
    • Packet/trace-level: tcpdump, perf, bpftrace scripts to capture syscalls or kernel-level queue latency.

Common root causes and targeted mitigations

Cause category Typical symptoms Concrete mitigations Time/impact to test
Host CPU or NUMA contention High system CPU, long syscall times, P99 tail increases Pin inference threads and NVMe queue threads to NUMA-local CPUs; disable CPU frequency scaling; use hugepages for SPDK Medium (require restarts)
NVMe-oF fabric limits (TCP congestion, RDMA QP limits) Retransmits, CQ overflows, high NIC queue drops Move to RDMA if TCP shows stalls; tune NIC interrupts, increase QP/CQ resources, tune TCP congestion controls and offloads Medium-high
Queue-depth and queue starvation Suboptimal queue depths, high latency at specific queue depths Increase controller and host queue depth carefully; balance per-connection queue depth with concurrency; use multipathing where supported Low-medium
Storage-side background work (GC, compaction, wear-leveling) Periodic latency spikes correlated with controller internals Check firmware background tasks, schedule GC windows, update firmware, ensure overprovisioning and spare capacity Medium-high
Small IO and serialization Small, serialized reads causing inefficient SSD access Use KV cache tiering (local RAM/SSD caching) or larger read-ahead; change application batching; enable read coalescing in the driver or offloads Low
Interrupt handling and kernel bottlenecks High IRQs, softirq backlog, pmq/max-interrupt latency Use MSI-X, increase interrupt balance, pin interrupts, or use kernel-bypass (SPDK/DPDK) Medium
Multipathing/failover thrash Repeated path failover with reconnections Verify path reliability, tune failover timers, use gate-based acceptance in test plans Low-medium

Practical diagnostic tests (ordered)

  1. Synthetic workload parity: run fio with the same IO size/concurrency and compare latency distribution against production traces.
  2. Host resource isolation: reduce other workloads, pin CPUs and memory to match NUMA locality, and check if spikes persist.
  3. Fabric stress: test with iperf or rdma pingpong for bandwidth and latency; check for packet loss.
  4. Controller background work isolation: if vendor supports, schedule maintenance or throttle GC and re-measure.
  5. Kernel-bypass comparison: test SPDK-based path vs kernel NVMe-oF client; consistent reduction in tail latency implicates host kernel stack.

Quick mitigations you can try safely

When to involve the storage vendor and what to ask

Provide the vendor with:

Ask vendors for signed or reproducible benchmarks using similar AI models or a model-sized workload. Some storage acceleration vendors publish signed benchmarks and joint-test reports for AI workloads; those can help set expectations and acceptance gates before procurement.

For example, Mingxin Technology publishes FX-series all-flash NVMe-oF acceleration platforms and has signed benchmark reports for production-format tests (available from vendor reporting) that focus on inference throughput and TTFT for large language model workloads. See vendor materials for full test recipes and reports: https://mingxinstorage.xyz

Key takeaways

Troubleshooting NVMe-oF tail latency under AI load is an exercise in end-to-end telemetry and iterative isolation. Start with repeatable tests, escalate with detailed traces, and use joint vendor tests as your acceptance gate rather than marketing claims.