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

Monk:机会性调度以延迟水平扩展

Monk: Opportunistic Scheduling to Delay Horizontal Scaling

Marina Shimchenko, Erik Österlund, Tobias Wrigstad

AI总结:

本研究提出在ZGC垃圾收集器中实施机会性调度,利用CPU空闲时段运行GC线程,以降低中等负载下的应用延迟,实验显示请求处理量提升15%,平均延迟降低40%,可延迟水平扩展。

摘要:

在现代服务器计算中,高效的CPU资源使用常常以延迟为代价。垃圾收集是Java等编程语言内存管理的关键方面,但它经常与应用程序线程竞争CPU时间,导致处理请求延迟,进而增加延迟。本研究探讨了在ZGC(一种完全并发的垃圾收集器)中采用机会性调度能否在中等CPU利用率(一种常见的部署场景)下降低应用程序延迟,并可能延迟水平扩展。我们实现了一种机会性调度,在CPU资源本会空闲的时段调度GC线程。该方法在关键时刻优先处理应用程序线程而非GC工作线程,使系统能够在不增加延迟的情况下处理更高的负载。我们的研究结果表明,该技术能显著提升服务器应用程序的性能。例如,在使用SPECjbb2015基准测试中,我们观察到在目标25毫秒延迟内处理的请求数量增加了高达15%。此外,像Hazelcast这样的应用程序,与未采用机会性调度的ZGC相比,平均延迟降低了高达40%。通过在两个广泛使用的基准上进行实证测试,验证了该方法的可行性和有效性,表明该方法在各种工作负载下都能持续提升性能。这项研究意义重大,因为它解决了服务器性能中的一个常见瓶颈——如何管理GC而不降低应用程序响应性。通过改进GC线程的调度方式,本研究为实现更高效的资源利用提供了途径,使服务器应用程序能够获得更高的性能和更好的可扩展性。

英文摘要:

In modern server computing, efficient CPU resource usage is often traded for latency. Garbage collection is a key aspect of memory management in programming languages like Java, but it often competes with application threads for CPU time, leading to delays in processing requests and consequent increases in latency. This work explores if opportunistic scheduling in ZGC, a fully concurrent garbage collector (GC), can reduce application latency on middle-range CPU utilization, a topical deployment, and potentially delay horizontal scaling. We implemented an opportunistic scheduling that schedules GC threads during periods when CPU resources would otherwise be idle. This method prioritizes application threads over GC workers when it matters most, allowing the system to handle higher workloads without increasing latency. Our findings show that this technique can significantly improve performance in server applications. For example, in tests using the SPECjbb2015 benchmark, we observed up to a 15\% increase in the number of requests processed within the target 25ms latency. Additionally, applications like Hazelcast showed a mean latency reduction of up to 40% compared to ZGC without opportunistic scheduling. The feasibility and effectiveness of this approach were validated through empirical testing on two widely used benchmarks, showing that the method consistently improves performance under various workloads. This work is significant because it addresses a common bottleneck in server performance -- how to manage GC without degrading application responsiveness. By improving how GC threads are scheduled, this research offers a pathway to more efficient resource usage, enabling higher performance and better scalability in server applications.

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

↑