NetBSD-Users archive

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

Re: Slow 'real world' network performance



On Sat, Oct 25, 2025 at 4:09 PM Michael van Elst <mlelstv%serpens.de@localhost> wrote:
> The examples given here are already all you can tune. Basically you
> bump the buffer sizes to allow for larger TCP windows.
...
> This is the major reason for your observations (and shows that
> NetBSD has room for improvement).

Thank you, good to know.

Since I get good speeds with FreeBSD I figure the sysctl settings
ought to be a good reference. Hopefully I got the right sysctls since
the naming is a bit different.

NetBSD defaults -> FreeBSD defaults

kern.sbmax: 262144 -> kern.ipc.maxsockbuf: 2097152
kern.somaxkva: 16777216 (16MB) -> kern.ipc.nmbclusters: 970576 (1896MB)
OpenBSD has kern.maxclusters: 262144 (512MB)
net.inet.tcp.sendspace: 32768 -> same
net.inet.tcp.sendbuf_inc: 8192 -> same
net.inet.tcp.sendbuf_max: 262144 -> 2097152
net.inet.tcp.recvspace: 32768 -> 65536
net.inet.tcp.recvbuf_inc: 16384 -> doesn't have
net.inet.tcp.recvbuf_max: 262144 -> 2097152

net.inet.tcp.init_win: 4 -> net.inet.tcp.initcwnd_segments: 10
net.inet.tcp.init_win_local: 4 -> doesn't have
net.inet.tcp.congctl.selected: newreno -> net.inet.tcp.cc.algorithm: cubic
net.inet.tcp.delack_ticks:20 -> net.inet.tcp.delacktime: 40

As for the vioif0 specific tunings, as compared to ixg0 Martin listed
hw.vioif0.tx.process_limit: 256
hw.vioif0.rx.process_limit: 256
I tried 512 in combination with other changes and on it's own and
didn't see any noticeable gains.

With default settings I had:
python server upload 20 MB/s max
download to server from my providers looking glass test file 30 MB/s max

Here's the /etc/sysctl.conf I tested.

kern.sbmax=2097152
kern.somaxkva=536870912
net.inet.tcp.sendbuf_max=2097152
net.inet.tcp.recvbuf_max=2097152

net.inet.tcp.init_win=10
net.inet.tcp.init_win_local=10
net.inet.tcp.congctl.selected=cubic
net.inet.tcp.delack_ticks=40

hw.vioif0.tx.process_limit=512
hw.vioif0.rx.process_limit=512

And I got very similar results. The biggest difference by far is
network congestion etc. that's out of my control.

Thanks for the help.

-- 
Thanks
Peter


Home | Main Index | Thread Index | Old Index