Hi,
On Saturday, December 3, 2011 14:24 CET, Henning Brauer <lists-open...@bsws.de> 
wrote: 
 
> * Sebastian Reitenbach <sebas...@l00-bugdead-prods.de> [2011-12-03 01:12]:
> > Thanks to your pointers on icb, I found the autosizing algorithm at the end 
> > of netinet/tcp_userreg.c.
> > There I saw its comparing the actual value of fill level of the buffer, and 
> > how much got transferred against a 
> > maximum defined in sys/socketvar.h:
> > 
> > #define SB_MAX          (256*1024)
> > 
> > With the default value of 256*1024, I got the maximum transfer rate of 
> > about 1.5MB/s.
> > This speed there was fairly constant, when the maximum was reached.
> > Then I doubled the value to 512*1024, and got constant transfer rates of 
> > about 2.7MB/s, which is about the same speed like I got with the Linux host.
> > Then I again doubled the value to 1024*1024, and got speeds of about 5MB/s. 
> > This was not so constant anymore. Here I got spikes of up to 7MB/s, and in 
> > the middle it dropped down to 2-3 MB/s.
> > Then again doubled the value to 2048*1024, and then I got transfer speeds 
> > of about 8MB/s. So about 2.5 times faster than with Linux as the server. 
> > Also here, the transfer rates are not constant over the download, they are 
> > varying from 3MB/s and going up to over 9MB/s, nearly to the maximum the 
> > network card in the server provides (100MBit).
> 
> ok, so we're dealing with a high-latency high-bandwidth connection.

yep, as it states in the subject ;)

> there bigger buffers and thus seqnr windows help a lot - due to the
> latency.
> 
> > Since my knowledge to the network stack is next to zero, I don't really 
> > know what side effects it would have, to raise the default to a higher 
> > value, and if it would acceptable to have those varying transfer speeds, 
> > instead of the constant rates with the lower values.
> > Maybe a problem for machines with lower memory?
> 
> "low memory" is a bit misleading, we're talking about pretty special
> memory here - but yes, hundreds or thousands of sockets with 2MB buffers
> in use each would be a problem. there is a backpressure mechanism in
> the autosizing algorithm to (try to) avoid this; we might very well
> want to increase SB_MAX a bit.

Didn't had time today, I'll do some more testing, also even trying to find a 
gigabit card that  I can put into the box, just to see if I can get even more 
speed...

I'll then send a followup patch to tech@

thanks,
Sebastian


> 
> -- 
> Henning Brauer, h...@bsws.de, henn...@openbsd.org
> BS Web Services, http://bsws.de, Full-Service ISP
> Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully 
> Managed
> Henning Brauer Consulting, http://henningbrauer.com/

Reply via email to