Subject: RE: [Tsvwg] MPA and stovepipe protocol stack

From: Michael Smith <[email-masked]>
Date: Mon, 23 Sep 2002 10:09:19 -0700

David Black said:

> I also think that arguing that MPA is not a change to TCP is a waste of
> time, as an important aspect of MPA is to change the behavior of a TCP
> transmitter (segmentation in particular) in order to obtain benefits at
> a correspondingly modified TCP receiver.

David and I exchanged email briefly on this issue - segmentation or
"packing" - see
http://www.ietf.org/internet-drafts/draft-culley-iwarp-mpa-00.txt Section
7.3 MPA on TCP Sender Segmentation. My intent is to make sure all the
relevant material (in RFCs, for example) are identified. My motivation is to
make sure all the repurcussions for a practical implementation are
considered. David pointed out that RFC 1122 4.2.3.11 applied; I also thought
4.2.2.2 and 4.2.3.4 were relevant to this issue. My intent in posting this
is for people to point out any more references, relevant material, and so
forth.

[miniquote from RFC 1122 4.2.3.11]

When TCP is used for bulk transfer, the data stream should be made up
(almost) entirely of segments of the size of the effective MSS.

[end miniquote from RFC 1122 4.2.3.11]

Aloha

Mike Smith
CTO, iReady

Here's more of the relevant text from RFC 1122. 

[begin quote RFC 1122] 

4.2.3.11  TCP Traffic Patterns 

IMPLEMENTATION: 
The TCP protocol specification [TCP:1] gives the 
implementor much freedom in designing the algorithms 
that control the message flow over the connection -- 
packetizing, managing the window, sending 
acknowledgments, etc.  These design decisions are 
difficult because a TCP must adapt to a wide range of 
traffic patterns.  Experience has shown that a TCP 
implementor needs to verify the design on two extreme 
traffic patterns: 

o    Single-character Segments 

 Even if the sender is using the Nagle Algorithm, 
 when a TCP connection carries remote login traffic 
 across a low-delay LAN the receiver will generally 
 get a stream of single-character segments.  If 
 remote terminal echo mode is in effect, the 
 receiver's system will generally echo each 
 character as it is received. 

o    Bulk Transfer 

 When TCP is used for bulk transfer, the data 
 stream should be made up (almost) entirely of 
 segments of the size of the effective MSS. 
 Although TCP uses a sequence number space with 
 byte (octet) granularity, in bulk-transfer mode 
 its operation should be as if TCP used a sequence 
 space that counted only segments. 

Experience has furthermore shown that a single TCP can 
effectively and efficiently handle these two extremes. 

The most important tool for verifying a new TCP 
implementation is a packet trace program.  There is a 
large volume of experience showing the importance of 
tracing a variety of traffic patterns with other TCP 
implementations and studying the results carefully. 

[snip]
 
4.2.2.2  Use of Push: RFC-793 Section 2.8
 
[snip]
 
However, a TCP 
SHOULD send a maximum-sized segment whenever possible, to 
improve performance (see Section 4.2.3.4).
 
[snip]
 
4.2.3.4  When to Send Data
 
[snip]
 
A TCP SHOULD implement the Nagle Algorithm [TCP:9] to 
coalesce short segments.  However, there MUST be a way for 
an application to disable the Nagle algorithm on an 
individual connection.  In all cases, sending data is also 
subject to the limitation imposed by the Slow Start 
algorithm (Section 4.2.2.15). 

DISCUSSION: 
The Nagle algorithm is generally as follows: 

If there is unacknowledged data (i.e., SND.NXT > 
SND.UNA), then the sending TCP buffers all user 
data (regardless of the PSH bit), until the 
outstanding data has been acknowledged or until 
the TCP can send a full-sized segment (Eff.snd.MSS 
bytes; see Section 4.2.2.6). 

Some applications (e.g., real-time display window 
updates) require that the Nagle algorithm be turned 
off, so small data segments can be streamed 
out at the maximum rate. 

[snip] 

If D is the amount of data 
queued in the sending TCP but not yet sent, then the 
following set of rules is recommended. 

Send data: 

[algorithm snipped] 

[end quote RFC 1122]