Navigation Menu

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

[reno] better handling of high-BDP connections #469

Closed
wants to merge 1 commit into from

Conversation

kazuho
Copy link
Member

@kazuho kazuho commented Jun 22, 2021

Adds a flag called highbdp_mode that changes the increase ratio.

The increase ratio of ordinary Reno is 1 mtu per round-trip (i.e. CWND being acked).

When in high-BDP mode, the CC uses exponential increase during congestion avoidance phase, where the increase rate is calculated so that it would reach the send rate at which the loss was observed every ~1 second. This is roughly equal to what Cubic does.

@kazuho kazuho requested a review from janaiyengar June 22, 2021 10:16
@kazuho
Copy link
Member Author

kazuho commented Jun 22, 2021

Below are the loss observations when sending at fullspeed from Tokyo to West Coast for ~15 seconds:

The first column is current time in milliseconds.

Ordinary Reno:

**** 1624356443776 - reno_on_lost:74 cwnd=2211062,rtt=279
**** 1624356444282 - reno_on_lost:74 cwnd=1547743,rtt=313
**** 1624356447150 - reno_on_lost:74 cwnd=1090588,rtt=318
**** 1624356451871 - reno_on_lost:74 cwnd=779539,rtt=224

High-BDP Reno:

**** 1624356207664 - reno_on_lost:98 cwnd=2182804,rtt=289
**** 1624356208168 - reno_on_lost:98 cwnd=1603280,rtt=302
**** 1624356208699 - reno_on_lost:98 cwnd=1208808,rtt=311
**** 1624356210035 - reno_on_lost:98 cwnd=1232443,rtt=307
**** 1624356211309 - reno_on_lost:98 cwnd=1226988,rtt=304
**** 1624356212604 - reno_on_lost:98 cwnd=1239536,rtt=307
**** 1624356213914 - reno_on_lost:98 cwnd=1246266,rtt=309
**** 1624356215167 - reno_on_lost:98 cwnd=1229620,rtt=308
**** 1624356216480 - reno_on_lost:98 cwnd=1240246,rtt=308
**** 1624356217719 - reno_on_lost:98 cwnd=1228286,rtt=307
**** 1624356219007 - reno_on_lost:98 cwnd=1230350,rtt=307
**** 1624356220315 - reno_on_lost:98 cwnd=1239375,rtt=309
**** 1624356221605 - reno_on_lost:98 cwnd=1239595,rtt=310
**** 1624356222882 - reno_on_lost:98 cwnd=1233795,rtt=308
**** 1624356224172 - reno_on_lost:98 cwnd=1238141,rtt=309

As can be seen, ordinary Reno does not have chance to recover from loss. Compared to that, high-BDP reno is testing the peek every ~1 second.

@kazuho
Copy link
Member Author

kazuho commented Jun 22, 2021

Use of exponential increase during congestion avoidance is not expected to cause difference from ordinary Reno when using beta of 0.7. The chart below is the buffer under-utilization curve of Cubic (blue), Reno (purple), high-BDP Reno (brown). One loss interval of ordinary Reno is normalized to 1 second.
Screen Shot 2021-06-22 at 17 11 49

When there is increase in available bandwidth, use of exponential increase provides benefit if not as good as Cubic. The chart below shows the buffer under-utilization curves when available bandwidths becomes 2x at the moment of congestion. In case of Cubic, it catches up with the new available bandwidth at ~2.2 seconds (notice when the curve reaches plateau). In case of ordinary Reno with loss interval normalized to 1 second, it takes ~3.3 seconds. With high-BDP Reno, ~2.5 seconds.
Screen Shot 2021-06-22 at 17 13 49

return;
uint32_t count = cc->state.reno.stash / cc->cwnd;
cc->state.reno.stash -= count * cc->cwnd;
increase = count * max_udp_payload_size;
Copy link
Member Author

Choose a reason for hiding this comment

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

What if there's a large ack that would have result in count > 1, but calc_highbdp_inrrease return something like max_udp_payload_size? Current code adopts the latter, while it should adopt the former. (credit to @janaiyengar).

Copy link
Collaborator

@janaiyengar janaiyengar left a comment

Choose a reason for hiding this comment

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

With the fix, this looks great, thanks @kazuho !

@kazuho kazuho mentioned this pull request Jun 23, 2021
@kazuho
Copy link
Member Author

kazuho commented Jun 25, 2021

Closing in favor of #470.

@kazuho kazuho closed this Jun 25, 2021
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

2 participants