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

BUG:the calculation of SendAllowance in BBR is wrong #4889

Open
4 tasks
lrfeng1 opened this issue Mar 4, 2025 · 0 comments
Open
4 tasks

BUG:the calculation of SendAllowance in BBR is wrong #4889

lrfeng1 opened this issue Mar 4, 2025 · 0 comments
Labels
Area: Performance Bug: Core A code bug in the Core MsQuic code
Milestone

Comments

@lrfeng1
Copy link

lrfeng1 commented Mar 4, 2025

Describe the bug

In the BbrCongestionControlGetSendAllowance function,we expect a result in BYTES to indicate that how many bytes can be sent next time. And in this function,
"SendAllowance = (uint32_t)(BandwidthEst * Bbr->PacingGain * TimeSinceLastSend / GAIN_UNIT);"
is used to calculate the value of SendAllowance.

However, from the codes, we know that,BandwidthEst is in bps (bit per second), TimeSinceLastSend is in us(micro second),PacingGain/GAIN_UNIT will be 1 or 1.25 or 0.75,we can ignore its unit.

Obiviously, when pacing is executing, we cannot get a value in BYTES in this function, we have to use a formula "bit per micro sec * micro sec / 8" to get a value in bytes.

Affected OS

  • Windows
  • Linux
  • macOS
  • Other (specify below)

Additional OS information

No response

MsQuic version

main

Steps taken to reproduce bug

it can easily be seen in the codes.
I found it in the following case.When I manually set the BandwidthEst to 6Gbps, i found that the actual throughput is too low and it is limited by the SendAllowance value.
So I found that the SendAllowance calculation is wrong.
this is because that 32-bit SendAllowance is not enough is this case (6G bps * 1 * several micro seconds), so when the 64-bit result is cut to 32-bit, the SendAllowacne result turns too small.

Expected behavior

a right value of SendAllowance

Actual outcome

a wrong value of SendAllowance

Additional details

No response

@anrossi anrossi added Bug: Core A code bug in the Core MsQuic code Area: Performance labels Mar 4, 2025
@nibanks nibanks added this to the Future milestone Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Performance Bug: Core A code bug in the Core MsQuic code
Projects
None yet
Development

No branches or pull requests

3 participants