<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>性能调优 - 分类 - 集合通信博客</title><link>https://hccl.club/categories/%E6%80%A7%E8%83%BD%E8%B0%83%E4%BC%98/</link><description>性能调优 - 分类 - 集合通信博客</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Tue, 10 Nov 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://hccl.club/categories/%E6%80%A7%E8%83%BD%E8%B0%83%E4%BC%98/" rel="self" type="application/rss+xml"/><item><title>nccl-tests 与带宽指标：algbw / busbw</title><link>https://hccl.club/docs/tuning/nccl-tests-and-bandwidth-metrics/</link><pubDate>Sat, 07 Nov 2026 10:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/docs/tuning/nccl-tests-and-bandwidth-metrics/</guid><description><![CDATA[<p>调优集合通信（Collective Communication）的第一步不是改参数，而是拿到一份可信的基线（baseline）：不先量化，就无法判断任何改动是变好还是变坏。nccl-tests 是 NVIDIA 官方维护的 NCCL 基准测试（benchmark）工具集，能以极低的成本回答&quot;我的 AllReduce 到底能跑多快&quot;这个最基本的问题。</p>
<p>本文介绍 nccl-tests 的工具家族、编译与单机/多机运行方法，重点讲清输出中最容易被误读的两个指标——算法带宽（algorithm bandwidth，algbw）与总线带宽（bus bandwidth，busbw），以及如何用它们对照硬件规格建立&quot;达标线&quot;。</p>]]></description></item><item><title>NCCL 环境变量调优</title><link>https://hccl.club/docs/tuning/nccl-env-tuning/</link><pubDate>Sun, 08 Nov 2026 10:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/docs/tuning/nccl-env-tuning/</guid><description><![CDATA[<p>拿到 nccl-tests 的基线（baseline）之后（见<a href="/docs/tuning/nccl-tests-and-bandwidth-metrics/" rel="">nccl-tests 与带宽指标</a>），环境变量（environment variables）就是 NCCL 最直接的调优与诊断旋钮：走哪条网络路径、开多少通道、用哪个算法与协议，几乎都能在不改一行训练代码的情况下控制。</p>
<p>但环境变量也是最容易制造混乱的东西：一次改五个，效果好坏都说不清原因。本文按&quot;调试、选网、并发度、特性开关、算法协议强制&quot;五类整理最常用的一批变量，每个只讲一句话作用，再给一张典型场景组合表。使用纪律只有一条：<strong>先量再调，一次只改一个变量</strong>，每次改动后回到同一份基线复测。</p>]]></description></item><item><title>NCCL 常见故障排查</title><link>https://hccl.club/docs/tuning/nccl-troubleshooting/</link><pubDate>Mon, 09 Nov 2026 10:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/docs/tuning/nccl-troubleshooting/</guid><description><![CDATA[<p>&ldquo;NCCL 挂了&quot;是一类问题的统称：可能是网络不通导致的 hang，可能是 GPU 或 IB 链路的硬件报错，也可能只是拓扑识别错误带来的性能劣化。排查的第一原则是分层定位（driver / network / NCCL / framework），而不是一上来就改环境变量。</p>
<p><code>NCCL_DEBUG=INFO</code> 是第一工具：它把版本、拓扑探测、通道划分、传输路径选择和初始化进度全部打进日志，绝大多数&quot;慢&quot;和&quot;挂&quot;都能在日志里找到特征行。本文按 hang、报错、性能劣化三类症状给出排查路径，并整理成一份 checklist。</p>]]></description></item><item><title>用 Nsight Systems 度量通信</title><link>https://hccl.club/docs/tuning/profiling-comm-with-nsys/</link><pubDate>Tue, 10 Nov 2026 10:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/docs/tuning/profiling-comm-with-nsys/</guid><description><![CDATA[<p>nccl-tests 回答的是&quot;链路最多能跑多快&quot;，但训练慢未必是链路慢：可能是通信没有与计算重叠，可能是梯度桶（bucket）切得太碎，也可能恰恰是通信 kernel 抢了计算 kernel 的 SM。这些结构性的问题在聚合指标里不可见，必须看时间线（timeline）。</p>
<p>Nsight Systems（nsys）是 NVIDIA 的系统级剖析器（profiler），能把 CUDA kernel、stream、NVTX 标注与操作系统线程（包括 NCCL 的网络代理线程）画在同一条时间轴上，是回答&quot;通信在训练里到底发生了什么&quot;的首选工具。本文覆盖采集、解读、占比统计与典型模式识别。</p>]]></description></item></channel></rss>