RoCE Network

Alright, let’s take a comprehensive look at RoCE networks.

RoCE (pronounced like “rocky”) is a technology that allows Remote Direct Memory Access (RDMA) over standard Ethernet networks. It aims to combine the ubiquity of Ethernet with the high performance and low latency advantages of InfiniBand.

Here is a detailed analysis of RoCE networks:


🔍 1. What is RoCE?

  • Full Name: RDMA over Converged Ethernet
  • Core Idea: Implement RDMA over Ethernet. It allows one computer to directly access the memory of another computer without involving the operating system, thereby greatly reducing CPU overhead and network latency.
  • Essence: It is a network protocol, not a physical hardware standard. It runs on standard Ethernet network interface cards (NICs that support RoCE) and switches.

⚡ 2. Why is RoCE Needed? — Core Advantages

  1. Extremely Low Latency:
    Bypassing the kernel protocol stack enables end-to-end direct memory access, reducing latency from tens of microseconds in traditional TCP/IP to a few microseconds or even sub-microseconds.
  2. Very Low CPU Utilization:
    The data transfer process does not require CPU involvement, freeing CPU resources from heavy network packet processing for actual application tasks (such as computation, storage services, database queries, etc.). This significantly improves the efficiency of the entire system.
  3. High Bandwidth:
    Fully utilizes the capabilities of modern high-speed Ethernet (e.g., 100G, 200G, 400G) to provide extremely high data transfer throughput.
  4. Leverages Existing Infrastructure:
    Unlike InfiniBand, which requires dedicated switches and controllers, RoCE can run on existing Ethernet infrastructure (though switches need to support corresponding lossless features), reducing the cost and complexity of deploying new technology.

⚙️ 3. Versions of RoCE

RoCE has two main versions, differing in the network layer they use:

FeatureRoCE v1RoCE v2
Network LayerEthernet Link Layer (L2)IP Network Layer (L3)
Frame FormatEthernet FrameEncapsulates IP and UDP headers within an Ethernet frame
RoutabilityNot routable, can only communicate within the same L2 subnetRoutable, can communicate across L3 networks
FlexibilityPoor, limited network designStrong, more suitable for large-scale, complex modern data center networks
Current StatusEssentially obsoleteThe absolute mainstream and standard today

Conclusion: Nowadays, when we refer to RoCE, we usually mean RoCE v2 by default.

🚧 4. Key Challenges and Solutions for Implementing RoCE: Lossless Networks

The RDMA protocol itself is designed for lossless networks (where no packet loss occurs). However, traditional Ethernet is a lossy network; it relies on TCP’s retransmission mechanism to handle packet loss.

Problem: In a RoCE network, once packet loss occurs, RDMA transmission times out and triggers retransmission, which causes severe performance degradation (soaring latency, plummeting throughput), completely defeating the purpose of using RoCE.

Solution: To run RoCE, the Ethernet must be configured as a lossless network. This is primarily achieved through the following technologies:

  1. Priority-based Flow Control (PFC)
    • Function: Implements a “pause” mechanism on Ethernet similar to InfiniBand. It divides traffic into different priority queues (e.g., assigning the highest priority to RoCE traffic). When the receive buffer for a certain priority is almost full, it sends a “pause frame” to the sender to temporarily halt the transmission of that priority traffic, thus avoiding packet loss.
    • Analogy: Equivalent to traffic control, opening a dedicated green lane for an ambulance (RoCE traffic) and preventing other vehicles from entering when an intersection is congested.
  2. Explicit Congestion Notification (ECN)
    • Function: An end-to-end congestion control mechanism. When a network switch experiences congestion, it marks a field in the data packet. The receiver includes this mark in an acknowledgment packet sent back to the sender, which then proactively reduces its sending rate to alleviate congestion at the source.
    • Analogy: An electronic road sign warning “Congestion ahead, please slow down.”
  3. Data Center Quantized Congestion Notification (DCQCN)
    • Function: This is an end-to-end congestion control algorithm designed for RoCE in data centers. It combines the advantages of PFC (quick reaction at the switch level to avoid packet loss) and ECN (notifying the source to adjust its rate). It is a crucial algorithm for achieving stable, high-performance RoCE networks.

📊 5. RoCE vs. InfiniBand

This is a common dilemma. Here is the core comparison:

FeatureRoCE (v2)InfiniBand (IB)
Network BasisStandard EthernetDedicated Network (dedicated NICs, switches, cables)
ProtocolBased on UDP/IPNative RDMA
Lossless NetworkRequires manual configuration (PFC/ECN/DCQCN)Natively supported (Credit-based flow control)
PerformanceSlightly higher latency than IB, but far better than TCP/IPUltimate performance (lowest latency, highest bandwidth)
ScalabilityRelies on IP networking, good scalabilityRelies on subnet management, extremely large single subnet scale
CostCan leverage existing Ethernet infrastructure, high cost-effectivenessDedicated equipment, high procurement and deployment costs
EcosystemStrong compatibility, supported by most cloud providers and vendorsDriven primarily by NVIDIA, relatively closed but highly optimized ecosystem
Primary Use CasesEnterprise data centers, cloud services, storage (NVMe-oF), some AIVery large-scale AI/HPC clusters, scenarios with extreme performance requirements

🚀 6. Typical Application Scenarios for RoCE

  1. Hyper-Converged Infrastructure (HCI) & Software-Defined Storage (SDS):
    For example, NVMe-oF (NVMe over Fabrics) storage networks use RoCE to allow compute nodes to access centralized storage extremely quickly, providing performance close to local NVMe SSDs.
  2. High-Performance Computing (HPC) & Artificial Intelligence (AI):
    Although not the first choice for ultimate performance (IB still is), RoCE provides an excellent, cost-effective solution for many medium-to-large-scale AI training and HPC clusters, especially when leveraging existing Ethernet facilities.
  3. Databases and Big Data Analytics:
    Accelerates data transfer between database nodes, and between compute nodes and the storage layer, reducing query latency.
  4. Cloud Data Centers:
    Large cloud service providers (e.g., Microsoft Azure, Google Cloud) widely use RoCE within their data centers to improve network efficiency and reduce tail latency.

💎 Summary

RoCE is a powerful technology that successfully brings the high performance and low latency characteristics of RDMA to ubiquitous Ethernet.

Its core value lies in:

  • Performance: Offers performance levels close to InfiniBand.
  • Efficiency: Significantly reduces CPU overhead.
  • Economy: Based on lower-cost, more widespread Ethernet infrastructure.

However, the key to deploying RoCE (especially v2) lies in correctly configuring a lossless network (PFC, ECN), which is a complex but necessary process. If configured improperly, its performance advantages cannot be realized.

For most enterprises and data centers, RoCE strikes the best balance between performance, cost, and compatibility, making it one of the preferred technologies for building next-generation high-performance networks.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top