Page MenuHomeFreeBSD

Improve receive window autoscaling for TCP
AcceptedPublic

Authored by tuexen on Thu, Nov 29, 9:09 AM.

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
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 21262

Event Timeline

tuexen created this revision.Thu, Nov 29, 9:09 AM

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.

tuexen updated this revision to Diff 51355.Thu, Nov 29, 3:51 PM

Address Richard's comments.

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.

rrs accepted this revision.Thu, Nov 29, 5:17 PM
This revision is now accepted and ready to land.Thu, Nov 29, 5:17 PM
rscheff_gmx.at accepted this revision.Thu, Nov 29, 5:45 PM

Thanks for the updates comments!