On 3/6/26 02:48, Michael van Elst wrote: > You may want to try this patch. It restricts each wm interface to a single > send queue. A real fix would restrict each flow to a single queue, so > that packets are not reordered. The patch also bumps the send queue > to 4k packets, maybe not ideal, but that needs further analysis.
Thank you very much. If I understand correctly, this seems to have to do with having multiple CPUs, but my VM is running on a single vCPU. I still tried the patch to no effect. However, this will be useful if I decide to increase the amount of vCPUs. Thanks. In any case, I tried different buffer sizes, and the stability of the connection seems to change with it. For example, with a 6303600 byte buffer it can reach surprising speeds in the best case: https://u.omaera.org/nbsd_good_6303600.png That said, increasing the buffer this much makes the packet loss more common and whenever it happens it seems to have a really hard time recovering from it, to the point it often stalls completely. It's as if it's choking: https://u.omaera.org/nbsd_bad_5042880.png So I feel comfortable setting it to a more conservative value like 3025728, which gives me comparable speeds to the other OSes I tried while not compromising on stability so much: https://u.omaera.org/nbsd_ok_3025728.png I feel it's still slightly sensitive to any packet loss in comparison but at least it can recover from it instead of stalling completely. I also tried vioif(4) once again and it still crawls at KB/s speeds, so I'll definitely stay with wm(4) - it's more than enough for a web server (I don't have big files in it anyway), and as a VPN it also works as UDP still works great with wm(4). I hope this is useful for anyone else having trouble with NetBSD network speeds under QEMU - make sure you try with E1000 emulation first. Since UDP looked fine with virtio I wrongly assumed that was not the issue and took forever to finally give E1000 a try. I am not sure how much of this is expected or known behavior, but I feel comfortable installing NetBSD now on my Japanese server. Hopefully I'll learn more about it so I can provide better feedback when reporting these issues. Feel free to contact me anytime if you'd like me to do more testing. Thank you for your time and insight. - z411
