Page MenuHomeFreeBSD

Improve receive window autoscaling for TCP
ClosedPublic

Authored by tuexen on Nov 29 2018, 9:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 19, 4:19 PM
Unknown Object (File)
Tue, Mar 19, 2:23 PM
Unknown Object (File)
Sat, Mar 2, 9:05 PM
Unknown Object (File)
Jan 20 2024, 6:39 AM
Unknown Object (File)
Jan 10 2024, 8:15 AM
Unknown Object (File)
Jan 10 2024, 8:15 AM
Unknown Object (File)
Jan 10 2024, 8:15 AM
Unknown Object (File)
Jan 10 2024, 8:12 AM
Subscribers

Details

Summary

The receive buffer autoscaling for TCP is based on a linear growth, which is acceptable in the congestion
avoidance phase, but not during slow start. Also the MTU is not considered.

Replace this algorithm which is based on exponential growth which should work also in slow start
and is independent on the MTU.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Only nit in the comment to this patch:

  • 2. the number of bytes received during 1/2 of an sRTT
  • is equal to 1/2 of the current socket buffer size.

Should be

  • 2. the number of bytes received during 1/2 of an sRTT
  • is equal to 3/8 of the current socket buffer size.

from tp->rfbuf_cnt > ((so->so_rcv.sb_hiwat / 2)/ 4 * 3)

Also,

  • This algorithm does one step per RTT at most and only if

should be

  • This algorithm does two steps per RTT at most and only if

correct?

The increase by slightly more than 50% of the (effective) old rwnd twice per RTT, since it's triggered at the 3/8 point, can indeed keep up with slowstart.

Address Richard's comments.

In D18375#390784, @rscheff_gmx.at wrote:

Only nit in the comment to this patch:

  • 2. the number of bytes received during 1/2 of an sRTT
  • is equal to 1/2 of the current socket buffer size.

Should be

  • 2. the number of bytes received during 1/2 of an sRTT
  • is equal to 3/8 of the current socket buffer size.

from tp->rfbuf_cnt > ((so->so_rcv.sb_hiwat / 2)/ 4 * 3)

Also,

  • This algorithm does one step per RTT at most and only if

should be

  • This algorithm does two steps per RTT at most and only if

correct?

Yepp. I changed the comments to address your comments.

The increase by slightly more than 50% of the (effective) old rwnd twice per RTT, since it's triggered at the 3/8 point, can indeed keep up with slowstart.

This revision is now accepted and ready to land.Nov 29 2018, 5:17 PM

Thanks for the updates comments!

This revision was automatically updated to reflect the committed changes.