NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
RE: Low capped TCP network speeds over the Internet
Hi All,
I've collected some sysctl for my purpose: https://fido.e-utp.net/2025/01/22/NETBSD-SYSCTL.html
Not sure that this help in that case, but helps me.
Thanks,
--
Marcin Gondek / Drixter
http://fido.e-utp.net/
AS56662
-----Original Message-----
From: netbsd-users-owner%NetBSD.org@localhost <netbsd-users-owner%NetBSD.org@localhost> On Behalf Of Michael van Elst
Sent: Thursday, March 5, 2026 6:55 AM
To: netbsd-users%netbsd.org@localhost
Subject: Re: Low capped TCP network speeds over the Internet
z411%omaera.org@localhost (z411) writes:
>UDP speeds are great, but NetBSD specifically has an issue with
>TCP/HTTP. The speed seems to be capped to exactly 986 KB/s and it's
>very unstable (congestion handling issues I assume).
>I tried tuning the following:
>net.inet.tcp.recvbuf_auto=1
>net.inet.tcp.sendbuf_auto=1
>net.bpf.jit=1
>net.bpf.maxbufsize=4194304
>net.inet.tcp.sendbuf_max=16777216
>net.inet.tcp.recvbuf_max=16777216
>net.inet.ip.ifq.maxlen=4096
>net.inet.tcp.mssdflt=1072
You need to increase kern.sbmax too, this is a global limit on the socket buffer size. The default is 256kB, so at 200ms RTT you are limited to about 256kB/200ms ~ 10Mbit/s.
If you have many connections you may also need to increase kern.somaxkva that limits how much memory can be allocated to the network in total.
>Since post-tuning it's very stable I don't think it's about congestion
>anymore - but I'm not sure why I'm hitting this hard cap, even after
>increasing the buffer sizes. Could it be that NetBSD is not increasing
>the window size?
NetBSD will grow the window and has window scaling enabled by default.
However, it is very slow growing the send window after a congestion event.
Home |
Main Index |
Thread Index |
Old Index