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

[FIX] flusher timers #526

Merged
merged 1 commit into from
Jun 1, 2023
Merged

[FIX] flusher timers #526

merged 1 commit into from
Jun 1, 2023

Conversation

aricart
Copy link
Member

@aricart aricart commented Jun 1, 2023

When a fast producer dominates the event loop and sends more data than can fit into the outbound buffer, an inline flush happens - but on the first command sent to the server, an auto-flush is scheduled on the next event loop. The timer for this auto-schedule flush was not managed.

In a bench-type scenario where the client is trying to send a significant amount of data, the timers accumulate, degrading the client's performance. This fix removes the scheduled timer whenever an inline flush happens, greatly improving the client's performance.

@aricart aricart requested a review from piotrpio June 1, 2023 14:28
Copy link
Contributor

@piotrpio piotrpio left a comment

Choose a reason for hiding this comment

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

LGTM

…ta than can fit into the outbound buffer, an inline flush happens - but on the first command sent to the server, an auto-flush is scheduled on the next event loop. The timer for this auto-schedule flush was not managed, so in a bench type scenario where the client is trying to send significant amount of data, the timers accumulate degrading the performance of the client. This fix removes the scheduled timer whenever an inline flush happens, greatly improving the performance of the client in this type of scenario.
@aricart aricart temporarily deployed to CI June 1, 2023 15:43 — with GitHub Actions Inactive
@aricart aricart merged commit 37d009a into main Jun 1, 2023
2 checks passed
@aricart aricart deleted the flusher-fix branch June 1, 2023 17:46
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