From owner-freebsd-questions Fri Feb 16 10:05:27 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA20339 for questions-outgoing; Fri, 16 Feb 1996 10:05:27 -0800 (PST) Received: from teligent.se ([194.17.198.3]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id KAA20330 for ; Fri, 16 Feb 1996 10:05:11 -0800 (PST) Received: from kvaser.teligent.se (kvaser.teligent.se [194.17.198.44]) by teligent.se (8.6.12/8.6.12) with SMTP id TAA26793 for ; Fri, 16 Feb 1996 19:05:58 +0100 Date: Fri, 16 Feb 1996 20:02:45 +0100 (MET) From: Conny Larsson To: questions@freebsd.org Subject: TCP/IP performance - urgent! Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org Precedence: bulk Hi all, I'm currently involved in the development of a performance sensitive program and is experiencing a strange - at least to me - problem. In short, I get substantial performance degradation using TCP/IP stream sockets when the size of the data being sent/received is within certain intervals. For example, I have two programs - a socket server (S) and a client (C). The client will send N bytes to the server, getting 100B in return, send an additional N bytes, getting 100B in return a.s.o. Both test programs are "straight-off the student books", no strange stuff. Testing using the above programs yields excellent performance (both when the client and the server is on separate machines, and when both are on the same mach) as long as the number of bytes sent (N) is within either of the following ranges: 0 - 2K 16K - 28K 42K - 72K .... but 100 times slower if N is: 2K+1 - 16K-1 28K+1 - 42K-1 (e.g. I can do 400+ read/writes per second if I keep the data size within the first set of ranges, but only 5 per second using the latter set.) Hence, it is faster to send 16KB than to send 2049B. For my application, this is not so good! (to put it mildly). Can anybody help me? If I am doing anything wrong, tell me what, if I can circumvent this behaviour somehow, or if this is a bug of some sort???? This is becoming a show-stopper, so please....I may even reward the person that solves this! Changing buffer sizes, send/receive spaces etc does not help at all. The same behaviour is found both on FreeBSD 2.0.5 and 2.1.0. Please respond also to my e-mail address, as I am not a mailing list subscriber yet. (e-mail to "conny@teligent.se") Thanks in advance, ...C