Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent starvation by tokio's operation budget #753

Open
Ralith opened this issue May 7, 2020 · 1 comment
Open

Prevent starvation by tokio's operation budget #753

Ralith opened this issue May 7, 2020 · 1 comment
Labels
good first issue Good for newcomers

Comments

@Ralith
Copy link
Collaborator

Ralith commented May 7, 2020

Tokio's automatic cooperative task yielding feature can cause abruptly prevent a task from making further progress. A very busy connection driver might as a result end up failing to fairly serve transmits or timeouts, resulting in bad behavior (e.g. spurious timeouts or congestion window reduction) under heavy load.

Ideally tokio will expose some tools to arrange for budget fairness across subtasks (e.g. annotations to designate subtasks that should have independent budgets), but if none are forthcoming, we could address this internally by e.g. varying the order we perform operations in by round robin. The current order was chosen for efficiency, however, so an upstream solution is preferred.

@Ralith
Copy link
Collaborator Author

Ralith commented Mar 21, 2021

A minimal API to address this appears to have been added in tokio in tokio-rs/tokio#3547.

@Ralith Ralith added the good first issue Good for newcomers label Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant