Re: [PATCH RFC net-next] tcp: make cwnd-limited not affected by tcp internal pacing

From: Neal Cardwell
Date: Thu Mar 19 2020 - 14:50:08 EST


On Thu, Mar 19, 2020 at 2:33 AM Pengcheng Yang <yangpc@xxxxxxxxxx> wrote:
>
> The current cwnd-limited is set when cwnd is fully used
> (inflight >= cwnd), which allows the congestion algorithm
> to accurately determine whether cwnd needs to be added.
>
> However, there may be a problem when using tcp internal pacing:
> In congestion avoidance phase, when a burst of packets are
> acked by a stretched ACK or a burst of ACKs, this makes a large
> reduction in inflight in a short time. At this time, the sender
> sends data according to the pacing rate cannot fill CWND and
> cwnd-limited is not set. The worst case is that cwnd-limited
> is set only after the last packet in a window is sent. This causes
> the congestion algorithm to be too conservative to increase CWND.
>
> The idea is that once cwnd-limited is set, it maintains a window period.
> In this period, it is considered that the CWND is limited. This makes
> the congestion algorithm unaffected by tcp internal pacing.
>
> Signed-off-by: Pengcheng Yang <yangpc@xxxxxxxxxx>
> ---

Thanks for sending this patch! We ran into this bug in our team
recently as well, and have been working on iterating on patches to fix
it.

I think this particular proposal in this patch does not properly
persist the max_packets_out until all the ACKs have been received for
a flight of data. The consequence of this would be that the cwnd does
not grow properly in slow-start for cases where the max_packets_out is
high enough to merit growing cwnd, but the connection is not strictly
cwnd-limited.

I'm a bit busy this week but I will try to put together and send out a
proposed patch ASAP.

best,
neal