Crates.io | smolscale2 |
lib.rs | smolscale2 |
version | |
source | src |
created_at | 2024-02-04 15:03:26.761604 |
updated_at | 2024-11-23 08:57:44.717859 |
description | hitdns fork of original smolscale |
homepage | |
repository | https://github.com/delta4chat/smolscale |
max_upload_size | |
id | 1126425 |
Cargo.toml error: | TOML parse error at line 21, column 1 | 21 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A global, auto-scaling scheduler for [async-task] using work-balancing.
smolscale
is a work-balancing executor based on [async-task], designed to be a drop-in replacement to smol
and async-global-executor
. It is designed based on the idea that work-stealing, the usual approach in async executors like async-executor
and tokio
, is not the right algorithm for scheduling huge amounts of tiny, interdependent work units, which are what message-passing futures end up being. Instead, smolscale
uses work-balancing, an approach also found in Erlang, where a global "balancer" thread periodically balances work between workers, but workers do not attempt to steal tasks from each other. This avoids the extremely frequent stealing attempts that work-stealing schedulers generate when applied to async tasks.
smolscale
's approach especially excels in two circumstances:
smolscale
will instead drastically reduce CPU usage in these circumstances --- a async-executor
app that takes 80% of CPU time may now take only 20%. Although this does not improve fully-loaded throughput, it significantly reduces power consumption and does increase throughput in circumstances where multiple thread pools compete for CPU time.smolscale
can significantly improve throughput, especially compared to executors like async-executor
that do not special-case message passing.License: ISC