larger buffer -> slower net transfer?

Don Speck speck%cit-vlsi at CIT-VAX.ARPA
Sun Oct 6 18:19:39 AEST 1985


    The recent comments on ftp speed prompted me to profile
a simple SOCK_STREAM transfer to see if I could make it go
any faster, and I found something very strange:  increasing
the write size beyond 1K made the transfer rate *slower*
(in both real and sys time), not faster.

    write size	sys time    (10240K transferred, total)
	1K	 107 sec
	2K	 109 sec
      1.25K	 161 sec
	5K	 140 sec
       10K	 123 sec

This must be symptomatic of some great inefficiency in the
4.2bsd kernel.	(It happens on both Vax and Sun).  Why does
the kernel take longer to split a large write into packets
than if I split it myself?  Isn't the rationale for having
it in the kernel "to make it fast"?

	Don Speck	speck at cit-vax.arpa



More information about the Comp.unix.wizards mailing list