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

Calling uring.submitter().submit() on every loop is probably expensive #129

Open
JackKelly opened this issue May 16, 2024 · 0 comments
Open
Labels
enhancement New feature or request performance Improvements to runtime performance

Comments

@JackKelly
Copy link
Owner

JackKelly commented May 16, 2024

submit calls submit_and_wait.

submit_and_wait always calls atomic::fence(atomic::Ordering::SeqCst) when the kernel is configured to use sqpoll.

So it might be faster to keep an eye on the clock (in our code), and only call submit if, say, it's been at least 800 ms since we last added to the SQ. (And only do this if our code uses sqpoll). But, as always, I should benchmark!

Implementation

I could use crossbeam::channel::after. But supposedly that also requires an atomic load. So it might just be faster to do the simple thing and check the time on every iteration! I probably want to wrap the submission queue in my own type, which will also look after waking the SQ (if enough time has elapsed, and if we're actually using sqpoll!)

Related

@JackKelly JackKelly added the enhancement New feature or request label May 16, 2024
@JackKelly JackKelly moved this to Todo in light-speed-io May 16, 2024
JackKelly added a commit that referenced this issue May 16, 2024
@JackKelly JackKelly added the performance Improvements to runtime performance label May 21, 2024
@JackKelly JackKelly added this to the TBD: Improve IO speed milestone May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Improvements to runtime performance
Projects
Status: Todo
Development

No branches or pull requests

1 participant