Re: RE: A Linux TCP SACK Question

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: John Heffner <johnwheffner@...>, <wenji@...>
Cc: Netdev <netdev@...>
Date: Tuesday, April 15, 2008 - 4:25 am

On Mon, 14 Apr 2008, John Heffner wrote:


...Please note that these are considered as old ACKs, so that we do goto 
old_ack, which is equal for both SACK and NewReno. ...So it won't make any 
difference between them.


NewReno case analysis is not exactly what you assume, if there was at 
least on duplicate ACK already, the ca_state will be CA_Disorder for 
NewReno which makes ack_is_dubious true. You probably assumed it goes
to the other branch directly?


No, this is not right. The old_ack happens only if left edge 
backtracks, in which case we obviously should discard as it's stale 
information (except SACK may reveal something not yet known which is
why sacktag is called there). This same applies regardless of SACK (no 
tagging of course).

...Hmm, there's one questionable part in here in the code (I doubt it 
makes any difference here though). If new sack info is discovered, we 
don't retransmit but send new data (if window allows) even when in 
recovery where TCP should retransmit first.


I think you might have found a bug though it won't affect you but makes 
that check easier to pass actually:

Questionable thing is that || in tcp_may_raise_cwnd (might not be 
intentional)...

But in your case, during initial slow-start that condition in 
tcp_may_raise_cwnd will always be true (if you've metrics are cleared as 
they should). Because: (...not important || 1) && 1 because cwnd < 
ssthresh. After that, when you don't have ECE nor are in recovery, 
tcp_may_raise_cwnd results in this: (1 || ...not calculated) && 1, so it 
should always allow increment in your case except when in recovery which 
hardly makes up for the difference you're seeing...


This would only make difference if any of those SACK blocks were new. If 
they're not, DATA_SACKED_ACKED won't be set in flag.


