Ethernet UDP outgoing speed very slow

I’ve problem with VIM3 Pro and image Ubuntu 20.04 (Focal Minimal, Kernel 4.9).

There is odd behaviour of ethernet connections. I’m measuring speed with iperf3.
Outgoing UDP speed from VIM3 is between 18-26 Mbits/s while TCP speed is between 750-810 Mbit/s.
Incoming speed both for UDP and TCP is between 938-951 Mbit/s.
I know that iperf3 for UDP by default limit speed down to 1 MBit/s so I disable that limit using -b 0 flag.

Since TCP speed is much higher then it could not be problem with network itself.
Also same problem exists with FriendlyARM’s NanoPi NEO4 board (Rockchip RK3399 chip).
But not with Raspberry Pi 4B with 64-bit Ubuntu 20.04 or Odroid XU4 with 32-bit Ubuntu 20.04

Have anyone encouter with such problem?

Hello @hyphop

Do you have any suggestions?

tnx for testing!

i can test pure UDP connection very easy

start on my pc (listen income UDP)
nc -l -u -p 1234 >/dev/null

start on VIM3

root@Krescue:/# ifconfig eth0 | grep addr
          inet addr:192.168.100.75  Bcast:192.168.100.255            
root@Krescue:/# ping -c1 192.168.100.80
PING 192.168.100.80 (192.168.100.80) 56(84) bytes of data.
64 bytes from 192.168.100.80: icmp_req=1 ttl=64 time=0.573 ms

--- 192.168.100.80 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.573/0.573/0.573/0.000 ms

root@Krescue:/# pv /dev/zero | nc -u 192.168.100.80 1234 
^Cpunt! 0:00:15 [79.6MiB/s] [              <=>                                 ]
1.19GiB 0:00:15 [78.8MiB/s] [               <=>                                ]

Perfect :wink: but with mainline kernel

but for vendor (Ubuntu 20.04 (Focal Minimal, Kernel 4.9).) i can see same result like your :wink: CONFIRMED

need check kernel network configs

PS: if i try start second connection i have good results already :wink:

#PC
nc -l -u -p 1234 >/dev/null &
nc -l -u -p 1235 >/dev/null &
bwm-ng

# VIM3
nc -u 192.168.100.80 1234 < /dev/zero &
nc -u 192.168.100.80 1235 < /dev/zero &

For kernel does not matter. I’m just want to use VIM3 with minimal efforts. Of course I could follow hardcore way with buildroot.
For me it is just very odd why this happens for UDP (I could understand for TCP but not for UDP).
I would like to know what kernel module responsible for this.
I’ve tried to increase net.ipv4.udp_wmem_min and net.ipv4.udp_rmem_min via sysctl but there no results.

If you can simple suggest way to install Ubuntu 20.04 (without X11) with good kernel I would be glad.

I’m receiving same results always.
I would prefer if you test with iperf3 to be at same environment as me. With it I have same connection speed as my own app (which mostly send UDP/RTP packets).

I ran into the same problem, did you manage to solve it?

  1. fenix → build generic image → ubuntu
  2. or install this image + https://dl.khadas.com/Firmware/Krescue/images/Generic_Ubuntu-minimal-focal_Linux-5.16-rc2_arm64_SD-USB_V1.0.7-211122-develop.img.xz (can write to sd or write to emmc via krescue )