Dynamic cache contention detection in multi-threaded applications

Author:

Zhao Qin1,Koh David1,Raza Syed1,Bruening Derek2,Wong Weng-Fai3,Amarasinghe Saman1

Affiliation:

1. Massachusetts Institute of Technology, Cambridge, MA, USA

2. Google Inc, Mountain View, CA, USA

3. National University of Singapore, Singapore, Singapore

Abstract

In today's multi-core systems, cache contention due to true and false sharing can cause unexpected and significant performance degradation. A detailed understanding of a given multi-threaded application's behavior is required to precisely identify such performance bottlenecks. Traditionally, however, such diagnostic information can only be obtained after lengthy simulation of the memory hierarchy. In this paper, we present a novel approach that efficiently analyzes interactions between threads to determine thread correlation and detect true and false sharing. It is based on the following key insight: although the slowdown caused by cache contention depends on factors including the thread-to-core binding and parameters of the memory hierarchy, the amount of data sharing is primarily a function of the cache line size and application behavior. Using memory shadowing and dynamic instrumentation, we implemented a tool that obtains detailed sharing information between threads without simulating the full complexity of the memory hierarchy. The runtime overhead of our approach --- a 5x slowdown on average relative to native execution --- is significantly less than that of detailed cache simulation. The information collected allows programmers to identify the degree of cache contention in an application, the correlation among its threads, and the sources of significant false sharing. Using our approach, we were able to improve the performance of some applications up to a factor of 12x. For other contention-intensive applications, we were able to shed light on the obstacles that prevent their performance from scaling to many cores.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference38 articles.

1. DynamoRIO dynamic instrumentation tool platform Feb. 2009. \bibtt http://dynamorio.org/. DynamoRIO dynamic instrumentation tool platform Feb. 2009. \bibtt http://dynamorio.org/.

2. Hoard

3. D. Bruening. Efficient Transparent and Comprehensive Runtime Code Manipulation. PhD thesis M.I.T. Sept. 2004. D. Bruening. Efficient Transparent and Comprehensive Runtime Code Manipulation. PhD thesis M.I.T. Sept. 2004.

Cited by 22 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. MemPerf: Profiling Allocator-Induced Performance Slowdowns;Proceedings of the ACM on Programming Languages;2023-10-16

2. PInTE: Probabilistic Induction of Theft Evictions;2022 IEEE International Symposium on Workload Characterization (IISWC);2022-11

3. Performance Modeling for Short-Term Cache Allocation;Proceedings of the 51st International Conference on Parallel Processing;2022-08-29

4. Playing Fetch with CAT;Proceedings of the 17th International Workshop on Data Management on New Hardware (DaMoN 2021);2021-06-20

5. Firmware code instrumentation technology for internet of things-based services;World Wide Web;2020-09-26

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3