Skip to content

Apply client write deadline to batches rather than total flushes #6471

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

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

neilalexander
Copy link
Member

By calculating the write deadline at the beginning of the flush operation, we could be hitting it early if there is a lot of data queued up. Instead this PR applies it to each writev batch of at most 1024 vectors, which means that the deadline applies to no more than 64MB in one go.

This makes it simpler to tune the write deadline as it can be thought of as "the maximum time taken to allow writing at most 64MB" instead.

Signed-off-by: Neil Twigg [email protected]

By calculating the write deadline at the beginning of the flush operation,
we could be hitting it early if there is a lot of data queued up. Instead
this PR applies it to each `writev` batch of at most 1024 vectors, which
means that the deadline applies to no more than 64MB in one go.

This makes it simpler to tune the write deadline as it can be thought of
as "the maximum time taken to allow writing at most 64MB" instead.

Signed-off-by: Neil Twigg <[email protected]>
@neilalexander neilalexander requested a review from a team as a code owner February 7, 2025 16:06
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@derekcollison derekcollison merged commit aeaa12f into main Feb 7, 2025
5 checks passed
@derekcollison derekcollison deleted the neil/iovdeadline branch February 7, 2025 16:25
neilalexander added a commit that referenced this pull request Feb 10, 2025
Includes the following:

- #6465
- #6464
- #6469
- #6471
- #6472
- #6474
- #6477
- #6480
- #6487
- #6488

Signed-off-by: Neil Twigg <[email protected]>
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.

2 participants