Creating and destroying threads on modern Linux systems incurs high latency, absent concurrency, and fails to scale as we increase concurrency. To address this concern we introduce a process-local cache of idle threads. Specifically, instead of destroying a thread when it terminates, we cache and then recycle that thread in the context of subsequent thread creation requests. This approach shows significant promise in various applications and benchmarks that create and destroy threads rapidly and illustrates the need for and potential benefits of improved concurrency infrastructure. With caching, the cost of creating a new thread drops by almost an order of magnitude. As our experiments demonstrate, this results in significant performance improvements for multiple applications that aggressively create and destroy numerous threads.
翻译:在现代Linux系统中创建和摧毁线条会产生高潜值、无通货交易,而且随着我们增加通货交易而未能扩大规模。为解决这一关切,我们引入了一个流程-本地闲置线条缓存。具体地说,我们没有在线条终止时摧毁一条线条,而是在随后的线条创建请求中缓存并循环利用这条线线条。这个方法在各种应用和基准中显示出巨大的希望,这些应用和基准迅速创造和摧毁线条,并展示了改进的通货基础设施的必要性和潜在好处。随着拖延,创建一条新线条的成本几乎下降一个数量级。正如我们的实验所显示的那样,这导致对大量大量创建和摧毁线条的多种应用的显著性能改进。