Slower speed with distributed multi-node training
Hi, I am running the IWSLT'14 en-de translation example on 2 machines each with 4 Titan X GPUs. I am getting speed of about 10K wps with 2 machines, while running on a single machine gives a speed of ~38K wps. Any tips for optimizing the speed, or whether I am missing something here? Thanks.
What version of NCCL are you using? There’s a known bug with the latest version of NCCL that makes it slow over Ethernet. Can you try using an older version of NCCL (2.3.x) or patching this: https://github.com/NVIDIA/nccl/pull/223
Some other settings you might explore:
- ddp-backend=no_c10d: This maybe even slower, but please confirm
- bucket-cap-mb: Try tuning this
Hi, thank you for your reply and I'll try your suggestions. Is there an easy way to check the NCCL version, and also to downgrade it to version 2.3.x? If I'm not wrong it comes with the PyTorch installation with pip.
If you rerun with the environment variable NCCL_DEBUG=INFO it will print debug information, including the version.
Apparently the NCCL version is 2.3.7 for both machines..
I also tried exploring the ddp-backend and bucket-cap-mb parameters (varying up to 150MB and more), but no significant differences in speed they are still ~4x slower than simply running on a single node with multi-gpu.
BTW, the 2 machines are interconnected through ethernet switch with 900M-1Gbps bandwidth, as I tested using iperf. Will I need to configure a cluster management like SLURM in order to make the distributed training work?
Ah, that interconnect is quite slow. How many params are in the model? Probably the interconnect is the bottleneck, so you’re spending most of the time communicating gradients.
The model has 42,864,640 params - it is the transformer_iwslt_de_en used in the example.