From owner-freebsd-hackers Tue Apr 23 11:34:35 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id 2DD3437B41B for ; Tue, 23 Apr 2002 11:34:27 -0700 (PDT) Received: from caddis.yogotech.com (caddis.yogotech.com [206.127.123.130]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id MAA09117; Tue, 23 Apr 2002 12:34:25 -0600 (MDT) (envelope-from nate@yogotech.com) Received: (from nate@localhost) by caddis.yogotech.com (8.11.6/8.11.6) id g3NIYPf70245; Tue, 23 Apr 2002 12:34:25 -0600 (MDT) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15557.43312.713502.540548@caddis.yogotech.com> Date: Tue, 23 Apr 2002 12:34:24 -0600 To: utsl@quic.net Cc: Nate Williams , hackers@FreeBSD.ORG Subject: Re: sendfile() in tftpd? In-Reply-To: <20020423182839.GA22074@quic.net> References: <3CC59C44.13013A1E@mindspring.com> <15557.40442.852602.681416@caddis.yogotech.com> <20020423182839.GA22074@quic.net> X-Mailer: VM 6.96 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [ TFTP performance is poor ] > > > USE TFTP to get a tiny image up, and then go TCP. > > > > > > Going to TCP soon assumes that you have a lossless medium in order to > > transmit packets over. If you're using a lossy medium, TFTP (and other > > UDP based protocols) can kick their butt because of TCP's assumption > > that packet loss is a function of congestion, which is often not the > > case in lossy mediums such as wirless. :( > > tftp in particular probably won't, because it uses the same packet > window concept as TCP, but with the window set to 1. Actually, it still tends to kick TCP's butt in very lossy networks, because or resends and other vaguaries of TCP. We've done benchmarks, and when packet loss gets bad, TCP backoff algorithm (which causes window size shrinkage *and* increases in resend delays) cause TCP to slow to a crawl. We've found that TFTP's timeouts tend to work better, although it may be more an issue of having the lower overhead vs. TCP. > It is a protocol that is braindead by design, in order to be simple to > implement. It was never pretended that performance was a design goal. Completely agreed on that point. Another point worth mentioning is that it's rather trivial to add in some extensions to TFTP (that are backwards compatible) to speed it up by increasing the window size to even 2 packets. We were able to do that and it almost halved the transfer times. :) However, it required slight modifications on the part of the sender, and the ability to recognize when the double window size modification had to be disabled because certain (very slow) pieces of hardware couldn't handle even the slight speedup of packets. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message