Dual vs Single PCIe Root Configuration: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(Fix: remove --- horizontal lines (12 removed))
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Dual vs Single PCIe Root Configuration Options=
{{Status
in brief - '''Single vs Dual Root''' - is the technical term of the difference of the PCIe architecture. One of the advantages of the single-root architecture is being able to use a lower QPI/ UPI speed and a lower-end CPU SKU. PCIe switches do add some latency, however, as you can see there are advantages to using more PCIe switches versus having to traverse QPI/ UPI. moving to a single root PCIe complex also means that one does not need the highest-speed interconnect between CPUs by decoupling the latency from socket-to-socket interconnect performance. AMD EPYC’s architecture GPUs connected to different CPUs and utilize '''Infinity Fabric''' interconnect architecture.
|status=Draft
|owner=Knowledge Agent
|last_update=2026-07-15
|review=Pending
}}


{{TOC}}
== Overview ==
Single-Root vs Dual-Root PCIe Configuration은 다중 CPU 시스템에서 GPU 및 PCIe 장치의 연결 아키텍처를 결정하는 핵심 설계 선택지입니다.
=== Summary ===
* 무엇인가? 다중 CPU 시스템에서 GPU/PCIe 장치 연결 방식 — Single-Root(단일 CPU) vs Dual-Root(양쪽 CPU 분산)
* 왜 필요한가? GPU 간 P2P 대역폭, 지연시간, QPI/UPI 대역폭 트레이드오프 결정
* 언제 사용하는가? 딥러닝 서버, AI/ML 클러스터, 다중 GPU 시스템 설계
== Purpose ==
이 문서가 존재하는 이유
* Goal: Single-Root와 Dual-Root PCIe 구성의 차이, 성능 영향, 선택 기준 설명
* Scope: P2P 대역폭, 지연시간, QPI/UPI 영향, PCIe 스위치 계층화
* Non-goals: PCIe 프로토콜 상세, 다른 버스 아키텍처
== Key Concepts ==
{| class="wikitable"
! Concept
! Description
! Related
|-
| Single-Root
| 모든 GPU가 단일 CPU에 연결 — PCIe 스위치 사용
| [[PCIe]]
|-
| Dual-Root
| GPU가 양쪽 CPU에 분산 — QPI/UPI 링크 사용
| [[PCIe]]
|-
| QPI/UPI
| CPU 간 인터커넥트 — Dual-Root에서 소켓-투-소켓 통신
| [[NUMA]]
|-
| P2P (Peer-to-Peer)
| GPU 간 직접 데이터 전송 — Single-Root에서 더 나은 성능
| [[GPU Direct]]
|-
| PCIe Switch
| 단일 CPU 내 다중 장치 연결 — 계층화 가능
| [[PCIe]]
|-
| Infinity Fabric
| AMD EPYC CPU 간 인터커넥트 아키텍처
| [[AMD EPYC]]
|}
== Architecture ==
Single-Root vs Dual-Root 아키텍처 비교:
<syntaxhighlight lang="mermaid">
graph TD
    subgraph "Dual-Root Configuration"
        A1[CPU 1] --> B1[PCIe Switch 1]
        B1 --> C1[GPU 0-3]
        A2[CPU 2] --> B2[PCIe Switch 2]
        B2 --> C2[GPU 4-7]
        A1 -.->|QPI/UPI| A2
        C1 -.->|SOC| C2
    end
    subgraph "Single-Root Configuration"
        D1[CPU 1] --> E1[PCIe Switch 1]
        E1 --> F1[GPU 0-4]
        E1 --> F2[GPU 5-6]
        E1 --> F3[GPU 7-9]
    end
</syntaxhighlight>
== Workflow ==
PCIe Root Configuration 선택 흐름:
# 시스템 요구사항 분석 — GPU 수, P2P 필요성, 대역폭 요구
# Single-Root 또는 Dual-Root 아키텍처 선택
# PCIe 스위치 구성 및 연결 설계
# P2P 설정 활성화/비활성화
# 성능 벤치마크 및 검증
{| class="wikitable"
! Stage
! Input
! Output
|-
| Requirement Analysis
| GPU 수, P2P 필요성
| Root Configuration 선택
|-
| Single-Root Design
| 단일 CPU 연결
| PCIe 스위치 계층화
|-
| Dual-Root Design
| 양쪽 CPU 분산
| QPI/UPI 링크 구성
|-
| P2P Configuration
| GPU 간 직접 통신
| P2P 활성화/비활성화
|-
| Performance Validation
| 벤치마크 결과
| 아키텍처 검증
|}
== Detailed Explanation ==


