Skip to main content
QUICK REVIEW

[论文解读] An Efficient Thread Mapping Strategy for Multiprogramming on Manycore Processors

Ashkan Tousimojarad, Wim Vanderbauwhede|arXiv (Cornell University)|Mar 31, 2014
Parallel Computing and Optimization Techniques参考文献 6被引用 6
一句话总结

本文提出了一种用于多核处理器的扩展最低负载(XLL)线程映射策略,以在多线程多任务环境中改善负载均衡。通过根据实时CPU利用率动态地将线程分配给核心,XLL在单任务和多任务工作负载下均优于原生Linux调度器,尤其在核心数和线程数较高的情况下表现更优。

ABSTRACT

The emergence of multicore and manycore processors is set to change the parallel computing world. Applications are shifting towards increased parallelism in order to utilise these architectures efficiently. This leads to a situation where every application creates its desirable number of threads, based on its parallel nature and the system resources allowance. Task scheduling in such a multithreaded multiprogramming environment is a significant challenge. In task scheduling, not only the order of the execution, but also the mapping of threads to the execution resources is of a great importance. In this paper we state and discuss some fundamental rules based on results obtained from selected applications of the BOTS benchmarks on the 64-core TILEPro64 processor. We demonstrate how previously efficient mapping policies such as those of the SMP Linux scheduler become inefficient when the number of threads and cores grows. We propose a novel, low-overhead technique, a heuristic based on the amount of time spent by each CPU doing some useful work, to fairly distribute the workloads amongst the cores in a multiprogramming environment. Our novel approach could be implemented as a pragma similar to those in the new task-based OpenMP versions, or can be incorporated as a distributed thread mapping mechanism in future manycore programming frameworks. We show that our thread mapping scheme can outperform the native GNU/Linux thread scheduler in both single-programming and multiprogramming environments.

研究动机与目标

  • 解决在多任务环境下,传统SMP Linux调度器在高核心数多核系统中性能下降的问题。
  • 识别现有线程映射策略(如轮询法BLL)在线程数超过核心数或工作负载大小不一情况下的低效性。
  • 开发一种低开销、基于启发式的线程映射技术,以改善多线程多任务工作负载中的负载均衡并减少完成时间。
  • 证明线程映射对性能有显著影响,尤其对非线性可扩展的应用程序。
  • 为未来多核编程框架提供一种实用且可扩展的解决方案,兼容OpenMP任务模型。

提出的方法

  • 测量每个核心的实时CPU利用率(执行有用工作的时长),以估算当前负载。
  • 将每个新线程分配给当前负载最低的核心,采用一种启发式方法,避免将线程放置在已过载的核心上。
  • 将XLL算法实现为轻量级运行时机制,适用于作为编译指令(pragma)或分布式线程映射器集成。
  • 在64核TILEPro64处理器上,使用BOTS基准测试(N皇后、Strassen、排序、健康)评估该技术。
  • 在单任务和多任务工作负载下,将XLL与原生Linux调度器、静态映射和BLL(轮询法)进行对比。
  • 以完成时间作为多种实验场景下的主要性能指标,涵盖不同线程数和输入大小。

实验结果

研究问题

  • RQ1在多核系统中,随着核心数和线程数的增加,原生Linux线程调度器的性能如何退化?
  • RQ2基于实时CPU负载的动态线程映射在多任务环境中在多大程度上能改善负载均衡并减少完成时间?
  • RQ3为何轮询法(BLL)在线程数不一且工作负载异构的多任务场景中会失效?
  • RQ4基于CPU利用率的低开销启发式方法是否能在单任务和多任务工作负载下均优于现有调度器?
  • RQ5线程数对应用程序可扩展性有何影响?如何通过最优映射缓解非线性可扩展应用程序的性能退化?

主要发现

  • XLL映射策略在所有基准测试和工作负载下,显著降低了完成时间,优于原生Linux调度器。
  • 在第一个多任务场景(三个健康程序)中,XLL通过高效重用释放的核心,避免将线程强制分配给已繁忙的核心,从而优于BLL。
  • 在第二个场景(四个不同程序同时运行)中,XLL在所有四个程序上的完成时间均低于Linux和BLL,证明了其一致的负载均衡能力。
  • 在第三个场景(10个相同的排序程序)中,XLL表现出更优性能,尤其当每个程序使用16个线程而非63个线程时,证实了更多线程并不总是能提升性能。
  • XLL技术的开销可忽略不计,即使对于运行时间仅几秒的短程序也适用,因此适用于实时和高吞吐量环境。
  • 本研究证实线程映射是性能的关键因素,而静态或轮询法策略无法有效适应多核系统中动态且异构的工作负载。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。