net: TCP thin-stream detection
Subsystems (2)
Quoted 7 lines · Arnd Hannemann
Quoted 6 lines
Quoted 4 lines · Andreas Petlund
Den 28. okt. 2009 kl. 04.09 skrev William Allen Simpson:
Quoted 2 lines
Quoted 1 line · Andreas Petlund
+/* Determines whether this is a thin stream (which may suffer from
+ * increased latency). Used to trigger latency-reducing mechanisms.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
+ */
+static inline unsigned int tcp_stream_is_thin(const struct
tcp_sock *tp)
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+{ + return tp->packets_out < 4; +} +This bothers me a bit. Having just looked at your Linux
presentation,
Quoted 2 lines
Quoted 2 lines
and not (yet) read your papers, it seems much of your justification was with 1 packet per RTT. Here, you seem to be concentrating on 4,
probably
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
because many implementations quickly ramp up to 4.
The limit of 4 packets in flight is based on the fact that less than
4
Quoted 1 line
Quoted 1 line
Quoted 1 line
packets in flight makes fast retransmissions impossible, thus
limiting
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
the retransmit options to timeout-retransmissions. The criterion is
There is Limited Transmit! So this is generally not true.
Quoted 1 line
therefore as conservative as possible while still serving its
purpose.
Quoted 1 line
Quoted 1 line
Quoted 1 line
If further losses occur, the exponential backoff will increase
latency
Quoted 1 line
Quoted 1 line
Quoted 1 line
further. The concept of using this limit is also discussed in the
Internet draft for Early Retransmit by Allman et al.:
Quoted 2 lines
Quoted 2 lines
This ID is covering exactly the cases which Limited Transmit does not
cover and works "automagically" without help of application. So why not just implement this ID?
Quoted 2 lines
I even gave some advise recently to one guy how to polish up the early
retransmit implementation of his. ...However, I think we haven't heard from that since then... I added him as CC if he happens to have it already
Quoted 3 lines
done.
It is actually so that patches 1+3 implement sort of an early
retransmit,
Quoted 1 line
just slightly more aggressive of it than what is given in ID but I find
the difference in the aggressiveness rather insignificant. ...Whereas the
Quoted 2 lines
RTO stuff is more questionable.
I share the opinion that the linear timeouts should be limited, and back off exponentially after the limit, as Eric suggested. I believe this will be a sufficient safety-valve for the black-hole scenario, although I would like to run some tests.
As I wrote to Arnd, there are many similarities with the EFR approach and what our patch does. The largest difference is that the thin-stream patterns are identified as an indication of time dependent/interactive apps. This is the reason why the proposed patch does not try to keep an inflated cwnd open, but only focuses on the cases of few packets in flight. The target is time-dependent/interactive applications, and as such we don't want a generally enabled mechanism, but want to give the option of enabling it only in the cases where they are most needed (in contrast to a generally enabled "automagically" triggered EFR).
Below is a link to a table presenting some of the applications that we have traced and analysed the packet interarrival times of:
http://folk.uio.no/apetlund/lktmp/thin_apps_table.pdf
We were surprised to see how many cases of "thin-stream" traffic patterns were indicative of time-dependent/interactive apps.
Regards,
Andreas
Quoted 15 lines · [email protected] wrote:
I share the opinion that the linear timeouts should be limited, and back off exponentially after the limit, as Eric suggested. I believe this will be a sufficient safety-valve for the black-hole scenario, although I would like to run some tests.
As I wrote to Arnd, there are many similarities with the EFR approach and what our patch does. The largest difference is that the thin-stream patterns are identified as an indication of time dependent/interactive apps. This is the reason why the proposed patch does not try to keep an inflated cwnd open, but only focuses on the cases of few packets in flight. The target is time-dependent/interactive applications, and as such we don't want a generally enabled mechanism, but want to give the option of enabling it only in the cases where they are most needed (in contrast to a generally enabled "automagically" triggered EFR).
Quoted 8 lines
Below is a link to a table presenting some of the applications that we have traced and analysed the packet interarrival times of:
http://folk.uio.no/apetlund/lktmp/thin_apps_table.pdf
We were surprised to see how many cases of "thin-stream" traffic patterns were indicative of time-dependent/interactive apps.
I'm finding it hard to follow 3 threads, for the 3 parts of the patch.
As I mentioned in one of these threads, I've plenty of experience with designing and implementing protocols for gaming. And it seems to me that you're making changes to the entire TCP stack to make up for shortcomings in the implementor's design. Yet, these changes require application implementors to set a sockopt that's only available in Linux. Unlikely, as they probably don't even keep track of such things....
There are other efforts in this area, they've been mentioned.
I'm new to this list, so I'm not entirely sure that protocol design is regularly discussed here. But I'd prefer that the discussion moved to one of the lists that's dedicated to such protocol design and testing.
I've already suggested the end-to-end interest list, where you'll find many of us with a strong interest in this topic.
List-Subscribe: <http://mailman.postel.org/mailman/listinfo/end2end-interest>,
<mailto:[email protected]?subject=subscribe>
The IETF has two related working groups:
tcpm -- tcp modifications
tsvwg -- general transport, including sctp modifications
Without further ado, just count me as opposed at this time.
Quoted 9 lines · William Allen Simpson
I'm finding it hard to follow 3 threads, for the 3 parts of the patch.
As I mentioned in one of these threads, I've plenty of experience with designing and implementing protocols for gaming. And it seems to me that you're making changes to the entire TCP stack to make up for shortcomings in the implementor's design. Yet, these changes require application implementors to set a sockopt that's only available in Linux. Unlikely, as they probably don't even keep track of such things....
The target is not only games, but for instance SSH sessions, RDP or VNC, stock trading services, sensor networks and so forth. There are a lot of time-dependent applications that shows thin stream properties. Many of these use TCP, and will continue to use it. Some of these applications use UDP as default, but fall back to TCP if there is a problem with the UDP connection (for instance Skype). By providing better latency for thin streams, we can increase the service level for all these applications.
Our experience is that at least some designers of interactive/time-dependent applications are skilled enough and concerned enough to investigate whether options exist that may improve the applications they are designing. Of course there are exceptions, but for open-sourced software, there will be people who can provide this input. If the argument is that there is no need for customised options because developers are stupid, we could strip away a lot of the existing network code.
Quoted 2 lines
I've already suggested the end-to-end interest list, where you'll find many of us with a strong interest in this topic.
I've been reading end-to-end for several years, and I think I will take this discussion to that list eventually. We have discussed whether we should take this to end-to-end first, and netdev after, but decided to go here for the following reasons: 1) We have working patches that we wanted to contribute.
2) The modifications are implemented as optional. 3) When active, the modifications handle a special case of TCP streams that we have shown to have minimal impact on general TCP behaviour.
Also, in my experience, the end-to-end list discussions tend to digress, making it difficult to keep the discussion to the special case that we address. Since we wanted technical and practical feedback that would help us to refine the modifications in the patches in addition to the discussion on transport protocols, we chose to go to netdev first.
Quoted 3 lines
The IETF has two related working groups:
tcpm -- tcp modifications
tsvwg -- general transport, including sctp modifications
There are plenty of examples of TCP mechanisms present in the Linux kernel that has not been standardised, for instance TCP CUBIC, the default congestion control for many Linux distributions at this time.
We have a set of patches, and a large body of experiments that shows them to be effective for the thin-stream scenario without any significant disadvantages. Please consider this before discarding the proposition based on a general principle of standardisation. We believe that the thin-stream modifications will provide extra value to Linux networking.
Best regards,
Andreas