=== Single-Root Configuration ===
=== Single-Root Configuration ===
[[file : Single-Root.png | right| 150px]]
Typical dual-root setup half of the GPUs are on one CPU, the other half are attached to the second CPU. In these systems that is important because it also means that Infiniband placement may be across one or two PCIe switches and across a socket-to-socket QPI link. To mitigate this impact, we have seen deep learning cluster deployments with two Infiniband cards, one attached to each CPU


illustration via a picture using the SLI covers - Red and Black SLI covers are on different CPUs. In the topology above that means that they need to traverse QPI and therefore communication is marked as SOC. For peer-to-peer connectivity, this means that GPUs 0-3 and 4-7 can do P2P.
모든 GPU가 동일한 CPU에 연결됩니다. 일반적으로 PCIe 스위치를 사용하여 이를 처리합니다.
[[file : Duallink-example.jpg | center| 400px]]
[[file : Duallink-topology.jpg | center| 400px]]
[[file : Duallink-P2P.jpg | center| 400px]]


* 장점: QPI/UPI 링크를 거치지 않아 P2P 대역폭 약 2배 향상, SOC(Switch-of-CPU) 엔트리 없음
* 단점: 단일 CPU의 PCIe 레인 수 제한, PCIe 스위치 추가 계층화로 인한 약간의 지연시간 증가
* 사용 사례: 딥러닝 서버, 대용량 AI/데이터 처리 시스템


=== Dual-Root Configuration ===
=== Dual-Root Configuration ===
[[file : Dual-Root.png | right| 150px]]
Single root means that each GPU is connected to the same CPU. There are generally PCIe switches to handle this. As you can see from the topology matrix, there are no “SOC” entries. You will notice there are no red SLI connectors on the second CPU. What that means on peer-to-peer connectivity is that we no longer have a matrix of 1’s and 0. This is a popular topology for deep learning servers and we have seen several big data/ AI companies using both versions of the GPU server. We have also seen a large hyper-scale AI company use the single root version of this server with GTX 1080 Ti’s, Titan Xp’s as well as P100’s


GPU의 절반이 한 CPU에, 나머지 절반이 두 번째 CPU에 연결됩니다.
* 장점: 각 CPU의 PCIe 레인 수 분산, QPI/UPI 대역폭 요구 감소
* 단점: QPI/UPI 링크를 거쳐야 하는 SOC 통신 발생, P2P가 CPU 간으로 확장되면 성능 저하
* 사용 사례: Infiniband 카드가 각 CPU에 하나씩 배치된 딥러닝 클러스터
=== Single Root v. Dual Root Bandwidth ===
NVIDIA의 p2pBandwidthLatencyTool은 성능 분석을 위한 도구는 아니지만, 대략적인 성능 차이를 보여줍니다.


* '''단방향 대역폭''' — QPI 버스를 거치지 않아 Single-Root에서 GPU 간 속도 약 2배 향상
* '''양방향 대역폭''' — Single-Root에서 P2P 활성화 시 더 큰 성능 향상


[[file : Singlelink-example.jpg | center| 400px]]
=== Single Root v. Dual Root Latency ===
[[file : Singlelink-topology.jpg | center| 400px]]
[[file : Singlelink-P2P.jpg | center| 400px]]


== Single Root v. Dual Root Bandwidth ==
* '''P2P 비활성화''' — Dual-Root 시스템에서 GPU 간 지연시간 높음
NVIDIA specifically says that the p2pBandwidthLatencyTool is not for performance analysis. With that said, we wanted to get some data out there simply to present a rough idea of what is happening
* '''P2P 활성화''' — Dual-Root 시스템에서 동일 CPU/PCIe Root의 GPU 간 지연시간significant 감소
* '''Single-Root P2P 활성화''' — Dual-Root 대비 현저한 지연시간 감소 — Single-Root PCIe 시스템으로 이동하는 주요 동력


