NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Weird network performance problem



ci4ic4%gmail.com@localhost (Chavdar Ivanov) writes:

>> > If I revert to 32768, I get back about the third of the speed.


NetBSD has rather small buffers as default and the auto scaling code
isn't as aggressive as the one in Linux or FreeBSD.

If you disable auto scaling, then the configured space is fixed
unless the program asks for a value itself (iperf3 option -w).

If you enable auto scaling (the default), then the configured space
is the minimum and you have net.inet.tcp.{send,recv}buf_{inc,max}
to give (somewhat linear) increments and a maximum. A program that
sets the buffer sizes itself automatically disables autoscaling
for that buffer (so don't use iperf3 -w then).

If you increase buffers you may also need to bump the limits
kern.sbmax (maximum size for a socket buffer) and kern.mbuf.nmbclusters
(system wide number of mbuf clusters of 2kbyte each).

Apparently the W10 clients add something to network latency, which means
that larger buffers are required to get best performance.


I suggest for a regular 64bit PC you keep autoscaling, bump read and write
minimum to 128k, increment to 256k and maximum to 2M+128k.  Also set sbmax
to 2MB+128k and nmbclusters to >= 65536 (128MB).

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index