-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimise driver dispatch loop (#728)
## Usage and product changes We optimise the driver dispatch loop: previously, we could dispatch at most 1000 serial messages per second, though in practice tokio would sometimes sleep longer than expected and the query and transaction latencies increased. This stems from Tokio's approximately millisecond resolution. By moving the collect-dispatch loop to a dedicated thread, we can now dispatch messages after microseconds of batching, improving overall driver performance significantly. ## Implementation We move the dispatch loop to a dedicated thread, which can sleep for sub-millisecond resolution. We also make the background runtime a multi-threaded runtime for scalability.
- Loading branch information
1 parent
de3d0ff
commit eac383e
Showing
1 changed file
with
30 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters