← Documents Documentation/admin-guide/nvme-multipath.rst GitHub 원문 ↗

Linux 6.18.37 · Administration

Linux NVMe multipath

Linux NVMe multipath의 namespace 통합, ANA 우선순위와 세 path selection policy를 설명합니다.

Source pathDocumentation/admin-guide/nvme-multipath.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

운영 핵심

nvme-multipath.rst:1-72

세 policy는 모두 ANA state를 먼저 따르며, locality·균등 분배·queue 부하 중 workload에 맞는 기준을 선택합니다.

관점핵심
통합동일 identifier의 namespace를 단일 block device로 결합
우선순위ANA optimized path가 non-optimized path보다 우선
정책`numa`(기본), `round-robin`, `queue-depth`
설정`iopolicy` sysfs parameter 또는 `nvme_core.iopolicy=` cmdline

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ====================
4 Linux NVMe multipath
5 ====================
6
7 This document describes NVMe multipath and its path selection policies supported
8 by the Linux NVMe host driver.
9
10
11 Introduction
12 ============
13
14 The NVMe multipath feature in Linux integrates namespaces with the same
15 identifier into a single block device. Using multipath enhances the reliability
16 and stability of I/O access while improving bandwidth performance. When a user
17 sends I/O to this merged block device, the multipath mechanism selects one of
18 the underlying block devices (paths) according to the configured policy.
19 Different policies result in different path selections.
20
21
22 Policies
23 ========
24
25 All policies follow the ANA (Asymmetric Namespace Access) mechanism, meaning
26 that when an optimized path is available, it will be chosen over a non-optimized
27 one. Current the NVMe multipath policies include numa(default), round-robin and
28 queue-depth.
29
30 To set the desired policy (e.g., round-robin), use one of the following methods:
31 1. echo -n "round-robin" > /sys/module/nvme_core/parameters/iopolicy
32 2. or add the "nvme_core.iopolicy=round-robin" to cmdline.
33
34
35 NUMA
36 ----
37
38 The NUMA policy selects the path closest to the NUMA node of the current CPU for
39 I/O distribution. This policy maintains the nearest paths to each NUMA node
40 based on network interface connections.
41
42 When to use the NUMA policy:
43 1. Multi-core Systems: Optimizes memory access in multi-core and
44 multi-processor systems, especially under NUMA architecture.
45 2. High Affinity Workloads: Binds I/O processing to the CPU to reduce
46 communication and data transfer delays across nodes.
47
48
49 Round-Robin
50 -----------
51
52 The round-robin policy distributes I/O requests evenly across all paths to
53 enhance throughput and resource utilization. Each I/O operation is sent to the
54 next path in sequence.
55
56 When to use the round-robin policy:
57 1. Balanced Workloads: Effective for balanced and predictable workloads with
58 similar I/O size and type.
59 2. Homogeneous Path Performance: Utilizes all paths efficiently when
60 performance characteristics (e.g., latency, bandwidth) are similar.
61
62
63 Queue-Depth
64 -----------
65
66 The queue-depth policy manages I/O requests based on the current queue depth
67 of each path, selecting the path with the least number of in-flight I/Os.
68
69 When to use the queue-depth policy:
70 1. High load with small I/Os: Effectively balances load across paths when
71 the load is high, and I/O operations consist of small, relatively
72 fixed-sized requests.
73

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

문서 범위

1-9

이 문서는 `SPDX-License-Identifier: GPL-2.0`이며 Linux NVMe host driver가 지원하는 NVMe multipath와 path selection policy를 설명합니다.

Namespace 통합과 path 선택

10-20

Linux NVMe multipath는 identifier가 같은 namespace를 하나의 block device로 통합합니다. Multipath는 I/O access의 reliability와 stability를 높이고 bandwidth performance를 개선합니다.

User가 통합 block device에 I/O를 보내면 설정한 policy에 따라 underlying block device, 즉 path 하나를 선택합니다. Policy가 다르면 path 선택 결과도 달라집니다.

ANA와 policy 설정

21-33

모든 policy는 ANA(Asymmetric Namespace Access)를 따르므로 optimized path가 있으면 non-optimized path보다 우선합니다. 현재 policy는 `numa(default)`, `round-robin`, `queue-depth`입니다.

방법설정
Runtime sysfs`/sys/module/nvme_core/parameters/iopolicy`에 기록
Kernel cmdline`nvme_core.iopolicy=round-robin` 추가

예를 들어 `round-robin` policy를 runtime에 설정합니다.

echo -n "round-robin" > /sys/module/nvme_core/parameters/iopolicy

NUMA policy

34-47

NUMA policy는 I/O를 분배할 때 현재 CPU의 NUMA node에 가장 가까운 path를 선택합니다. network interface connection을 기준으로 각 NUMA node에 가장 가까운 path를 유지합니다.

`Multi-core Systems`에서는 특히 NUMA architecture의 memory access를 최적화합니다. `High Affinity Workloads`에서는 I/O processing을 CPU에 묶어 node 간 communication과 data transfer delay를 줄입니다.

Round-Robin policy

48-61

`round-robin` policy는 I/O request를 모든 path에 균등 분배해 throughput과 resource utilization을 높이며, 각 I/O operation을 순서상 다음 path로 보냅니다.

`Balanced Workloads`처럼 I/O size와 type이 비슷하고 예측 가능한 workload, 또는 latency와 bandwidth 같은 특성이 비슷한 `Homogeneous Path Performance`에서 모든 path를 효율적으로 사용합니다.

Queue-Depth policy

62-72

`queue-depth` policy는 각 path의 현재 queue depth에 따라 I/O request를 관리하고 in-flight I/Os 수가 가장 적은 path를 선택합니다.

`High load with small I/Os`처럼 load가 높고 I/O가 작고 비교적 fixed-sized request로 구성될 때 path 간 load를 효과적으로 균형화합니다.

Policy선택 방식적합한 상황
`numa` (default)현재 CPU의 NUMA node에 가장 가까운 pathMulti-core Systems, High Affinity Workloads
`round-robin`모든 path에 I/O request를 순서대로 균등 분배Balanced Workloads, Homogeneous Path Performance
`queue-depth`in-flight I/Os가 가장 적은 pathHigh load with small I/Os