-
Notifications
You must be signed in to change notification settings - Fork 414
fix: increase MAX_IOVECS limit to handle large concurrent writes #1229
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
Conversation
Increase the MAX_IOVECS constant from 128 to 1024 to handle more concurrent IO operations. This fixes an issue where large updates (e.g. updating 1974 rows) would hang due to the in_flight_writes counter never reaching 0. The original limit of 128 concurrent operations was too low for large updates, causing some write completions to be lost when the number of concurrent writes exceeded the limit. This would result in the system hanging in the WaitAppendFrames state. By increasing the limit to 1024, we ensure that _"most"_ writes in large update operations can be properly tracked and completed. Signed-off-by: Daniel Boll <danielboll.academico@gmail.com>
@@ -12,7 +12,7 @@ use std::sync::Arc; | |||
use thiserror::Error; | |||
use tracing::{debug, trace}; | |||
|
|||
const MAX_IOVECS: u32 = 128; | |||
const MAX_IOVECS: u32 = 1024; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this increase in iovecs fixes anything. It just moves the point of hanging to much higher concurrency?
However, we probably should just make this configurable by introducing an UringOpts
struct and passing that to UringIO::new()
. We can make the default iovecs size larger too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@penberg Create the `UringOpts`, is docstrings welcomed in this case?
What do you think?
Introduce `UringOpts` struct for configuring io_uring backend with parameters like `max_iovecs` and `sqpoll_idle`. Add support for custom options in `UringIO` initialization. Include detailed documentation and examples. BREAKING CHANGE: `UringIO` initialization now requires options via `UringOpts` or defaults. Signed-off-by: Daniel Boll <danielboll.academico@gmail.com>
a5bb9c9
to
a7eda7c
Compare
…-limit Signed-off-by: Daniel Boll <danielboll.academico@gmail.com>
Signed-off-by: Daniel Boll <danielboll.academico@gmail.com>
This pull request has been marked as stale due to inactivity. It will be closed in 7 days if no further activity occurs. |
This pull request has been closed due to inactivity. Please feel free to reopen it if you have further updates. |
Increase the MAX_IOVECS constant from 128 to 1024 to handle more concurrent IO operations. This fixes an issue where large updates (e.g. updating 1974 rows) would hang due to the in_flight_writes counter never reaching 0.
The original limit of 128 concurrent operations was too low for large updates, causing some write completions to be lost when the number of concurrent writes exceeded the limit. This would result in the system hanging in the WaitAppendFrames state.
By increasing the limit to 1024, we ensure that "most" writes in large update operations can be properly tracked and completed.