[Paper Review] In-Situ Assessment of Device-Side Compute Work for Dynamic Load Balancing in a GPU-Accelerated PIC Code
This paper proposes GPU-optimized in-situ dynamic load balancing for the WarpX particle-in-cell code by introducing real-time, low-overhead measurement of device-side compute work using GPU clock timers. The method achieves 62–74% of theoretical maximum speedup on 6144 GPUs (88% on 6 GPUs), significantly outperforming static load balancing and baseline unbalanced runs, with a 3.8× speedup over no load balancing in laser-ion acceleration simulations.
Maintaining computational load balance is important to the performant behavior of codes which operate under a distributed computing model. This is especially true for GPU architectures, which can suffer from memory oversubscription if improperly load balanced. We present enhancements to traditional load balancing approaches and explicitly target GPU architectures, exploring the resulting performance. A key component of our enhancements is the introduction of several GPU-amenable strategies for assessing compute work. These strategies are implemented and benchmarked to find the most optimal data collection methodology for in-situ assessment of GPU compute work. For the fully kinetic particle-in-cell code WarpX, which supports MPI+CUDA parallelism, we investigate the performance of the improved dynamic load balancing via a strong scaling-based performance model and show that, for a laser-ion acceleration test problem run with up to 6144 GPUs on Summit, the enhanced dynamic load balancing achieves from 62%--74% (88% when running on 6 GPUs) of the theoretically predicted maximum speedup; for the 96-GPU case, we find that dynamic load balancing improves performance relative to baselines without load balancing (3.8x speedup) and with static load balancing (1.2x speedup). Our results provide important insights into dynamic load balancing and performance assessment, and are particularly relevant in the context of distributed memory applications ran on GPUs.
Motivation & Objective
- Address performance degradation in GPU-accelerated, distributed-memory particle-in-cell codes due to load imbalance from highly mobile particles.
- Develop GPU-specific, in-situ techniques to measure compute work at runtime with minimal performance overhead.
- Improve dynamic load balancing in WarpX to enhance strong and weak scaling performance on large GPU clusters.
- Evaluate the impact of different cost assessment strategies (heuristic, GPU clock, CUPTI) on load balancing efficiency and performance.
- Demonstrate that dynamic load balancing is essential for efficient use of limited GPU memory at scale in realistic plasma physics simulations.
Proposed method
- Implement in-situ, in-kernel GPU clock timing to measure actual kernel execution time for sub-domain compute work, minimizing overhead.
- Introduce a vendor-neutral, runtime measurement strategy using GPU hardware clocks instead of profiling APIs like CUPTI.
- Integrate the measured compute costs into a dynamic load balancing framework using the AMReX block-structured mesh framework.
- Apply load balancing strategies such as knapsack and space-filling curves (SFC) to redistribute work across GPUs based on measured compute costs.
- Use strong scaling performance modeling to predict theoretical maximum speedup and compare it with observed improvements.
- Benchmark performance across varying configurations: number of particles, box size per GPU, load balancing frequency, and cost function choice.
Experimental results
Research questions
- RQ1How does in-situ GPU clock-based compute work measurement compare to CUPTI-based timing in terms of accuracy and performance overhead?
- RQ2What is the impact of different cost assignment strategies (heuristic vs. actual kernel timing) on dynamic load balancing performance in WarpX?
- RQ3To what extent does dynamic load balancing improve strong and weak scaling performance in GPU-accelerated PIC simulations?
- RQ4How does the choice of load balancing algorithm (knapsack vs. SFC) affect performance and load balance efficiency?
- RQ5What level of load imbalance reduction is required to achieve near-theoretical speedup in large-scale GPU simulations?
Key findings
- The GPU clock-based in-situ measurement of compute work achieves negligible load-balancing overhead in practice, unlike CUPTI-based approaches which add significant runtime cost.
- For the laser-ion acceleration test case on Summit with 6144 GPUs, dynamic load balancing achieves 62–74% of the theoretically predicted maximum speedup, with 88% efficiency on 6 GPUs.
- Dynamic load balancing provides a 3.8× speedup over the baseline without load balancing and a 1.2× speedup over static load balancing in the 96-GPU case.
- The performance model based on strong scaling confirms that load imbalance is a major bottleneck, and dynamic load balancing is essential for achieving high efficiency at scale.
- Dynamic load balancing is de facto necessary for productive use of distributed, locally limited GPU memory in large-scale simulations.
- The results suggest that incorporating communication costs into the load balancing routine could further close the gap between observed and theoretical performance limits.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.