View a markdown version of this page

深度运行状况检查 - 亚马逊 SageMaker AI

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

深度运行状况检查

SageMaker HyperPod 在创建和更新集群期间,对集群实例执行深度运行状况检查。 HyperPod 您还可以使用 StartClusterHealthCheckAPI 按需请求对 SageMaker HyperPod 集群进行深度运行状况检查。深度运行状况检查通过测试底层硬件和基础设施组件来确保 SageMaker HyperPod集群的可靠性和稳定性。这种积极主动的方法有助于在集群生命周期的早期发现并减少潜在问题。

由以下人员完成的深度运行状况检查清单 SageMaker HyperPod

SageMaker HyperPod 运行以下深度运行状况检查。

Instance-level 深度健康检查

类别 实用程序名称 实例类型兼容性 说明
Accelerator GPU/NVLink count GPU 验证 GPU/NVLink 计数。
Accelerator 第 4 级 DCGM 诊断 GPU 通过运行第 4 级 DCGM(NVIDIA 数据中心 GPU 管理器)诊断程序(包括额外的内存测试),评测 NVIDIA GPU 的运行状况和功能。
Accelerator Neuron sysfs Trainium 例如, Trainium-powered 神经元设备的健康状况是通过读取神经元驱动程序直接传播的 Ne uron sysfs 中的计数器来确定的。
Accelerator Neuron 硬件检查 Trainium 运行训练工作负载并验证结果以测试硬件。
Accelerator NCCOM 本地测试 Trainium 评估单个 Trainium 节点上集体通信操作的性能
Network EFA GPU 和 Trainium 在连接的 EFA 设备上运行延迟和带宽基准测试。

Cluster-level 深度健康检查

类别 实用程序名称 实例类型兼容性 说明
Accelerator NCCL 测试 GPU 在多个 NVIDIA GPU 上验证集体通信操作的性能
Accelerator NCCOM 集群测试 Trainium 验证多个 Trainium 节点上集体通信操作的性能
使用灵活的实例组进行深度运行状况检查

对于使用InstanceRequirements多种实例类型的实例组,深度运行状况检查的行为如下:

  • Instance-level 深度运行状况检查仅在符合条件的 GPU 实例类型上运行。弹性实例组中的 CPU 实例类型将被跳过。

  • Cluster-level 连接测试(例如 NCCL AllReduce)仅在实例组中相同类型的实例之间运行。这样可以确保测试结果准确,反映每种实例类型的联网能力。

  • 如果启用了深度运行状况检查,则灵活实例组中必须至少有一个实例类型支持深度运行状况检查。

深度运行状况检查日志

以下是 SageMaker HyperPod 深度运行状况检查的示例日志。

Cluster-level logs

集群级别的深度运行状况检查日志存储在您的 CloudWatch 日志组中,网址为 /aws/sagemaker/Clusters/<cluster_name>/<cluster_id>

日志流记录在 DeepHealthCheckResults/<log_stream_id> 中。

如下图所示,深度运行状况检查输出日志显示了检查失败的实例 ID 和失败原因。

{ "level": "error", "ts": "2024-06-18T21:15:22Z", "msg": "Encountered FaultyInstance. Replace the Instance. Region: us-west-2, InstanceType: p4d.24xlarge. ERROR:Bandwidth has less than threshold: Expected minimum threshold :80,NCCL Test output Bw: 30" }

Instance-level logs

实例级深度运行状况检查日志存储在每个节点的 /var/log/aws/clusters/sagemaker-deep-health-check.log 中。通过 SSH 进入节点,运行以下命令打开日志文件。

cat /var/log/aws/clusters/sagemaker-deep-health-check.log

以下是硬件压力、NVIDIA DCGM 压力和 EFA 连接性测试的输出示例。

