

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

# 深度运行状况检查
<a name="sagemaker-hyperpod-eks-resiliency-deep-health-checks"></a>

SageMaker HyperPod 在创建和更新集群期间，对集群实例执行*深度运行状况检查*。 HyperPod 在允许 SageMaker HyperPod 集群用于训练机器学习模型之前，深度运行状况检查会对底层硬件和基础设施组件进行全面测试，从而确保集群的可靠性和稳定性。这种积极主动的方法有助于在集群生命周期的早期发现并减少潜在问题。

## 由以下人员完成的深度运行状况检查列表 SageMaker HyperPod
<a name="sagemaker-hyperpod-eks-resiliency-deep-health-checks-list"></a>

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

**实例级深度运行状况检查**


| 类别 | 实用程序名称 | 实例类型兼容性 | 说明 | 
| --- | --- | --- | --- | 
| Accelerator | GPU/ 计数 NVLink  | GPU | 验证 GPU/NVLink 计数。 | 
| Accelerator | 第 4 级 [DCGM 诊断](https://docs.nvidia.com/datacenter/dcgm/latest/user-guide/dcgm-diagnostics.html) | GPU |  GPUs 通过在第 4 级运行 DCGM（NVIDIA 数据中心 GPU 管理器）诊断（包括额外的内存测试）来评估 NVIDIA 的运行状况和功能。 | 
| Accelerator | Neuron sysfs | Trainium | 对于 Trainium-powered 实例，Neuron 设备的运行状况由 Neuron 驱动程序直接从 [Neuron sysfs](https://awsdocs-neuron.readthedocs-hosted.com/en/latest/tools/neuron-sys-tools/neuron-sysfs-user-guide.html) 中读取计数器来确定。 | 
| Accelerator | Neuron 硬件检查 | Trainium | 运行训练工作负载并验证结果以测试硬件。 | 
| Accelerator | NCCOM 本地测试 | Trainium | 评估单个 Trainium 节点上集体通信操作的性能 | 
| Network | EFA | GPU 和 Trainium | 在连接的 EFA 设备上运行延迟和带宽基准测试。 | 

**集群级深度运行状况检查**


| 类别 | 实用程序名称 | 实例类型兼容性 | 说明 | 
| --- | --- | --- | --- | 
| Accelerator | NCCL 测试 | GPU | 验证多个 NVIDIA 上集体通信操作的性能 GPUs | 
| Accelerator | NCCOM 集群测试 | Trainium | 验证多个 Trainium 节点上集体通信操作的性能 | 

## 深度运行状况检查日志
<a name="sagemaker-hyperpod-eks-resiliency-deep-health-checks-log"></a>

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

**集群级日志** 

集群级别的深度运行状况检查日志存储在您的 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"
}
```

**实例级日志** 

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

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

以下是硬件压力、[NVIDIA DCGM](https://developer.nvidia.com/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:
```