You seem to be missing the third case, which I tried to point out
earlier. The case where left edge remains the same. I think it makes a 
huge difference here (I'll analyse non-recovery case here):

NewReno goes always to fastretrans_alert, to default branch, and because 
it's is_dupack, it increments sacked_out through tcp_add_reno_sack. 
Effectively packets_in_flight is reduced by one and TCP is able to send 
a new segment out.

Now with SACK there are two cases:

SACK and newly discovere SACK info (for simplicity, lets assume just one 
newly discovered sacked segment). Sacktag marks that segment and increment 
sacked_out, effectively making packets_in_flight equal to the case with 
NewReno. It goes to fastretrans_alert and makes all similar maneuvers as 
NewReno (except if enough SACK blocks have arrived to trigger recovery 
while NewReno would not have enough dupACKs collected, I doubt that this 
makes the difference though, I'll need no-metricsed logs to verify the 
number of recoveries to confirm that they're quite few).

SACK and no new SACK info. Sacktag won't find anything to mark, thus 
sacked_out remains the same. It goes to fastretrans_alert because ca_state 
is CA_Disorder. But, now we did lose one segment compared with NewReno 
because we didn't increment sacked_out making packets_in_flight to stay in 
the amount it was before. Thus we cannot send new data segment out and 
fall behind the NewReno.


Yes, it seems. Though I think that it's unintentional. I'd say that that 
|| should be && but I might be wrong.


...I think that due to reordering, one will lose part of the cwnd 
increments because of old ACKs as they won't allow you to add more 
segments to the network, at some point of time the lossage will be large 
enough to stall the growth of the cwnd (if in congestion avoidance with 
the small increment). With slow start it seems not that self-evident that 
such level exists though it might.

-- 
 i.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
A Linux TCP SACK Question, Wenji Wu, (Fri Apr 4, 12:54 am)
Re: A Linux TCP SACK Question, John Heffner, (Fri Apr 4, 12:27 pm)
RE: A Linux TCP SACK Question, Wenji Wu, (Fri Apr 4, 1:49 pm)
RE: A Linux TCP SACK Question, Ilpo Järvinen, (Fri Apr 4, 4:00 pm)
RE: A Linux TCP SACK Question, Wenji Wu, (Fri Apr 4, 5:15 pm)
RE: A Linux TCP SACK Question, Ilpo Järvinen, (Fri Apr 4, 5:33 pm)
Re: RE: A Linux TCP SACK Question, Wenji Wu, (Fri Apr 4, 5:40 pm)
RE: A Linux TCP SACK Question, Ilpo Järvinen, (Fri Apr 4, 5:39 pm)
RE: A Linux TCP SACK Question, Wenji Wu, (Fri Apr 4, 6:14 pm)
Re: A Linux TCP SACK Question, Sangtae Ha, (Sat Apr 5, 5:17 pm)
Re: A Linux TCP SACK Question, Wenji Wu, (Sun Apr 6, 4:27 pm)
Re: A Linux TCP SACK Question, Sangtae Ha, (Sun Apr 6, 6:43 pm)
RE: A Linux TCP SACK Question, Wenji Wu, (Mon Apr 7, 10:56 am)
RE: A Linux TCP SACK Question, Ilpo Järvinen, (Tue Apr 8, 2:36 am)
RE: A Linux TCP SACK Question, Wenji Wu, (Mon Apr 14, 12:10 pm)
RE: A Linux TCP SACK Question, Ilpo Järvinen, (Mon Apr 14, 12:48 pm)
Re: RE: A Linux TCP SACK Question, Wenji Wu, (Mon Apr 14, 6:07 pm)
Re: RE: A Linux TCP SACK Question, Ilpo Järvinen, (Tue Apr 15, 4:23 am)
Re: A Linux TCP SACK Question, John Heffner, (Tue Apr 8, 10:07 am)
Re: RE: A Linux TCP SACK Question, Wenji Wu, (Tue Apr 8, 8:33 am)
Re: RE: A Linux TCP SACK Question, John Heffner, (Tue Apr 8, 11:57 am)
Re: RE: A Linux TCP SACK Question, Ilpo Järvinen, (Tue Apr 8, 9:45 am)
Re: RE: A Linux TCP SACK Question, Wenji Wu, (Tue Apr 8, 10:30 am)
Re: RE: A Linux TCP SACK Question, Ilpo Järvinen, (Tue Apr 8, 10:59 am)
RE: RE: A Linux TCP SACK Question, Wenji Wu, (Mon Apr 14, 6:47 pm)
Re: RE: A Linux TCP SACK Question, John Heffner, (Mon Apr 14, 8:48 pm)
Re: RE: A Linux TCP SACK Question, Wenji Wu, (Tue Apr 15, 12:39 pm)
Re: RE: A Linux TCP SACK Question, John Heffner, (Tue Apr 15, 1:01 pm)
RE: RE: A Linux TCP SACK Question, Wenji Wu, (Tue Apr 15, 1:55 pm)
Re: RE: A Linux TCP SACK Question, Ilpo Järvinen, (Tue Apr 15, 1:08 pm)
Re: RE: A Linux TCP SACK Question, John Heffner, (Tue Apr 15, 1:23 pm)
Re: RE: A Linux TCP SACK Question, Matt Mathis, (Tue Apr 15, 2:00 pm)
Re: RE: A Linux TCP SACK Question, Wenji Wu, (Tue Apr 15, 11:45 am)
Re: RE: A Linux TCP SACK Question, Ilpo Järvinen, (Tue Apr 15, 4:25 am)
Re: RE: A Linux TCP SACK Question, Wenji Wu, (Tue Apr 15, 2:01 pm)
Re: RE: A Linux TCP SACK Question, John Heffner, (Tue Apr 15, 6:40 pm)
RE: RE: A Linux TCP SACK Question, Wenji Wu, (Wed Apr 16, 10:46 am)
Re: A Linux TCP SACK Question, David Miller, (Wed Apr 16, 4:27 am)
Re: A Linux TCP SACK Question, Ilpo Järvinen, (Wed Apr 16, 5:21 am)
Re: A Linux TCP SACK Question, John Heffner, (Wed Apr 16, 10:40 am)
Re: A Linux TCP SACK Question, Ilpo Järvinen, (Wed Apr 16, 11:03 am)
Re: A Linux TCP SACK Question, David Miller, (Wed Apr 16, 5:35 am)
RE: A Linux TCP SACK Question, Wenji Wu, (Wed Apr 16, 10:50 am)
Re: A Linux TCP SACK Question, David Miller, (Fri Apr 18, 2:52 am)
Re: RE: A Linux TCP SACK Question, Wenji Wu, (Tue Apr 8, 11:27 am)
Re: RE: A Linux TCP SACK Question, Ilpo Järvinen, (Tue Apr 8, 1:26 pm)
RE: A Linux TCP SACK Question, Ilpo Järvinen, (Sat Apr 5, 1:42 pm)
Re: RE: A Linux TCP SACK Question, Wenji Wu, (Fri Apr 4, 4:07 pm)
Re: A Linux TCP SACK Question, John Heffner, (Fri Apr 4, 2:07 pm)