Straggler Problem Analysis

Before executing a memory copy task, the collective communication operator at the local end needs to perform a pre-synchronization with the remote end to ensure that the remote end is ready to receive data. If the remote end has not executed the communication operator, the local end needs to wait until it does. The Notify Wait time is counted in the execution time of the communication operator, resulting in slow performance. This is called the common straggler effect.

As shown in the preceding figure, device 1 has executed the AllReduce operator, but device 0 has not. The Notify Wait time is counted in the time consumed by the AllReduce operator on device 1. You need to locate the cause of the operator execution straggler problem between the devices. The common causes are as follows:

  • The performance of the upstream compute operator fluctuates.
  • The communication operator dispatch encounters a bottleneck. For example, the communication operator on the slow device is not dispatched promptly due to other behaviors on the host.