[论文解读] A Flexible Thread Scheduler for Hierarchical Multiprocessor Machines
本文提出了一种可移植的、分层的线程调度机制,采用“气泡”(bubbles)——即具有共享数据亲和性的线程逻辑分组——来优化复杂、多级的多处理器架构上的性能。通过使应用程序能够动态表达任务关系,该调度器在16核ccNUMA系统上相比传统的机会式调度器性能提升高达30%,并达到接近手调优、非可移植解决方案的最优性能。
With the current trend of multiprocessor machines towards more and more hierarchical architectures, exploiting the full computational power requires careful distribution of execution threads and data so as to limit expensive remote memory accesses. Existing multi-threaded libraries provide only limited facilities to let applications express distribution indications, so that programmers end up with explicitly distributing tasks according to the underlying architecture, which is difficult and not portable. In this article, we present: (1) a model for dynamically expressing the structure of the computation; (2) a scheduler interpreting this model so as to make judicious hierarchical distribution decisions; (3) an implementation within the Marcel user-level thread library. We experimented our proposal on a scientific application running on a ccNUMA Bull NovaScale with 16 Intel Itanium II processors; results show a 30% gain compared to a classical scheduler, and are similar to what a handmade scheduler achieves in a non-portable way.
研究动机与目标
- 解决在日益复杂的分层多处理器架构(如NUMA、多核和SMT系统)上高效调度线程的挑战。
- 提供一种可移植的解决方案,使应用程序能够在不硬编码特定架构调度逻辑的情况下表达任务和数据亲和性。
- 实现自动化的、架构感知的线程分发,以最小化远程内存访问并提升缓存局部性。
- 弥合可移植的动态调度与手调优、非可移植调度器之间在性能上的差距。
- 开发一个灵活的调度实验平台,支持不同分发策略的运行时评估。
提出的方法
- 引入‘气泡’模型,用于表示具有强数据亲和性的线程逻辑分组,从而支持分层调度决策。
- 设计一种调度器,能够解析应用程序提供的气泡结构,并将其映射到底层硬件拓扑(如NUMA节点、处理器集合)。
- 在Marcel用户级线程库中实现该调度器,以支持运行时控制与实验。
- 允许应用程序查询系统以获取硬件拓扑信息(如NUMA节点数量、每个节点的处理器数),以指导气泡的创建。
- 采用动态调度机制,并引入气泡爆破层级,以在保持局部性的同时提供工作负载分发的灵活性。
- 支持可移植的调度提示,指导调度器行为,而无需依赖底层系统绑定或进程固定。
实验结果
研究问题
- RQ1一种可移植的应用级机制是否能够以有效方式表达任务亲和性,从而实现在分层多处理器上的架构感知线程调度?
- RQ2使用高层提示(如气泡)的动态调度器在多大程度上可以匹配手调优、非可移植调度器的性能?
- RQ3在NUMA和分层架构上,该提议的调度器与机会式调度器相比性能如何?
- RQ4气泡模型是否能够以可移植且可扩展的方式有效表示不同程度的数据和任务亲和性?
- RQ5在具有内存访问局部性约束的真实科学工作负载上,使用分层调度提示的性能影响如何?
主要发现
- 在16核ccNUMA Bull NovaScale系统上,基于气泡的调度器相比经典机会式调度器性能提升了30%。
- 使用气泡模型的性能与手动调优的非可移植线程绑定策略几乎完全一致,证明了其高效性。
- 在同一ccNUMA系统上,该调度器通过将线程及其数据保留在同一NUMA节点上,减少了内存访问延迟,避免了昂贵的远程内存访问。
- 该方法在多种架构上均表现有效,包括Intel PC SMP和基于Itanium II的NUMA系统,展现出良好的可移植性与适应性。
- 该方法实现了无需修改应用程序线程绑定或内存分配逻辑的自动、架构感知调度。
- 结果表明,当与智能调度器结合时,可移植的调度提示可在不牺牲可移植性的前提下实现接近最优的性能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。