Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!mcnc!decvax.dec.com!bacchus.pa.dec.com!mogul From: mogul@wrl.dec.com (Jeffrey Mogul) Newsgroups: comp.protocols.tcp-ip Subject: Re: TCP segment size -- user defined? Message-ID: <1990Sep20.014208.7645@wrl.dec.com> Date: 20 Sep 90 01:42:08 GMT References: <266@aldetec.oz.au> Sender: news@wrl.dec.com (News) Organization: DEC Western Research Lines: 34 In article <266@aldetec.oz.au> mawson@aldetec.oz.au (Graeme Mawson) writes: >We are presently experimenting with the TCP/IP protcol suite over an Ethernet >LAN. A useful guide to TCP/IP by Comer seems to suggest that TCP segment >size is user-definable. Is this true? Does anyone know how to define it? Since nobody else seems to have responded, I'll take a stab. Yes, in one sense. The TCP segment size is not a fixed value; rather, it is limited on the high side by a number of different considerations, and it should be no lower than necessary in order to get good performance. The upper limits on the size of a TCP segment are: (1) the TCP MSS option value; the receiving TCP specifies the largest segment it is willing to receive, and the sending host must abide. (2) the transmit side send buffer space limit. In BSD-based systems, this can be varied by the application program (within bounds). (3) the "Path MTU"; basically, the largest packet that can be sent from source to destination without fragmentation. (4) various considerations of the flow control and congestion control algorithms. Only #2 is under the control of the user, and in general the user would do well to leave it alone. The other limits are supposed to be set more or less automatically, in order to maximize performance. But, if you want to vary the segment size for experimental reasons, you'll probably have to modify the TCP code on both the sender and receiver; on the receiver, so that it sends a large enough MSS option, and on the sender, so that it choose the actual MSS you want it to use. (Existing TCPs often choose something like 1024 if the MSS option allows anything above that.)