In BBR, what's the relation between pacing rate and the cwnd?

914 views
Skip to first unread message

Shiyao Ma

unread,
Feb 5, 2017, 1:56:48 AM2/5/17
to BBR Development
Hi,


In reading the tcp_bbr.c file, I find bbr first sets the pacing rate and then sets the cwnd.

Isn't pacing rate strongly coupled with cwnd, by the equation: rate = cwnd / rtt ?

The code seems to suggest cwnd is unrelated with pacing rate.


Regards.

Jonathan Morton

unread,
Feb 5, 2017, 2:06:04 AM2/5/17
to Shiyao Ma, BBR Development

> On 5 Feb, 2017, at 08:56, Shiyao Ma <i...@introo.me> wrote:
>
> Isn't pacing rate strongly coupled with cwnd, by the equation: rate = cwnd / rtt ?

In a standard TCP, where cwnd is the primary control and pacing has been added on top, that would be true.

BBR is different, because it uses pacing as the primary control. A cwnd control is left in as a safety net, for cases where the pacing rate temporarily exceeds the delivery rate. This is normal in BBR during bandwidth probes, and also occurs when the delivery rate reduces.

Broadly, having cwnd independent of rate*rtt allows BBR to tolerate much higher packet loss rates than conventional TCPs, without running out of window in which to perform loss recovery. However, it does also result in filling the buffer when path contention increases, until BBR detects the contention and adjusts to it.

- Jonathan Morton

Yuchung Cheng

unread,
Feb 6, 2017, 1:42:08 PM2/6/17
to Jonathan Morton, Shiyao Ma, BBR Development
Jonathan nicely describes the diff control between bbr and other
conventional cwnd-based transport (e.g., cubic with fq-pacing)

Shiyao: in bbr_main, both bbr_set_pacing_rate and bbr_set_cwnd takes
the 'bw' parameter (current estimate of bandwidth). This is key to see
how cwnd and pacing_rate are related: bw is used to set the pacer. bw
and min_rtt form the basis of a maximum inflight (target_cwnd). So
cwnd is not directly derived from pacing rate nor vice versa. They are
both derived from network measurements to control how fast to send
(rate) and how much to keep inflight (cwnd).
> --
> You received this message because you are subscribed to the Google Groups "BBR Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bbr-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Shiyao Ma

unread,
Feb 9, 2017, 7:34:53 AM2/9/17
to BBR Development, chrom...@gmail.com, i...@introo.me
Hi Yuchung,

Yes. Exactly. I now see the correlation.

Regards.
Reply all
Reply to author
Forward
0 new messages