本頁說明如何在 GKE 叢集上執行 NCCL/gIB 測試。請選擇適合你機型的步驟:
A4X
連線至叢集:
gcloud container clusters get-credentials CLUSTER_NAME \ --location=COMPUTE_REGION請替換下列變數:
CLUSTER_NAME:叢集名稱。如果是使用 Cluster Toolkit 建立的叢集,名稱會以DEPLOYMENT_NAME為依據。COMPUTE_REGION:運算區域的名稱。
使用 gke-a4x/nccl-jobset-example.yaml 檔案,部署啟用 TAS 的全體集合 NCCL 效能測試:
這項測試預設會使用特定數量的節點。如要變更節點數量,請修改 YAML 檔案,將下列值變更為所需的節點數量:
numNodesparallelismcompletionsN_NODES
建立資源來執行測試:
kubectl create -f ~/cluster-toolkit/examples/gke-a4x/nccl-jobset-example.yaml
確認所有
nccl-testPod 都已達到Completed狀態:kubectl get pods畫面會顯示如下的輸出內容:
nccl-all-worker-0-0-ft8jm 0/1 Completed 0 13m nccl-all-worker-0-1-prpvw 0/1 Completed 0 13m找出符合
nccl-all-worker-0-0-*模式的 Pod 名稱。這個 Pod 的記錄檔包含 NCCL 測試結果。如要擷取這個 Pod 的記錄,請執行下列指令:
kubectl logs $(kubectl get pods -o go-template='{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' | grep nccl-all-worker-0-0)
畫面會顯示如下的輸出內容:
# out-of-place in-place # 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) 1024 32 float none -1 19.60 0.05 0.05 0 19.00 0.05 0.05 0 2048 64 float none -1 19.63 0.10 0.09 0 19.47 0.11 0.09 0 4096 128 float none -1 19.88 0.21 0.18 0 19.61 0.21 0.18 0 8192 256 float none -1 20.31 0.40 0.35 0 19.82 0.41 0.36 0 16384 512 float none -1 20.30 0.81 0.71 0 20.17 0.81 0.71 0 32768 1024 float none -1 20.70 1.58 1.39 0 20.36 1.61 1.41 0 65536 2048 float none -1 20.94 3.13 2.74 0 20.88 3.14 2.75 0 131072 4096 float none -1 21.12 6.20 5.43 0 20.96 6.25 5.47 0 262144 8192 float none -1 21.24 12.34 10.80 0 21.01 12.48 10.92 0 524288 16384 float none -1 21.28 24.63 21.55 0 21.07 24.88 21.77 0 1048576 32768 float none -1 21.95 47.77 41.80 0 21.72 48.28 42.24 0 2097152 65536 float none -1 24.15 86.85 76.00 0 23.75 88.30 77.26 0 4194304 131072 float none -1 31.50 133.13 116.49 0 30.75 136.39 119.34 0 8388608 262144 float none -1 47.42 176.88 154.77 0 46.47 180.51 157.95 0 16777216 524288 float none -1 48.72 344.39 301.34 0 47.85 350.63 306.80 0 33554432 1048576 float none -1 75.08 446.91 391.05 0 73.89 454.10 397.34 0 67108864 2097152 float none -1 178.7 375.47 328.53 0 179.1 374.67 327.84 0 134217728 4194304 float none -1 211.1 635.86 556.37 0 211.3 635.21 555.81 0 268435456 8388608 float none -1 413.2 649.68 568.47 0 414.9 646.95 566.08 0 536870912 16777216 float none -1 820.1 654.64 572.81 0 814.9 658.81 576.46 0 1073741824 33554432 float none -1 1566.5 685.43 599.76 0 1567.9 684.82 599.22 0 2147483648 67108864 float none -1 3025.3 709.83 621.10 0 3017.2 711.74 622.77 0 4294967296 134217728 float none -1 5898.8 728.11 637.10 0 5784.0 742.57 649.74 0 8589934592 268435456 float none -1 11541 744.31 651.28 0 11293 760.67 665.58 0 # Out of bounds values : 0 OK # Avg bus bandwidth : 236.839
A4
連線至叢集:
gcloud container clusters get-credentials CLUSTER_NAME \ --location=COMPUTE_REGION請替換下列變數:
CLUSTER_NAME:叢集名稱。如果是使用 Cluster Toolkit 建立的叢集,名稱會以DEPLOYMENT_NAME為依據。COMPUTE_REGION:運算區域的名稱。
使用 gke-a4/nccl-jobset-example.yaml 檔案,部署啟用 TAS 的全體集合 NCCL 效能測試:
如符合條件,請透過下列方式修改 YAML 檔案:
測試預設會使用特定數量的節點。如要變更節點數,請將下列值改為所需的節點數:
parallelismcompletionsN_NODES
如要測試由彈性啟動佈建的節點,請在
metadata欄位中執行下列操作:- 將
kueue.x-k8s.io/queue-name值替換為dws-local-queue。 新增下列註解:
annotations: provreq.kueue.x-k8s.io/maxRunDurationSeconds: "600"
- 將
建立資源來執行測試:
kubectl create -f ~/cluster-toolkit/examples/gke-a4/nccl-jobset-example.yaml這個指令會傳回 JobSet 名稱。
畫面會顯示如下的輸出內容:
jobset.jobset.x-k8s.io/all-gather8t7dt created
如要查看 NCCL 測試結果,請執行下列指令來查看所有執行中的 Pod:
kubectl get pods畫面會顯示如下的輸出內容:
NAME READY STATUS RESTARTS AGE all-gather8t7dt-w-0-0-n9s6j 0/1 Completed 0 9m34s all-gather8t7dt-w-0-1-rsf7r 0/1 Completed 0 9m34s找出符合
jobset-name-w-0-0-*模式的 Pod 名稱。這個 Pod 的記錄包含 NCCL 測試結果。如要擷取這個 Pod 的記錄,請執行下列指令:
kubectl logs all-gather8t7dt-w-0-0-n9s6j畫面會顯示如下的輸出內容:
# 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) 1024 16 float none -1 54.07 0.02 0.02 0 55.80 0.02 0.02 0 2048 32 float none -1 55.46 0.04 0.03 0 55.31 0.04 0.03 0 4096 64 float none -1 55.59 0.07 0.07 0 55.38 0.07 0.07 0 8192 128 float none -1 56.05 0.15 0.14 0 55.92 0.15 0.14 0 16384 256 float none -1 57.08 0.29 0.27 0 57.75 0.28 0.27 0 32768 512 float none -1 57.49 0.57 0.53 0 57.22 0.57 0.54 0 65536 1024 float none -1 59.20 1.11 1.04 0 59.20 1.11 1.04 0 131072 2048 float none -1 59.58 2.20 2.06 0 63.57 2.06 1.93 0 262144 4096 float none -1 63.87 4.10 3.85 0 63.61 4.12 3.86 0 524288 8192 float none -1 64.83 8.09 7.58 0 64.40 8.14 7.63 0 1048576 16384 float none -1 79.74 13.15 12.33 0 76.66 13.68 12.82 0 2097152 32768 float none -1 78.41 26.74 25.07 0 79.05 26.53 24.87 0 4194304 65536 float none -1 83.21 50.41 47.26 0 81.25 51.62 48.39 0 8388608 131072 float none -1 94.35 88.91 83.35 0 99.07 84.68 79.38 0 16777216 262144 float none -1 122.9 136.55 128.02 0 121.7 137.83 129.21 0 33554432 524288 float none -1 184.2 182.19 170.80 0 178.1 188.38 176.60 0 67108864 1048576 float none -1 294.7 227.75 213.51 0 277.7 241.62 226.52 0 134217728 2097152 float none -1 495.4 270.94 254.00 0 488.8 274.60 257.43 0 268435456 4194304 float none -1 877.5 305.92 286.80 0 861.3 311.65 292.17 0 536870912 8388608 float none -1 1589.8 337.71 316.60 0 1576.2 340.61 319.33 0 1073741824 16777216 float none -1 3105.7 345.74 324.13 0 3069.2 349.85 327.98 0 2147483648 33554432 float none -1 6161.7 348.52 326.74 0 6070.7 353.75 331.64 0 4294967296 67108864 float none -1 12305 349.03 327.22 0 12053 356.35 334.08 0 8589934592 134217728 float none -1 24489 350.77 328.85 0 23991 358.05 335.67 0 # Out of bounds values : 0 OK # Avg bus bandwidth : 120.248
A3 Ultra
連線至叢集:
gcloud container clusters get-credentials CLUSTER_NAME \ --location=COMPUTE_REGION請替換下列變數:
CLUSTER_NAME:叢集名稱。如果是使用 Cluster Toolkit 建立的叢集,名稱會以DEPLOYMENT_NAME為依據。COMPUTE_REGION:運算區域的名稱。
使用 gke-a3-ultragpu/nccl-jobset-example.yaml 檔案,部署啟用 TAS 的全體集合 NCCL 效能測試:
如符合條件,請透過下列方式修改 YAML 檔案:
測試預設會使用特定數量的節點。如要變更節點數,請將下列值改為所需的節點數:
parallelismcompletionsN_NODES
如要測試由彈性啟動佈建的節點,請在
metadata欄位中執行下列操作:- 將
kueue.x-k8s.io/queue-name值替換為dws-local-queue。 新增下列註解:
annotations: provreq.kueue.x-k8s.io/maxRunDurationSeconds: "600"
- 將
建立資源來執行測試:
kubectl create -f ~/cluster-toolkit/examples/gke-a3-ultragpu/nccl-jobset-example.yaml這個指令會傳回 JobSet 名稱。
畫面會顯示如下的輸出內容:
jobset.jobset.x-k8s.io/all-gather8t7dt created
如要查看 NCCL 測試結果,請執行下列指令來查看所有執行中的 Pod:
kubectl get pods畫面會顯示如下的輸出內容:
NAME READY STATUS RESTARTS AGE all-gather8t7dt-w-0-0-n9s6j 0/1 Completed 0 9m34s all-gather8t7dt-w-0-1-rsf7r 0/1 Completed 0 9m34s找出符合
jobset-name-w-0-0-*模式的 Pod 名稱。這個 Pod 的記錄包含 NCCL 測試結果。如要擷取這個 Pod 的記錄,請執行下列指令:
kubectl logs all-gather8t7dt-w-0-0-n9s6j畫面會顯示如下的輸出內容:
# 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) 1024 16 float none -1 54.07 0.02 0.02 0 55.80 0.02 0.02 0 2048 32 float none -1 55.46 0.04 0.03 0 55.31 0.04 0.03 0 4096 64 float none -1 55.59 0.07 0.07 0 55.38 0.07 0.07 0 8192 128 float none -1 56.05 0.15 0.14 0 55.92 0.15 0.14 0 16384 256 float none -1 57.08 0.29 0.27 0 57.75 0.28 0.27 0 32768 512 float none -1 57.49 0.57 0.53 0 57.22 0.57 0.54 0 65536 1024 float none -1 59.20 1.11 1.04 0 59.20 1.11 1.04 0 131072 2048 float none -1 59.58 2.20 2.06 0 63.57 2.06 1.93 0 262144 4096 float none -1 63.87 4.10 3.85 0 63.61 4.12 3.86 0 524288 8192 float none -1 64.83 8.09 7.58 0 64.40 8.14 7.63 0 1048576 16384 float none -1 79.74 13.15 12.33 0 76.66 13.68 12.82 0 2097152 32768 float none -1 78.41 26.74 25.07 0 79.05 26.53 24.87 0 4194304 65536 float none -1 83.21 50.41 47.26 0 81.25 51.62 48.39 0 8388608 131072 float none -1 94.35 88.91 83.35 0 99.07 84.68 79.38 0 16777216 262144 float none -1 122.9 136.55 128.02 0 121.7 137.83 129.21 0 33554432 524288 float none -1 184.2 182.19 170.80 0 178.1 188.38 176.60 0 67108864 1048576 float none -1 294.7 227.75 213.51 0 277.7 241.62 226.52 0 134217728 2097152 float none -1 495.4 270.94 254.00 0 488.8 274.60 257.43 0 268435456 4194304 float none -1 877.5 305.92 286.80 0 861.3 311.65 292.17 0 536870912 8388608 float none -1 1589.8 337.71 316.60 0 1576.2 340.61 319.33 0 1073741824 16777216 float none -1 3105.7 345.74 324.13 0 3069.2 349.85 327.98 0 2147483648 33554432 float none -1 6161.7 348.52 326.74 0 6070.7 353.75 331.64 0 4294967296 67108864 float none -1 12305 349.03 327.22 0 12053 356.35 334.08 0 8589934592 134217728 float none -1 24489 350.77 328.85 0 23991 358.05 335.67 0 # Out of bounds values : 0 OK # Avg bus bandwidth : 120.248
後續步驟
- 收集並解讀 NCCL 記錄以進行疑難排解,瞭解測試輸出內容並排解問題。
- 瞭解如何排解效能緩慢的問題。