Skip to content

proto: pacer slow mode #2323

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

vitocln
Copy link

@vitocln vitocln commented Aug 7, 2025

Linked to this issue.

The pacer enters dynamically in slow mode when the inter-packet pacing exceed 10 ms. In slow mode, the pacer sends only single packet per interval and disables the default burst sending mode.

Copy link
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

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

Please include unit tests for the new behavior, and resolve the failing integration tests.

@@ -18,18 +18,20 @@ pub(super) struct Pacer {
last_mtu: u16,
tokens: u64,
prev: Instant,
burst_mode: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need to be stateful? Would it be sufficient to instead just clamp the maximum delay returned?

Copy link
Author

Choose a reason for hiding this comment

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

That was the first approach I tried, but it didn’t resolve the issue. If the pacer gets stalled for an extended period—e.g., due to the congestion window—it accumulates tokens up to the cap (minimum 10 packets), which then results in a burst when it resumes sending.

Do you have a better idea?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, I see how that would be a problem. I'll need to find time to think on this more. In the mean time, please add unit tests that validate the new behavior, both in steady state and after an idle period as you outlined above.

@djc
Copy link
Member

djc commented Aug 7, 2025

Could we make this more dynamic instead of using a boolean burst mode?

The pacer enters dynamically in slow mode when the inter-packet pacing
exceed 10 ms. In slow mode, the pacer sends only single packet per
interval and disables the default burst sending mode.
@vitocln vitocln force-pushed the feat/slow-mode-pacer branch from 694cbd8 to 43c7728 Compare August 11, 2025 12:14
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.

3 participants