arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2109.00657cs.DScs.DC
收藏

多个服务器可以成为最先进的优先服务器

Multi-Queues Can Be State-of-the-Art Priority Schedulers

Anastasiia Postnikova, Nikita Koval, Giorgi Nadiradze, Dan Alistarh

摘要:

设计和实现高效的并行优先级调度器是一个活跃的研究领域。一个有趣的建议设计是多队列:给定$n$线程和$m\ge n$不同的优先级队列,任务插入是随机均匀执行的,而删除,线程随机均匀选择两个队列,并删除观察到的更高优先级的任务。这种方法扩展性很好,并且具有概率等级保证:粗略地说,相对于所有其他队列中的剩余任务,每个被删除的任务的等级是预期的$O(m)$。然而,这种模式的性能低于精心设计的路由器,它避开了实际效率的理论保证。我们调查是否有可能设计和实现一个基于多队列的任务调度,既高效,具有分析保证。我们提出了一个新的变体,称为窃取多队列(Stealing Multi-Queue,简称SQM),这是多队列的一个缓存高效变体,它利用了两个队列的亲和性--每个线程都有一个本地队列,任务通常会从该队列中删除;但是线程也有可能尝试从其他队列中窃取更高优先级的任务--以及任务缓存,也就是说,在一个插入/删除步骤中处理多个任务。这些想法是众所周知的任务调度没有优先级,我们的理论贡献是表明,尽管放松,这种设计仍然可以提供等级保证,这反过来又意味着总的工作执行的界限。我们提供了一个通用的并行计算实现,可以超越国家的最先进的并行计算,如伽罗瓦和PMOD在流行的图形处理基准的性能。值得注意的是,性能的提高主要来自我们的调度程序提供的上级保证,确认分析推理的方法仍然可以提供优先级任务调度的性能提高。

英文摘要:

Designing and implementing efficient parallel priority schedulers is an active research area. An intriguing proposed design is the Multi-Queue: given $n$ threads and $m\ge n$ distinct priority queues, task insertions are performed uniformly at random, while, to delete, a thread picks two queues uniformly at random, and removes the observed task of higher priority. This approach scales well, and has probabilistic rank guarantees: roughly, the rank of each task removed, relative to remaining tasks in all other queues, is $O(m)$ in expectation. Yet, the performance of this pattern is below that of well-engineered schedulers, which eschew theoretical guarantees for practical efficiency. We investigate whether it is possible to design and implement a Multi-Queue-based task scheduler that is both highly efficient and has analytical guarantees. We propose a new variant called the Stealing Multi-Queue (SMQ), a cache-efficient variant of the Multi-Queue, which leverages both queue affinity -- each thread has a local queue, from which tasks are usually removed; but, with some probability, threads also attempt to steal higher-priority tasks from the other queues -- and task batching, that is, the processing of several tasks in a single insert / delete step. These ideas are well-known for task scheduling without priorities; our theoretical contribution is showing that, despite relaxations, this design can still provide rank guarantees, which in turn implies bounds on total work performed. We provide a general SMQ implementation that can surpass state-of-the-art schedulers such as Galois and PMOD in terms of performance on popular graph-processing benchmarks. Notably, the performance improvement comes mainly from the superior rank guarantees provided by our scheduler, confirming that analytically-reasoned approaches can still provide performance improvements for priority task scheduling.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