引用本文: | 张杨,李柳旭.并行程序中同步瓶颈的检测和优化方法[J].国防科技大学学报,2022,44(5):92-101.[点击复制] |
ZHANG Yang,LI Liuxu.Detection and optimization approaches for synchronization bottlenecks in parallel programs[J].Journal of National University of Defense Technology,2022,44(5):92-101[点击复制] |
|
|
|
本文已被:浏览 3980次 下载 3144次 |
并行程序中同步瓶颈的检测和优化方法 |
张杨,李柳旭 |
(河北科技大学 信息科学与工程学院, 河北 石家庄 050018)
|
摘要: |
针对并发程序中锁的不当使用可能导致性能瓶颈的问题,提出检测和优化并发程序中同步瓶颈的方法IdeSync。IdeSync使用静态分析方法获取同步方法和同步块,构建静态同步依赖图,采用基于执行路径的动态分析技术进行同步依赖关系分析,构建同步依赖图。为了暴露性能瓶颈,在同步依赖图上通过增加程序工作负载的方式,监测临界区的性能变化,并针对检测到的同步瓶颈给出优化建议。在实验中通过HSQLDB、SPECjbb2005和RxJava等12个大型实际应用程序对IdeSync的有效性进行验证,共检测到72个同步瓶颈,根据优化建议进行优化后程序性能均有所提升。实验表明,IdeSync能够有效地检测和优化同步瓶颈。 |
关键词: 同步瓶颈 并行程序 锁 性能优化 程序分析 |
DOI:10.11887/j.cn.202205010 |
投稿日期:2021-12-23 |
基金项目:国家自然科学基金资助项目(61440012);河北省高等学校科学研究计划重点资助项目(ZD2019093) |
|
Detection and optimization approaches for synchronization bottlenecks in parallel programs |
ZHANG Yang, LI Liuxu |
(School of Information Science and Engineering, Hebei University of Science and Technology, Shijiazhuang 050018, China)
|
Abstract: |
Aiming at the problem that improper locks in parallel programs may lead to performance bottlenecks, an approach called IdeSync was proposed to detect and optimize synchronization bottlenecks. IdeSync leveraged the static analysis to obtain the synchronized methods and blocks, and constructed a static synchronization dependency graph. The dynamic analysis technology based on the execution path was used to analyze the synchronization dependency and build the synchronization dependency graph.In order to expose the performance bottleneck, the performance change of the critical section was monitored by increasing the program workload on the synchronization dependency graph, and optimization suggestions were given for the detected synchronization bottleneck. The effectiveness of IdeSync was evaluated with 12 large real-world applications such as HSQLDB, SPECjbb2005 and RxJava, and a total of 72 synchronization bottlenecks were detected. All these bottlenecks were optimized based on IdeSync′s suggestion to achieve performance improvements, which shows that IdeSync can effectively detect and optimize synchronization bottlenecks. |
Keywords: synchronization bottleneck parallele programs lock performance optimization program analysis |
|
|
|
|
|