=== Unidirectional Bandwidth ===
Aside from using more GPUs, you will notice that by not having to traverse the QPI bus, there is around a 2x GPU to GPU speed improvement. *Please ignoring GPU7 for these charts as there is something going on
[[file : Duallink-unidirectional-bandwidth-P2P-disabled.jpg | center| 400px]]
Turning to P2P enabled here is the 8x GPU dual root system:
[[file : Duallink-Unidirectional-Bandwidth-P2P-Enabled.jpg | center| 400px]]
Now let’s take a look at the 10x GPU single-root version:
[[file : Singlelink-unidirectional-bandwidth-P2P-enabled.jpg | center| 400px]]
As you can see the impact of using multiple PCIe switches tiered but the bandwidth gains cannot be ignored.


=== Bi-directional Bandwidth ===
== Configuration ==
What happens when we move to bi-directional bandwidth? Here is the 8x GPU dual root system (again see the note above about GPU7):
[[file : Duallink-bi-directional-bandwidth-P2P-disabled.jpg | center| 400px]]
Here is the 10 GPU system for comparison:
[[file : Single-biidirectional-bandwidth-P2P-disabled.jpg | center| 400px]]
When we turn on P2P we see some gains on the dual root 8x GPU system:
[[file : Duallink-bi-directional-bandwidth-P2P-enabled.jpg | center| 400px]]
We also see more substantial gains on the single root 10x GPU system:
[[file : Singlelink-bi-directional-bandwidth-P2P-enabled.jpg | center| 400px]]


=== Single Root v. Dual Root Latency ===
=== P2P 활성화 ===
When it comes to latency, here are the P2P disabled 8x GPU results:
 
[[file : Dual-P2P-disabled-latency-matrix.jpg | center| 400px]]
<syntaxhighlight lang="bash">
Here are the signle-root 10x GPU results. Note that even with more GPUs on the PCIe switches, the performance is still good.
# P2P 상태 확인
[[file : Single-P2P-disabled-latency-matrix.jpg | center| 400px]]
$ nvidia-smi topo -m
P2P makes a significant latency impact on the dual root system, for GPUs on the same CPU/ PCIe root.
 
[[file : Dual-P2P-enabled-latency-matrix.jpg | center| 400px]]
# P2P 활성화 (BIOS/UEFI에서 IOMMU/VT-d 비활성화 필요)
When you flip to P2P with the 10x GPU system, you will notice a fairly dramatic latency drop from the above. this is the key drivers towards single root PCIe systems.
# NVIDIA 드라이버가 자동으로 P2P 감지 및 활성화
[[file : Single-P2P-enabled-latency-matrix.jpg | center| 400px]]
</syntaxhighlight>
 
=== PCIe Switch 계층화 ===
 
Single-Root 구성에서 PCIe 스위치를 계층적으로 연결하여 더 많은 GPU 연결:
 
<syntaxhighlight lang="text">
CPU → PCIe Switch Tier 1 → PCIe Switch Tier 2 → GPU 0-7
                        → GPU 8-15
</syntaxhighlight>
 
 
== Examples ==
 
=== Example 1: 8x GPU Dual-Root 시스템 ===
 
<syntaxhighlight lang="text">
CPU 1: GPU 0-3 (PCIe Switch 1)
CPU 2: GPU 4-7 (PCIe Switch 2)
QPI/UPI: CPU 간 연결
P2P: GPU 0-3 간, GPU 4-7 간만 가능
SOC: GPU 0-3 ↔ GPU 4-7 간 통신
</syntaxhighlight>
 
=== Example 2: 10x GPU Single-Root 시스템 ===
 
<syntaxhighlight lang="text">
CPU 1: GPU 0-9 (PCIe Switch 계층화)
QPI/UPI: 불필요
P2P: 모든 GPU 간 가능
SOC: 없음 — 모든 GPU가 단일 CPU에 연결
</syntaxhighlight>
 
 
== Best Practices ==
 
* 딥러닝 워크로드 — Single-Root 구성 권장 (P2P 대역폭 우선)
* Infiniband 다중 카드 구성 — Dual-Root에서 각 CPU에 하나씩 배치
* PCIe 스위치 계층화 시 지연시간 모니터링
* P2P 활성화 전 BIOS에서 IOMMU/VT-d 비활성화 확인
* AMD EPYC 시스템 — Infinity Fabric 인터커넥트 활용
 
 
== Limitations ==
 
