From owner-freebsd-net Fri Sep 21 0:46:50 2001 Delivered-To: freebsd-net@freebsd.org Received: from fgwmail5.fujitsu.co.jp (fgwmail5.fujitsu.co.jp [192.51.44.35]) by hub.freebsd.org (Postfix) with ESMTP id 59B8537B41C for ; Fri, 21 Sep 2001 00:46:47 -0700 (PDT) Received: from m7.gw.fujitsu.co.jp by fgwmail5.fujitsu.co.jp (8.9.3/3.7W-MX0108-Fujitsu Gateway) id QAA27101 for ; Fri, 21 Sep 2001 16:46:46 +0900 (JST) (envelope-from tsuchiya@flab.fujitsu.co.jp) From: tsuchiya@flab.fujitsu.co.jp Received: from const.kawasaki.flab.fujitsu.co.jp by m7.gw.fujitsu.co.jp (8.9.3/3.7W-0108-Fujitsu Domain Master) id QAA28913 for ; Fri, 21 Sep 2001 16:46:45 +0900 (envelope-from tsuchiya@flab.fujitsu.co.jp) Received: (from tsuchiya@localhost) by const.kawasaki.flab.fujitsu.co.jp (8.9.3+3.2W/3.5Wpl7) id QAA09541 for net@FreeBSD.org; Fri, 21 Sep 2001 16:46:56 +0900 Date: Fri, 21 Sep 2001 16:46:56 +0900 Message-Id: <200109210746.QAA09541@const.kawasaki.flab.fujitsu.co.jp> To: net@FreeBSD.org Subject: TCP performance question Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello, we observed that TCP is somewhat slow with FreeBSD. Does anybody know this kind of behavior?: We have investigated the problem with simple program like: client server for(){ for(){ write(fd, buf, size); read (fd, buf, size); read (fd, buf, size); write(fd, buf, size); } } and we changed the size from 1 to 10000 byte and measured the time of read/write pair on the server. Usually the measured time is around or less than 1 msec, however it is always 100msec when the size is between 2049 and 2919 byte or between 4381 and 5839 byte or between 7301 and 8751 byte. 100 times slower. Then we measured each of write and read on the client, then we noticed that the write always finishes very quickly like 80usec, and the read is 1msec, and it gets 100msec in ranges above. So I thought there was some buffering with socket write, and I tried SO_OOBINLINE, and TCP_NODELAY, but they did not work on this problem. I checked with tcpdump and found there was no re-sending of packet. I did this between two FreeBSD4.2 machines and between FreeBSD4.1.1 and Solaris 8. Between two Solaris 8 machines, it did not happened. Is this a known problem? or I am doing something wrong? Thanks, Yoshi --- Yoshihiro Tsuchiya To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message