Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 1996 20:02:45 +0100 (MET)
From:      Conny Larsson <conny@teligent.se>
To:        questions@freebsd.org
Subject:   TCP/IP performance - urgent!
Message-ID:  <Pine.BSF.3.91.960216194105.9578A-100000@kvaser.teligent.se>

next in thread | raw e-mail | index | archive | help

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  






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960216194105.9578A-100000>