tokio-1.24.0
tokio-rs/tokiotokio-1.24.0Jan 5, 2023by carllerche
AI Summary
This release focuses on significant performance improvements, specifically reducing lock contention for I/O operations which can lead to up to 20% better CPU utilization. It also introduces new configuration options for runtime tuning.
Key Highlights
- Reduced lock contention in I/O operations (up to 20% improvement)
- Added configuration option for max I/O events per tick
- Added environment variable for configuring default worker threads
- Speed up `read_dir()` operations by chunking
New Features
- Config option for max number of I/O events polled per tick
- Environment variable for configuring default worker threads
Full Release Notes
The highlight of this release is the reduction of lock contention for all I/O operations (#5300). We have received reports of up to a 20% improvement in CPU utilization and increased throughput for real-world I/O heavy applications. ### Fixed - rt: improve native `AtomicU64` support detection ([#5284]) ### Added - rt: add configuration option for max number of I/O events polled from the OS per tick ([#5186]) - rt: add an environment variable for configuring the default number of worker threads per runtime instance ([#4250]) ### Changed - sync: reduce MPSC channel stack usage ([#5294]) - io: reduce lock contention in I/O operations ([#5300]) - fs: speed up `read_dir()` by chunking operations ([#5309]) - rt: use internal `ThreadId` implementation ([#5329]) - test: don't auto-advance time when a `spawn_blocking` task is running ([#5115]) [#5186]: https://github.com/tokio-rs/tokio/pull/5186 [#5294]: https://github.com/tokio-rs/tokio/pull/5294 [#5284]: https://github.com/tokio-rs/tokio/pull/5284 [#4250]: https://github.com/tokio-rs/tokio/pull/4250 [#5300]: https://github.com/tokio-rs/tokio/pull/5300 [#5329]: https://github.com/tokio-rs/tokio/pull/5329 [#5115]: https://github.com/tokio-rs/tokio/pull/5115 [#5309]: https://github.com/tokio-rs/tokio/pull/5309