Date: Fri, 06 Nov 1998 04:33:29 -0800 From: David Greenman <dg@root.com> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: Marc Slemko <marcs@znep.com>, cvs-committers@FreeBSD.ORG Subject: Re: sendfile() Message-ID: <199811061233.EAA15930@implode.root.com> In-Reply-To: Your message of "Thu, 05 Nov 1998 23:23:59 PST." <199811060723.XAA01903@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> Heh. Well, I wrote a little program to test the overhead of > sendfile() vs write() in the 100% cached case. The program > makes a tcp connection to another program that just sinks the > data. > > Over localhost (with the sink program running on the same > host), it's 9x more efficient to use sendfile(). Over > a 10BaseT Lan (with the sink program running on the > remote host) it's 2x and 2.8x more efficient using > sendfile(). A couple of comments about the benchmarks: having a process on the same machine sink the data will pessimize the results since there will be a kernel->user copy, even though the data is thrown away. The LAN test you did is unusually slow; on a P6/200 with 100Mbps DMA fast ether (fxp) talking to another machine as a data sink, I measured very close to 1/10th of the CPU consumption when sending a cached file vs. the same except using ttcp with a cached file (which does a read/write loop). -DG David Greenman Co-founder/Principal Architect, The FreeBSD Project To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811061233.EAA15930>