* Single-Root: 단일 CPU의 PCIe 레인 수 제한
* Dual-Root: QPI/UPI 대역폭 병목 가능
* PCIe 스위치 계층화: 추가 지연시간 발생
* P2P: IOMMU/VT-d 활성화 시 성능 저하
* GPU 7 등 특정 GPU에서 이상 현상 가능 (벤치마크 참고)
 
 
== References ==
 
* https://www.servethehome.com/single-root-or-dual-root-for-deep-learning-gpu-to-gpu-systems/
 
 
== Related Pages ==
 
* [[PCIe]]
* [[GPU Direct]]
* [[NUMA]]
* [[AMD EPYC]]
* [[P2P]]
* [[QPI]]
* [[UPI]]
 
 
[[Category:Hardware]]
[[Category:Configuration]]
== Knowledge Graph ==
 
Related


→ [[ACS]]
→ [[Bifurcation]]
→ [[CPU features]]
→ [[AER (Advanced Error Reporting)]]
→ [[PCIe]]
→ [[ASPM]]
→ [[PCIe 5.0]]


- Reference : https://www.servethehome.com/single-root-or-dual-root-for-deep-learning-gpu-to-gpu-systems/
[[Category:Comparison]]

Latest revision as of 11:28, 17 July 2026

Template:Status

Template:TOC

Overview

Single-Root vs Dual-Root PCIe Configuration은 다중 CPU 시스템에서 GPU 및 PCIe 장치의 연결 아키텍처를 결정하는 핵심 설계 선택지입니다.

Summary

  • 무엇인가? 다중 CPU 시스템에서 GPU/PCIe 장치 연결 방식 — Single-Root(단일 CPU) vs Dual-Root(양쪽 CPU 분산)
  • 왜 필요한가? GPU 간 P2P 대역폭, 지연시간, QPI/UPI 대역폭 트레이드오프 결정
  • 언제 사용하는가? 딥러닝 서버, AI/ML 클러스터, 다중 GPU 시스템 설계


Purpose

이 문서가 존재하는 이유

  • Goal: Single-Root와 Dual-Root PCIe 구성의 차이, 성능 영향, 선택 기준 설명
  • Scope: P2P 대역폭, 지연시간, QPI/UPI 영향, PCIe 스위치 계층화
  • Non-goals: PCIe 프로토콜 상세, 다른 버스 아키텍처


Key Concepts

Concept Description Related
Single-Root 모든 GPU가 단일 CPU에 연결 — PCIe 스위치 사용 PCIe
Dual-Root GPU가 양쪽 CPU에 분산 — QPI/UPI 링크 사용 PCIe
QPI/UPI CPU 간 인터커넥트 — Dual-Root에서 소켓-투-소켓 통신 NUMA
P2P (Peer-to-Peer) GPU 간 직접 데이터 전송 — Single-Root에서 더 나은 성능 GPU Direct
PCIe Switch 단일 CPU 내 다중 장치 연결 — 계층화 가능 PCIe
Infinity Fabric AMD EPYC CPU 간 인터커넥트 아키텍처 AMD EPYC


Architecture

Single-Root vs Dual-Root 아키텍처 비교:

graph TD
    subgraph "Dual-Root Configuration"
        A1[CPU 1] --> B1[PCIe Switch 1]
        B1 --> C1[GPU 0-3]
        A2[CPU 2] --> B2[PCIe Switch 2]
        B2 --> C2[GPU 4-7]
        A1 -.->|QPI/UPI| A2
        C1 -.->|SOC| C2
    end
    subgraph "Single-Root Configuration"
        D1[CPU 1] --> E1[PCIe Switch 1]
        E1 --> F1[GPU 0-4]
        E1 --> F2[GPU 5-6]
        E1 --> F3[GPU 7-9]
    end


Workflow

PCIe Root Configuration 선택 흐름:

  1. 시스템 요구사항 분석 — GPU 수, P2P 필요성, 대역폭 요구
  2. Single-Root 또는 Dual-Root 아키텍처 선택
  3. PCIe 스위치 구성 및 연결 설계
  4. P2P 설정 활성화/비활성화
  5. 성능 벤치마크 및 검증
Stage Input Output
Requirement Analysis GPU 수, P2P 필요성 Root Configuration 선택
Single-Root Design 단일 CPU 연결 PCIe 스위치 계층화
Dual-Root Design 양쪽 CPU 분산 QPI/UPI 링크 구성
P2P Configuration GPU 간 직접 통신 P2P 활성화/비활성화
Performance Validation 벤치마크 결과 아키텍처 검증


