Intra-process Caching and Reuse of Threads
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 th...
Saved in:
Main Authors | , |
---|---|
Format | Journal Article |
Language | English |
Published |
16.05.2021
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | 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. |
---|---|
DOI: | 10.48550/arxiv.2105.07497 |