Port-arm archive

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

Re: genet0 speeds under NetBSD/aarch64 on Rpi4 8 GB using UEFI/ACPI v1.17 firmware



I think RPi network chipset is no good, or maybe there are no optimized
drivers. Even on Linux, there is very high CPU usage servicing network
interrupts, so I would guess there is no hardware TCP offload engine.

I don't use iperf, but with my own bench tool it spends 0% CPU time
in user, 100% CPU time in system, and about 85% CPU time in interrupt.
On NetBSD, interrupts are serviced on CPU 0, so when bench tool happens
to run on the same CPU, starvation occurs and network throughput drops.

I don't know why there is such high system CPU usage, most of the time
is spent in send() or recv() syscalls, so I guess it's just copying
data from one place to another.

Below my test results on NetBSD with client running in half-duplex
mode, i.e. only sending.

With thread 1 affinity set to CPU 0, I get around 50 MiB/sec. This is
due to interrupts also using the same CPU:

rp4# .obj/sv_tcp -mode=cli_hdx -ip=192.168.1.104 -port=9999 -size=1g -ta=1:0
Per-thread metrics:
  T1      con 0.1686 msec, nodelay=Off, reuseaddr=Off, rcv_lowat=1, snd_lowat=2048
          rcv_mss=1448, snd_mss=1460, rcv_buf=33580, snd_buf=123416
          rcv_size_min,max,avg,cnt 0, 0, 0, 0
          snd_size_min,max,avg,cnt 27888, 65536, 65532, 16385
          rcv 0.00 msec, 0.00 MiBs, 0.00 Pks
          snd 20235.72 msec, 50.60 MiBs, 36343.64 Pks

Aggregate metrics:
  con 0.1686 msec
  rcv 0.00 msec, 0.00 MiBs, 0.00 Pks
  snd 20235.72 msec, 50.60 MiBs, 36343.64 Pks
  r+s 20235.72 msec, 50.60 MiBs, 36343.64 Pks



With thread 1 affinity set to CPU 1, I get around 73 MiB/sec:

rp4# .obj/sv_tcp -mode=cli_hdx -ip=192.168.1.104 -port=9999 -size=1g -ta=1:1
Per-thread metrics:
  T1      con 0.2503 msec, nodelay=Off, reuseaddr=Off, rcv_lowat=1, snd_lowat=2048
          rcv_mss=1448, snd_mss=1460, rcv_buf=33580, snd_buf=139800
          rcv_size_min,max,avg,cnt 0, 0, 0, 0
          snd_size_min,max,avg,cnt 8688, 65536, 65528, 16386
          rcv 0.00 msec, 0.00 MiBs, 0.00 Pks
          snd 13892.90 msec, 73.71 MiBs, 52936.35 Pks

Aggregate metrics:
  con 0.2503 msec
  rcv 0.00 msec, 0.00 MiBs, 0.00 Pks
  snd 13892.90 msec, 73.71 MiBs, 52936.35 Pks
  r+s 13892.90 msec, 73.71 MiBs, 52936.35 Pks


Home | Main Index | Thread Index | Old Index