From owner-freebsd-hackers Tue Apr 23 11:28:37 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from quic.net (romulus.quic.net [216.23.27.8]) by hub.freebsd.org (Postfix) with SMTP id CC2D137B405 for ; Tue, 23 Apr 2002 11:28:32 -0700 (PDT) Received: (qmail 22367 invoked by uid 1032); 23 Apr 2002 18:28:39 -0000 From: utsl@quic.net Date: Tue, 23 Apr 2002 14:28:39 -0400 To: Nate Williams Cc: hackers@FreeBSD.ORG Subject: Re: sendfile() in tftpd? Message-ID: <20020423182839.GA22074@quic.net> References: <3CC59C44.13013A1E@mindspring.com> <15557.40442.852602.681416@caddis.yogotech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15557.40442.852602.681416@caddis.yogotech.com> User-Agent: Mutt/1.3.27i 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 On Tue, Apr 23, 2002 at 11:46:34AM -0600, Nate Williams wrote: > > > > No, sendfile() is only for TCP connections, TFTP is using UDP. If you > > > > want performance, use something else. > > > It's even in the manpage: > > > Sendfile() sends a regular file specified by descriptor fd out a stream > > > socket specified by descriptor s. > > > > > > Silly me. BTW, I can't use anything else. Are there any alternatives to > > > TFTP for booting machines off the network? (using standard, PC components) > > > > USE TFTP to get a tiny image up, and then go TCP. > > > > There are also lightweight TCP stacks that fit in 8K or 16K; you > > could come up with your own protocol, or decide to use FTP instead > > of TFTP for the download. > > > > In general, the faster you get to something TCP based, the happier > > you will be, so if you *must* use TFTP, then make the boot image > > really, really small. > > 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. 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message