ParaShareDetect: Dynamic Instrumentation and Runtime Analysis for False Sharing Detection in Parallel Computing
Junjie Su, Naijie Gu, Dongsheng Qi · 2024
Parallel computing environments, especially those using multicore processors, often suffer significant performance degradation due to false sharing, which occurs when threads on different cores accidentally compete for the same cache line. To tackle this challenge, this paper presents ParaShareDetect, a novel approach that utilizes a dynamic instrumentation mechanism alongside sophisticated runtime analysis, enabling the precise identification of false sharing instances. By integrating with the LLVM framework, a thorough evaluation of ParaShareDetect has been conducted, proving its effectiveness in accurately detecting false sharing scenarios across various benchmarks, including those from the highly esteemed Parsec and Phoenix benchmark suites. Moreover, ParaShareDetect has successfully identified false sharing issues that were not detected by other leading-edge tools, as illustrated by its findings in the bodytrack benchmark from Parsec. The evaluation further reveals that the methodology imposes an average performance overhead of approximately 3.86 times the original execution time, which is deemed acceptable in pre-production testing phases focused on software optimization. These results underscore the potential of ParaShareDetect to significantly improve the performance of multicore applications by addressing false sharing, all while maintaining a manageable level of overhead.