Detailed Explanation

Single-Root Configuration

모든 GPU가 동일한 CPU에 연결됩니다. 일반적으로 PCIe 스위치를 사용하여 이를 처리합니다.

  • 장점: QPI/UPI 링크를 거치지 않아 P2P 대역폭 약 2배 향상, SOC(Switch-of-CPU) 엔트리 없음
  • 단점: 단일 CPU의 PCIe 레인 수 제한, PCIe 스위치 추가 계층화로 인한 약간의 지연시간 증가
  • 사용 사례: 딥러닝 서버, 대용량 AI/데이터 처리 시스템

Dual-Root Configuration

GPU의 절반이 한 CPU에, 나머지 절반이 두 번째 CPU에 연결됩니다.

  • 장점: 각 CPU의 PCIe 레인 수 분산, QPI/UPI 대역폭 요구 감소
  • 단점: QPI/UPI 링크를 거쳐야 하는 SOC 통신 발생, P2P가 CPU 간으로 확장되면 성능 저하
  • 사용 사례: Infiniband 카드가 각 CPU에 하나씩 배치된 딥러닝 클러스터

Single Root v. Dual Root Bandwidth

NVIDIA의 p2pBandwidthLatencyTool은 성능 분석을 위한 도구는 아니지만, 대략적인 성능 차이를 보여줍니다.

  • 단방향 대역폭 — QPI 버스를 거치지 않아 Single-Root에서 GPU 간 속도 약 2배 향상
  • 양방향 대역폭 — Single-Root에서 P2P 활성화 시 더 큰 성능 향상

Single Root v. Dual Root Latency

  • P2P 비활성화 — Dual-Root 시스템에서 GPU 간 지연시간 높음
  • P2P 활성화 — Dual-Root 시스템에서 동일 CPU/PCIe Root의 GPU 간 지연시간significant 감소
  • Single-Root P2P 활성화 — Dual-Root 대비 현저한 지연시간 감소 — Single-Root PCIe 시스템으로 이동하는 주요 동력


Configuration

P2P 활성화

# P2P 상태 확인
$ nvidia-smi topo -m

# P2P 활성화 (BIOS/UEFI에서 IOMMU/VT-d 비활성화 필요)
# NVIDIA 드라이버가 자동으로 P2P 감지 및 활성화

PCIe Switch 계층화

Single-Root 구성에서 PCIe 스위치를 계층적으로 연결하여 더 많은 GPU 연결:

CPU → PCIe Switch Tier 1 → PCIe Switch Tier 2 → GPU 0-7
                        → GPU 8-15


Examples

Example 1: 8x GPU Dual-Root 시스템

CPU 1: GPU 0-3 (PCIe Switch 1)
CPU 2: GPU 4-7 (PCIe Switch 2)
QPI/UPI: CPU 간 연결
P2P: GPU 0-3 간, GPU 4-7 간만 가능
SOC: GPU 0-3 ↔ GPU 4-7 간 통신

Example 2: 10x GPU Single-Root 시스템

CPU 1: GPU 0-9 (PCIe Switch 계층화)
QPI/UPI: 불필요
P2P: 모든 GPU 간 가능
SOC: 없음 — 모든 GPU가 단일 CPU에 연결


Best Practices

  • 딥러닝 워크로드 — Single-Root 구성 권장 (P2P 대역폭 우선)
  • Infiniband 다중 카드 구성 — Dual-Root에서 각 CPU에 하나씩 배치
  • PCIe 스위치 계층화 시 지연시간 모니터링
  • P2P 활성화 전 BIOS에서 IOMMU/VT-d 비활성화 확인
  • AMD EPYC 시스템 — Infinity Fabric 인터커넥트 활용


Limitations

  • Single-Root: 단일 CPU의 PCIe 레인 수 제한
  • Dual-Root: QPI/UPI 대역폭 병목 가능
  • PCIe 스위치 계층화: 추가 지연시간 발생
  • P2P: IOMMU/VT-d 활성화 시 성능 저하
  • GPU 7 등 특정 GPU에서 이상 현상 가능 (벤치마크 참고)


References


Related Pages

Knowledge Graph

Related

ACSBifurcationCPU featuresAER (Advanced Error Reporting)PCIeASPMPCIe 5.0