# Hardware Stress Test output 2024-08-20T21:53:58Z info Executing Hardware stress check with command: stress-ng, and args: [--cpu 32 --vm 2 --hdd 1 --fork 8 --switch 4 --timeout 60 --metrics] 2024-08-20T21:54:58Z info stress-ng success 2024-08-20T21:54:58Z info GpuPci Count check success # DCGM Stress Test 2024-08-20T22:25:02Z info DCGM diagnostic health summary: dcgmCheckLevel: 0 dcgmVersion: 3.3.7 gpuDriverVersion: 535.183.01, gpuDeviceIds: [2237] replacementRequired: false rebootRequired:false # EFA Loopback Test 2024-08-20T22:26:28Z info EFA Loopback check passed for device: rdmap0s29 . Output summary is MaxBw: 58.590000, AvgBw: 32.420000, MaxTypicalLat: 30.870000, MinTypicalLat: 20.080000, AvgLat: 21.630000

以下是 NCCL 连接性测试的输出示例。

# size count type redop root time algbw busbw #wrong time algbw busbw #wrong # (B) (elements) (us) (GB/s) (GB/s) (us) (GB/s) (GB/s) 8 2 float sum -1 353.9 0.00 0.00 0 304.2 0.00 0.00 0 16 4 float sum -1 352.8 0.00 0.00 0 422.9 0.00 0.00 0 32 8 float sum -1 520.0 0.00 0.00 0 480.3 0.00 0.00 0 64 16 float sum -1 563.0 0.00 0.00 0 416.1 0.00 0.00 0 128 32 float sum -1 245.1 0.00 0.00 0 308.4 0.00 0.00 0 256 64 float sum -1 310.8 0.00 0.00 0 304.9 0.00 0.00 0 512 128 float sum -1 304.9 0.00 0.00 0 300.8 0.00 0.00 0 1024 256 float sum -1 509.3 0.00 0.00 0 495.4 0.00 0.00 0 2048 512 float sum -1 530.3 0.00 0.00 0 420.0 0.00 0.00 0 4096 1024 float sum -1 391.2 0.01 0.01 0 384.5 0.01 0.01 0 8192 2048 float sum -1 328.5 0.02 0.02 0 253.2 0.03 0.03 0 16384 4096 float sum -1 497.6 0.03 0.03 0 490.9 0.03 0.03 0 32768 8192 float sum -1 496.7 0.07 0.07 0 425.0 0.08 0.08 0 65536 16384 float sum -1 448.0 0.15 0.15 0 501.0 0.13 0.13 0 131072 32768 float sum -1 577.4 0.23 0.23 0 593.4 0.22 0.22 0 262144 65536 float sum -1 757.8 0.35 0.35 0 721.6 0.36 0.36 0 524288 131072 float sum -1 1057.1 0.50 0.50 0 1019.1 0.51 0.51 0 1048576 262144 float sum -1 1460.5 0.72 0.72 0 1435.6 0.73 0.73 0 2097152 524288 float sum -1 2450.6 0.86 0.86 0 2583.1 0.81 0.81 0 4194304 1048576 float sum -1 4344.5 0.97 0.97 0 4419.3 0.95 0.95 0 8388608 2097152 float sum -1 8176.5 1.03 1.03 0 8197.8 1.02 1.02 0 16777216 4194304 float sum -1 15312 1.10 1.10 0 15426 1.09 1.09 0 33554432 8388608 float sum -1 30149 1.11 1.11 0 29941 1.12 1.12 0 67108864 16777216 float sum -1 57819 1.16 1.16 0 58635 1.14 1.14 0 134217728 33554432 float sum -1 115699 1.16 1.16 0 115331 1.16 1.16 0 268435456 67108864 float sum -1 227507 1.18 1.18 0 228047 1.18 1.18 0 536870912 134217728 float sum -1 453751 1.18 1.18 0 456595 1.18 1.18 0 1073741824 268435456 float sum -1 911719 1.18 1.18 0 911808 1.18 1.18 0 2147483648 536870912 float sum -1 1804971 1.19 1.19 0 1806895 1.19 1.19 0 2024-08-20T16:22:43.831-07:00 # Out of bounds values : 0 OK 2024-08-20T16:22:43.831-07:00 # Avg bus bandwidth : 0.488398 2024-08-20T23:22:43Z info Nccl test successful. Summary: NcclMaxAlgoBw: 1.190000, NcclAvgAlgoBw: 0.488398, NcclThresholdAlgoBw: 1.180000, NcclOutOfBoundError: OK, NcclOperations: all_reduce_perf, NcclTotalDevices: 2, NcclNodes: 2, NcclClusterMessage: