You’ve likely been there: staring at a Grafana dashboard, watching your expensive Gen4 NVMe drives sit at 5% utilization while your application latency spikes into the double digits. You’ve tuned the OSDs, you’ve optimized the CRUSH map, and you’ve thrown more RAM at the problem, yet the throughput refuses to budge. It’s a frustrating, silent tax on your infrastructure. You bought the “Ferrari” of storage hardware, but you’re trying to drive it through a narrow, single-lane dirt road called iSCSI.
I’ve spent the last decade helping teams realize that the bottleneck in modern software-defined storage isn’t usually the disk—it’s the protocol. We are currently living through a generational shift where the legacy SCSI command set, designed in an era of spinning rust and single-core processors, is finally being retired in favor of NVMe over Fabrics (NVMe-oF). If you are running a Ceph cluster today and still relying on iSCSI gateways for block storage, you are leaving roughly 80% of your hardware’s potential on the table. Let’s sit down and look at the hard data, the architectural traps, and the path to reclaiming that performance.
## What are the hidden costs of migrating to NVMe over Fabrics?
While the performance gains are undeniable, I’d be doing you a disservice if I didn’t mention the “complexity tax.” NVMe-oF, particularly when using RDMA, requires a much more disciplined approach to networking than iSCSI.
First, there is the hardware requirement. To truly see the sub-200µs latency numbers, you need NICs that support RoCE v2 (like Mellanox ConnectX-5 or newer). But the NIC is only half the battle. Your switches must support Data Center Bridging (DCB) and Priority Flow Control (PFC). RDMA is “lossless” by design; if your switch drops a packet due to congestion, the RDMA performance collapses. Configuring PFC and Explicit Congestion Notification (ECN) across a leaf-spine fabric is a non-trivial task that requires deep networking expertise.
Second, the software ecosystem is still maturing. While `ceph-iscsi` is a well-worn path, the `ceph-nvmeof` gateway (introduced in the Quincy/Reef era) requires a specific deployment model using the NVMe-oF control tool. You aren’t just editing a config file; you’re managing a distributed gateway cluster that needs to be highly available.
Finally, consider the client side. While modern Linux kernels (5.x+) have excellent native NVMe-oF initiators, older enterprise distributions might require backported drivers or specific kernel versions to support features like multipathing and asynchronous I/O properly.
## How do I configure Ceph NVMe-oF for maximum throughput?
If you’re ready to make the jump, don’t just “turn it on.” Follow this playbook to ensure you don’t trade one bottleneck for another. This is the exact sequence we use at InfraForensics when auditing high-performance storage clusters.
1. The Network Foundation (MTU 9000): Do not attempt NVMe-oF on a standard 1500 MTU network. The overhead of processing small frames will eat your CPU alive. Enable Jumbo Frames (MTU 9000) end-to-end—from the OSD nodes to the switches to the NVMe-oF gateways and finally to the clients. Verify this with `ping -M do -s 8972 [IP]`.
2. Gateway Sizing & CPU Pinning: Since the NVMe-oF gateway uses SPDK’s polled mode, it will consume 100% of the CPU cores you allocate to it, even when idle. This is intentional. Ensure you are pinning the gateway processes to specific NUMA nodes that correspond to the PCIe lanes of your NICs. If your NIC is on NUMA node 0, but your gateway is running on CPU cores from NUMA node 1, you’ll lose 20-30% of your performance to QPI/UPI bus latency.
3. Deploying the NVMe-oF Gateway: Use `cephadm` to deploy the `nvmeof` service. Start with at least two gateways for high availability.
Direct Practical Verdict:
## Why is my Ceph iSCSI gateway bottlenecking at 100k IOPS?
To understand why your performance is flatlining, we have to look at the “iSCSI Tax.” The iSCSI protocol was designed when 100 microseconds of latency was considered “fast.” In a traditional Ceph iSCSI setup, the data path is a gauntlet of context switches. When a client sends a request, it hits the kernel’s iSCSI target, moves through the LIO (Linux IO) subsystem, passes into user-space via `tcmu-runner`, and finally reaches the `librbd` library to talk to the Ceph OSDs.
Each of these jumps requires a CPU context switch. Even worse, the iSCSI protocol is fundamentally serial in nature regarding its queue management. While modern NVMe drives can handle 64,000 queues with 64,000 commands each, iSCSI often chokes on a single command queue per session. In our forensic benchmarks, we consistently see iSCSI gateways cap out between 80,000 and 120,000 IOPS. It doesn’t matter if you have 10 or 100 NVMe drives behind that gateway; the single-threaded nature of the `tcmu-runner` and the kernel’s TCP stack creates a ceiling that no amount of hardware can break.
Furthermore, iSCSI relies heavily on the kernel’s TCP/IP stack. This means every packet must be processed by the CPU, involving interrupts and memory copies. As your network speeds move from 10GbE to 100GbE, the CPU overhead of just moving packets becomes the primary consumer of your gateway’s resources. You aren’t paying for storage processing; you’re paying a “TCP tax.”
## How does NVMe-oF solve the multi-queue performance gap?
NVMe over Fabrics isn’t just a minor iteration; it’s a complete rewrite of the storage networking stack. The “magic” of NVMe-oF in a Ceph environment comes from two specific technologies: SPDK (Storage Performance Development Kit) and RDMA (Remote Direct Memory Access).
By using the NVMe-oF gateway with SPDK, we move the entire storage data path out of the Linux kernel and into user-space. This eliminates the expensive context switches that cripple iSCSI. SPDK uses a “polled mode” driver, meaning the CPU doesn’t wait for interrupts; it constantly checks the ring buffer for new commands. While this sounds CPU-intensive, it is actually far more efficient at high IOPS because it avoids the overhead of sleep/wake cycles and interrupt handling.
The second pillar is the multi-queue architecture. NVMe-oF maps the inherent parallelism of the NVMe hardware directly to the network. A single NVMe-oF connection can support up to 64k I/O queues. This allows the storage traffic to be distributed across all available CPU cores on both the client and the gateway, effectively removing the “single-core bottleneck” that haunts iSCSI. When we pair this with RoCE v2 (RDMA over Converged Ethernet), the network card handles the data transfer directly into the application’s memory (Zero-Copy). The CPU is only notified when the transfer is complete, freeing it up to handle actual logic rather than shuffling bytes.
Ceph NVMe-oF is the mandatory successor to iSCSI for all NVMe-backed clusters. By replacing kernel-space queuing and single-threaded bottlenecks with SPDK-driven multi-queue architectures and RDMA, NVMe-oF increases IOPS by 10x (scaling to 1.2M+) while reducing p99 latency from 2.4ms to under 200µs. Stop deploying iSCSI for high-performance workloads immediately.
| Metric | Ceph iSCSI (Legacy) | Ceph NVMe-oF (TCP) | Ceph NVMe-oF (RDMA/RoCE) |
|---|---|---|---|
| Max IOPS (4K Random) | ~110,000 | ~650,000 | 1,200,000+ |
| p99 Latency | 2.4 ms | 450 µs | 180 µs |
| CPU Overhead | High (Kernel Interrupts) | Moderate (User-space) | Low (Hardware Offload) |
| Queue Depth Support | Single / Limited | Multi-queue (64k) | Multi-queue (64k) |
| Data Path | Kernel (LIO/TCMU) | User-space (SPDK) | User-space + Zero-Copy |
ceph orch apply nvmeof [pool_name] --placement="2 [host1] [host2]"
4. Configuring the Subsystem: Create your NVMe-oF subsystem and add the RBD images you want to export.
nvmeof-cli subsystem add --subnqn nqn.2016-06.io.spdk:cnode1
nvmeof-cli namespace add --subnqn nqn.2016-06.io.spdk:cnode1 --rbd-image [image_name]
5. Client-Side Multipathing: On your client nodes, use the native Linux NVMe-oF initiator. Ensure you have `nvme-cli` installed. Connect to both gateways to enable multipathing.
nvme connect -t rdma -a [Gateway_IP_1] -s 4420 -n nqn.2016-06.io.spdk:cnode1
nvme connect -t rdma -a [Gateway_IP_2] -s 4420 -n nqn.2016-06.io.spdk:cnode1
6. Verification: Check your block devices. You should see `/dev/nvmeXnY` devices. Run a simple `fio` test with a high iodepth (e.g., `–iodepth=128 –numjobs=8`) to see the multi-queue architecture in action.
## The 4:00 PM Resolution: Is it worth the switch?
If your workload is general-purpose virtualization, file storage, or backup targets, iSCSI is “fine.” It’s stable, understood, and works on any hardware. But if you are running high-transaction databases (PostgreSQL, MongoDB), real-time analytics, or AI training sets on Ceph, the move to NVMe-oF isn’t just an optimization—it’s a requirement.
The transition from iSCSI to NVMe-oF represents the removal of the last major bottleneck in the software-defined storage stack. We have moved from the “millisecond era” to the “microsecond era.” By adopting NVMe-oF, you aren’t just making things faster; you’re future-proofing your infrastructure for the next decade of NVMe and CXL advancements.
### Frequently Asked Questions
Can I run NVMe-oF over standard TCP if I don’t have RDMA-capable switches?
Yes. NVMe-oF (TCP) still provides significant performance benefits over iSCSI because it uses the SPDK user-space driver and multi-queue architecture. While you won’t achieve the ultra-low latency of RDMA, you will still see a massive increase in IOPS and a reduction in CPU overhead compared to legacy iSCSI.
Does Ceph NVMe-oF support multipathing for high availability?
Absolutely. NVMe-oF uses the native ANA (Asymmetric Namespace Access) protocol for multipathing. When a client connects to multiple gateways, the Linux kernel automatically handles path failover and load balancing, providing a much more robust HA solution than traditional iSCSI MPIO.
Is NVMe-oF compatible with existing Ceph RBD features like snapshots and clones?
Yes. Because the NVMe-oF gateway sits on top of `librbd`, all the standard Ceph features remain available. You can snapshot, clone, and resize your RBD images just as you would with iSCSI or the native Ceph kernel module.
Clustered Storage Systems & Storage Area Networks
High-availability database clusters demand uncompromising storage I/O performance and low latency. For distributed storage benchmarks, read our audit on PostgreSQL HA: Patroni vs pg_auto_failover Guide.
