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

Make GLOBAL_POLL_INTERVAL configurable #4651

Closed
aturon opened this issue May 2, 2022 · 2 comments · Fixed by #4671
Closed

Make GLOBAL_POLL_INTERVAL configurable #4651

aturon opened this issue May 2, 2022 · 2 comments · Fixed by #4671
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-runtime Module: tokio/runtime

Comments

@aturon
Copy link
Contributor

aturon commented May 2, 2022

I am part of a team using Tokio in production, with a specific workload that the default GLOBAL_POLL_INTERVAL isn't tuned well for. In experimentation, we've been able to greatly improve scheduling behavior by tuning down this interval.

Ideally, this polling interval would be part of the runtime configuration. Even better if it split out the "maintenance" (epoll etc) interval from the global queue polling interval.

I'd be happy to work on a PR along these lines, adding such configuration to the runtime builder, but wanted to check first whether such a change would be welcome.

@aturon aturon added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels May 2, 2022
@Noah-Kennedy
Copy link
Contributor

I'd be open to this

@Darksonn Darksonn added the M-runtime Module: tokio/runtime label May 3, 2022
@Darksonn
Copy link
Contributor

Darksonn commented May 3, 2022

This seems reasonable to me as well.

aturon added a commit to aturon/tokio that referenced this issue May 17, 2022
Adds knobs to the runtime builder to control the number of ticks
between polling the global task queue (fairness) and the event driver
(I/O prioritization).

Both varieties of scheduler already supported these intervals, but they
were defined by private constants. Some workloads benefit from
customizing these values.

Closes tokio-rs#4651
Darksonn pushed a commit that referenced this issue May 18, 2022
…4671)

Adds knobs to the runtime builder to control the number of ticks
between polling the global task queue (fairness) and the event driver
(I/O prioritization).

Both varieties of scheduler already supported these intervals, but they
were defined by private constants. Some workloads benefit from
customizing these values.

Closes #4651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-runtime Module: tokio/runtime
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants