Skip to content

Add AWS EFA networking guide for running DGXC benchmarks on P5en (H200) and P6-B200 (B200) - #39

Open
paragao wants to merge 1 commit into
NVIDIA:mainfrom
paragao:aws-specific-support
Open

Add AWS EFA networking guide for running DGXC benchmarks on P5en (H200) and P6-B200 (B200)#39
paragao wants to merge 1 commit into
NVIDIA:mainfrom
paragao:aws-specific-support

Conversation

@paragao

@paragao paragao commented Mar 11, 2026

Copy link
Copy Markdown

Summary

  • Add a comprehensive guide and supporting files for running DGXC pretrain benchmarks on AWS GPU instances (P5en/H200, P6-B200/B200) that use Elastic Fabric Adapter (EFA) instead of InfiniBand
  • Document a critical NCCL plugin naming bug (NCCL 2.29+ looks for libnccl-net-aws-ofi.so but EFA installer names it libnccl-net-ofi.so) that causes silent fallback to TCP sockets with ~23% performance degradation
  • Provide an EFA-upgraded container Dockerfile, four code patches, and troubleshooting procedures

Files Added

File Purpose
alternative_recipes/aws/README.md End-to-end guide (11 sections)
alternative_recipes/aws/container/nemo-efa-upgraded.Dockerfile EFA-upgraded NeMo container
alternative_recipes/aws/patches/executors.py.patch EFA env vars + NCCL tuning
alternative_recipes/aws/patches/launch.sh.patch Container image reference
alternative_recipes/aws/patches/perf_plugins.py.patch cuDNN fused RMSNorm preservation
alternative_recipes/aws/patches/llama3_llm_pretrain.py.patch os.fork() OOM fix for 70B

Testing

Tested end-to-end 3 times on an 8-node P5en (H200) cluster:

  • Fresh clone, Docker build, enroot import, llmb-install, patch apply, benchmark
  • All runs completed 50/50 iterations successfully (8B BF16, 64 GPUs)
  • Exit code 0 on all runs

Scope

  • Pretrain workloads + NCCL only
  • No benchmark performance numbers included
  • No inference, CloudWatch, or profiling content

…0) and P6-B200 (B200)

AWS GPU instances use Elastic Fabric Adapter (EFA) instead of InfiniBand.
The stock NeMo container has a critical NCCL plugin naming mismatch that
causes silent fallback to TCP sockets (~23% performance degradation).

This adds:
- EFA-upgraded container Dockerfile (EFA installer 1.47.0, NCCL 2.29.3,
  GDRCopy v2.5.1, plugin symlink fix, /etc/environment dump for Pyxis
  env var propagation)
- Four code patches: EFA env vars and NCCL tuning (executors.py),
  container image reference (launch.sh), cuDNN fused RMSNorm
  preservation (perf_plugins.py), os.fork() OOM fix for 70B models
  (llama3_llm_pretrain.py)
- Comprehensive guide covering prerequisites, build, enroot import,
  installer setup, patching, verification, cluster configuration
  examples, and troubleshooting

Validated end-to-end on H200 P5en cluster: 8B bf16 pretrain on 64 GPUs
(8 nodes) completed successfully with EFA active.

@sudostock sudostock left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paragao Thanks for the PR!

After reviewing, I think the biggest win from this is the instructions on updating EFA libraries in the container if needed for perf reasons or container age.

I'll start paring down the docs to focus on that in the next few days.

Comment on lines +25 to +29
### The NCCL Plugin Naming Bug

NCCL 2.29+ uses `shinit_v2`, which sets `NCCL_NET_PLUGIN=aws-ofi`. This tells NCCL to search for a shared library named `libnccl-net-aws-ofi.so`. However, the AWS EFA installer packages the plugin as `libnccl-net-ofi.so` (without the `aws-` prefix).

**If NCCL cannot find the plugin by the expected name, it silently falls back to TCP sockets.** There is no error message -- only degraded performance. The fix is to create symlinks in the container image (see [Section 3](#3-build-the-efa-upgraded-container)).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a bug, the earlier container versions renamed the aws ofi library to 'aws-ofi' and adjusted paths and such accordingly.

Newer containers don't do this anymore.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general we don't allow model config changes for our benchmarks to still be considered apples to apples.

The changes here and in llama3_llm_pretrain will be tested internally to see if they broadly improve performance.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be set in the environment var section of cluster_config.yaml file instead of editing source.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as executors

export FW_VERSION=25.11.01

-export IMAGE=${RUN_CONF_IMAGE:-$LLMB_INSTALL/images/nvidia+nemo+$FW_VERSION.sqsh}
+export IMAGE=${RUN_CONF_IMAGE:-$LLMB_INSTALL/images/nvidia+nemo+${FW_VERSION}-efa-nccl29.sqsh}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Symlink the updated image to the expected name would be better and less error prone than updating all the launch.sh scripts.

@paragao

paragao commented Jul 30, 2026

Copy link
Copy Markdown
Author

@sudostock thank you for reviewing this. Please, find updated instructions on how to create a container with the proper software stack here: https://github.com/awslabs/awsome-distributed-ai/blob/main/micro-benchmarks/nccl-tests/nccl-tests.Dockerfile

(this is maintained and kept updated by my team)

Those are the recommendations we are using with customers and are providing the best performance possible:

  • GDRCOPY_VERSION=v2.5.2
  • EFA_INSTALLER_VERSION=1.48.0
  • NCCL_VERSION=v2.30.4-1

CUDA can be 12.9+ depending on your GPU. Important to include that with the newer EFA Installer, the old environment variables for EFA (such as FI_USE_HUGE_PAGE=0 or FI_EFA_DEVICE_RDMA=1) shouldn't be set anymore. They are picked up by the OFI Tuner plugin, when required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants