* [PATCH separete v2] docs, nvme: introduce nvme-multipath document
@ 2024-12-06 7:25 Guixin Liu
2024-12-06 14:42 ` Jonathan Corbet
0 siblings, 1 reply; 3+ messages in thread
From: Guixin Liu @ 2024-12-06 7:25 UTC (permalink / raw)
To: Keith Busch, Jens Axboe, Christoph Hellwig, Jonathan Corbet,
Chaitanya Kulkarni
Cc: linux-nvme, linux-doc
This adds a document about nvme-multipath and policies supported
by the Linux NVMe host driver, and also each policy's best scenario.
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
Hi,
We found that we should take care of the throughput of each path in
service-time policy, so separate the doc patch. And continue working
on service-time policy patch.
Changes from v1 to v2:
- Remove service-tome policy.
Documentation/nvme/nvme-multipath.rst | 72 +++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 Documentation/nvme/nvme-multipath.rst
diff --git a/Documentation/nvme/nvme-multipath.rst b/Documentation/nvme/nvme-multipath.rst
new file mode 100644
index 000000000000..97ca1ccef459
--- /dev/null
+++ b/Documentation/nvme/nvme-multipath.rst
@@ -0,0 +1,72 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+====================
+Linux NVMe multipath
+====================
+
+This document describes NVMe multipath and its path selection policies supported
+by the Linux NVMe host driver.
+
+
+Introduction
+============
+
+The NVMe multipath feature in Linux integrates namespaces with the same
+identifier into a single block device. Using multipath enhances the reliability
+and stability of I/O access while improving bandwidth performance. When a user
+sends I/O to this merged block device, the multipath mechanism selects one of
+the underlying block devices (paths) according to the configured policy.
+Different policies result in different path selections.
+
+
+Policies
+========
+
+All policies follow the ANA (Asymmetric Namespace Access) mechanism, meaning
+that when an optimized path is available, it will be chosen over a non-optimized
+one. Current the NVMe multipath policies include numa(default), round-robin and
+queue-depth.
+
+To set the desired policy (e.g., round-robin), use one of the following methods:
+ 1. echo -n "round-robin" > /sys/module/nvme_core/parameters/iopolicy
+ 2. or add the "nvme_core.iopolicy=round-robin" to cmdline.
+
+
+NUMA
+----
+
+The NUMA policy selects the path closest to the NUMA node of the current CPU for
+I/O distribution. This policy maintains the nearest paths to each NUMA node
+based on network interface connections.
+
+When to use the NUMA policy:
+ 1. Multi-core Systems: Optimizes memory access in multi-core and
+ multi-processor systems, especially under NUMA architecture.
+ 2. High Affinity Workloads: Binds I/O processing to the CPU to reduce
+ communication and data transfer delays across nodes.
+
+
+Round-Robin
+-----------
+
+The round-robin policy distributes I/O requests evenly across all paths to
+enhance throughput and resource utilization. Each I/O operation is sent to the
+next path in sequence.
+
+When to use the round-robin policy:
+ 1. Balanced Workloads: Effective for balanced and predictable workloads with
+ similar I/O size and type.
+ 2. Homogeneous Path Performance: Utilizes all paths efficiently when
+ performance characteristics (e.g., latency, bandwidth) are similar.
+
+
+Queue-Depth
+-----------
+
+The queue-depth policy manages I/O requests based on the current queue depth
+of each path, selecting the path with the least number of in-flight I/Os.
+
+When to use the queue-depth policy:
+ 1. High load with small I/Os: Effectively balances load across paths when
+ the load is high, and I/O operations consist of small, relatively
+ fixed-sized requests.
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH separete v2] docs, nvme: introduce nvme-multipath document
2024-12-06 7:25 [PATCH separete v2] docs, nvme: introduce nvme-multipath document Guixin Liu
@ 2024-12-06 14:42 ` Jonathan Corbet
2024-12-09 1:34 ` Guixin Liu
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Corbet @ 2024-12-06 14:42 UTC (permalink / raw)
To: Guixin Liu, Keith Busch, Jens Axboe, Christoph Hellwig,
Chaitanya Kulkarni
Cc: linux-nvme, linux-doc
Guixin Liu <kanie@linux.alibaba.com> writes:
> This adds a document about nvme-multipath and policies supported
> by the Linux NVMe host driver, and also each policy's best scenario.
>
> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
> ---
> Hi,
> We found that we should take care of the throughput of each path in
> service-time policy, so separate the doc patch. And continue working
> on service-time policy patch.
>
> Changes from v1 to v2:
> - Remove service-tome policy.
>
> Documentation/nvme/nvme-multipath.rst | 72 +++++++++++++++++++++++++++
> 1 file changed, 72 insertions(+)
> create mode 100644 Documentation/nvme/nvme-multipath.rst
Thanks for working to improve our documentation.
When you add a new file, you need to add it to the relevant index.rst
file as well; if you had run a docs build, you would have seen a warning
about this.
I would also suggest that this material perhaps belongs in the admin
guide rather than in its own directory?
Thanks,
jon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH separete v2] docs, nvme: introduce nvme-multipath document
2024-12-06 14:42 ` Jonathan Corbet
@ 2024-12-09 1:34 ` Guixin Liu
0 siblings, 0 replies; 3+ messages in thread
From: Guixin Liu @ 2024-12-09 1:34 UTC (permalink / raw)
To: Jonathan Corbet, Keith Busch, Jens Axboe, Christoph Hellwig,
Chaitanya Kulkarni
Cc: linux-nvme, linux-doc
在 2024/12/6 22:42, Jonathan Corbet 写道:
> Guixin Liu <kanie@linux.alibaba.com> writes:
>
>> This adds a document about nvme-multipath and policies supported
>> by the Linux NVMe host driver, and also each policy's best scenario.
>>
>> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
>> ---
>> Hi,
>> We found that we should take care of the throughput of each path in
>> service-time policy, so separate the doc patch. And continue working
>> on service-time policy patch.
>>
>> Changes from v1 to v2:
>> - Remove service-tome policy.
>>
>> Documentation/nvme/nvme-multipath.rst | 72 +++++++++++++++++++++++++++
>> 1 file changed, 72 insertions(+)
>> create mode 100644 Documentation/nvme/nvme-multipath.rst
> Thanks for working to improve our documentation.
>
> When you add a new file, you need to add it to the relevant index.rst
> file as well; if you had run a docs build, you would have seen a warning
> about this.
>
> I would also suggest that this material perhaps belongs in the admin
> guide rather than in its own directory?
>
> Thanks,
>
> jon
Thanks, I dont know how documentation works, my bad, changed in v3.
Best Regards,
Guixin Liu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-09 1:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06 7:25 [PATCH separete v2] docs, nvme: introduce nvme-multipath document Guixin Liu
2024-12-06 14:42 ` Jonathan Corbet
2024-12-09 1:34 ` Guixin Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox