【24h】

Sheriff: Precise Detection and Automatic Mitigation of False Sharing

机译:治安官:精确的检测和自动缓解错误分享

获取原文

摘要

False sharing is an insidious problem for multithreaded programs running on multicore processors, where it can silently degrade performance and scalability. Previous tools for detecting false sharing are severely limited: they cannot distinguish false sharing from true sharing, have high false positive rates, and provide limited assistance to help programmers locate and resolve false sharing. This paper presents two tools that attack the problem of false sharing: Sheriff-Detect and Sheriff-Protect. Both tools leverage a framework we introduce here called Sheriff. Sheriff breaks out threads into separate processes, and exposes an API that allows programs to perform per-thread memory isolation and tracking on a per-page basis. We believe Sheriff is of independent interest. Sheriff-Detect finds instances of false sharing by comparing updates within the same cache lines by different threads, and uses sampling to rank them by performance impact. Sheriff-Detect is precise (no false positives), runs with low overhead (on average, 20%), and is accurate, pinpointing the exact objects involved in false sharing. We present a case study demonstrating Sheriff-Detect's effectiveness at locating false sharing in a variety of benchmarks. Rewriting a program to fix false sharing can be infeasi-ble when source is unavailable, or undesirable when padding objects would unacceptably increase memory consumption or further worsen runtime performance. Sheriff-Protect mitigates false sharing by adaptively isolating shared updates from different threads into separate physical addresses, effectively eliminating most of the performance impact of false sharing. We show that Sheriff-Protect can improve performance for programs with catastrophic false sharing by up to 9×, without programmer intervention.
机译:虚假共享是在多核处理器上运行的多线程程序的阴险问题,可以默默地降低性能和可伸缩性。以前用于检测虚假共享的工具严重有限:无法将虚假分享与真正共享区分开,具有高误率,并提供有限的帮助以帮助程序员找到和解决虚假共享。本文介绍了两种攻击虚假分享问题的工具:警长检测和警长保护。这两个工具都利用了我们在这里介绍的框架,称为警长。警长将线程突出到单独的过程中,并公开一个API,允许程序执行每页按线程存储器隔离和跟踪。我们认为警长是独立利益。警长检测通过比较不同的线程在同一缓存行中的更新中找到错误共享的实例,并使用采样对它们进行性能影响进行排序。警长检测精确(没有误报),使用低开销(平均为20%),准确,精确定位虚假共享所涉及的确切对象。我们展示了一个案例研究,证明了警长检测在各种基准中定位错误分享的效果。重写程序以修复虚假共享可以是源极不可用的,或者当填充物对象时不可接受地提高内存消耗或进一步恶化的运行时性能时,可能是不可取的。警长保护通过将不同线程的共享更新自适应隔离为单独的物理地址,有效地消除了虚假共享的大部分性能影响,从而防止伪分享。我们表明,警长保护可以提高灾难性假共享的程序的性能,无需程序员干预。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号