arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1905.10818cs.OS
收藏

通过限制并发避免Scalability崩溃

Avoiding Scalability Collapse by Restricting Concurrency

Dave Dice, Alex Kogan

摘要:

饱和锁通常会降低多线程应用程序的性能,导致所谓的可伸缩性崩溃问题。当通过饱和锁循环的线程数量不断增加导致整个应用程序性能下降甚至突然下降时,就会出现这个问题。这个问题在超额订阅系统(线程数多于可用硬件内核数的系统)上尤其严重(但并非唯一)。在本文中,我们介绍了GCR(通用并发限制),一种机制,旨在避免可伸缩性崩溃。GCR被设计为一个通用的、与锁无关的包装器,它拦截锁获取调用,并决定何时允许线程继续获取底层锁。此外,我们提出了GCR-NUMA,一个非统一内存访问(NUMA)的GCR的感知扩展,努力确保线程允许获取锁是那些在同一个套接字上运行。包括二十多个锁、三台机器和三个基准测试的广泛评估表明,GCR在争用和线程数增长的情况下带来了显著的加速(在许多情况下,高达三个数量级),而在底层锁没有争用时,速度几乎可以忽略不计。GCR-NUMA带来了更大的性能增益,从更轻的锁争用开始。

英文摘要:

Saturated locks often degrade the performance of a multithreaded application, leading to a so-called scalability collapse problem. This problem arises when a growing number of threads circulating through a saturated lock causes the overall application performance to fade or even drop abruptly. This problem is particularly (but not solely) acute on oversubscribed systems (systems with more threads than available hardware cores). In this paper, we introduce GCR (generic concurrency restriction), a mechanism that aims to avoid the scalability collapse. GCR, designed as a generic, lock-agnostic wrapper, intercepts lock acquisition calls, and decides when threads would be allowed to proceed with the acquisition of the underlying lock. Furthermore, we present GCR-NUMA, a non-uniform memory access (NUMA)-aware extension of GCR, that strives to ensure that threads allowed to acquire the lock are those that run on the same socket. The extensive evaluation that includes more than two dozen locks, three machines and three benchmarks shows that GCR brings substantial speedup (in many cases, up to three orders of magnitude) in case of contention and growing thread counts, while introducing nearly negligible slowdown when the underlying lock is not contended. GCR-NUMA brings even larger performance gains starting at even lighter lock contention.

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

↑