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

feat(runtime): Provide environment-configurable options for tokio parameters #19173

Merged
merged 3 commits into from
May 19, 2023

Conversation

mmastrac
Copy link
Contributor

No description provided.

runtime/tokio_util.rs Outdated Show resolved Hide resolved
))
.max_io_events_per_tick(tokio_env(
"TOKIO_MAX_IO_EVENTS_PER_TICK",
max_io_events_per_tick,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we want to change this value - IIRC @littledivy said that increasing it, makes performance worse on Mac, but better on Linux.

@littledivy can you chime in?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's the case, that's good to know -- we can use #[cfg(...)] to create a linux/mac tokio_configuration that's somewhat tuned on each platform.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

512 max events per tick seems to help in pure hello-world. I would like to confirm this again - I think it might slow things down with mixed workloads.

runtime/tokio_util.rs Outdated Show resolved Hide resolved
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmastrac mmastrac merged commit 8724ba9 into denoland:main May 19, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants