Replies: 25 comments 11 replies
-
Can you try with iio_readdev / iio_rwdev in every case, with the same parameters? |
Beta Was this translation helpful? Give feedback.
-
Edit: aaah shit, samplerate was set to low again (this really needs to be automated somehow!), now again... device 0.x, host 0.x
device 1.0, host 0.x
device 1.0, host 1.0
So here again, the combination 1.0 on device and 0.x on host is the fastest combination. There must be something to optimize in 1.0, but its quite close so it also might be nothing. But I am not seeing a speedup with libiio 1.0. |
Beta Was this translation helpful? Give feedback.
-
Well, 48 MiB/s is already about as fast as you can have on USB 2.0. You'd need a USB 3.0 Pluto to really benefit from the speedups. |
Beta Was this translation helpful? Give feedback.
-
I am using 1G ethernet on antsdr |
Beta Was this translation helpful? Give feedback.
-
I am adding iperf3 to the buildroot images of my pluto and antsdr so that I can run some benchmarks of the network performance |
Beta Was this translation helpful? Give feedback.
-
Better check CPU performance. Unless you are using beefier hardware the limiting factor will be the CPU. That's why I tested it on a ZCU702. |
Beta Was this translation helpful? Give feedback.
-
When I do top on the device during benchmark, CPU usage is at around 50%. But its only an average, there might be moments with higher CPU usage. Eventually the user should get noticed if overflows happen in hdl (DMA interface too slow) or in the device CPU (network interface too slow). @pcercuei Outputting if iiod is waiting for the network interface should be fairly easy, can You do that? |
Beta Was this translation helpful? Give feedback.
-
I managed to get htop running ony my ANTSDR. It was a little struggle, because I had to fix the ncurses package in buildroot first ^^ (https://github.com/catkira/buildroot/commit/66b2b6d6d34f918099860f8ac4a431d852a2e3bf) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I saw that the cross compilation is done without optimization (-Os) and only for armv7. Does the device cpu load go down a lot when You use the dmabuf interface? I guess thats what You mean by zero-copy right? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
https://github.com/analogdevicesinc/libiio/blob/master/iiod/ops.c#L316 |
Beta Was this translation helpful? Give feedback.
-
it seems like |
Beta Was this translation helpful? Give feedback.
-
@pcercuei its a bit faster when compiling the kernel with optimization for speed. Between 58-68 MiB/s now, but I think thats abou the end of what is possible. I want to try the DMABUF interface. Do You think its hard to merge Your kernel patch into the adi linux? |
Beta Was this translation helpful? Give feedback.
-
The DMABUF interface is basically the same as the mmap interface, just a bit different, so it won't give you much. The kernel patch would be quite difficult to merge into ADI's linux master branch, yes. |
Beta Was this translation helpful? Give feedback.
-
ah, I thought the DMABUF interface was the one used for zero-copy. |
Beta Was this translation helpful? Give feedback.
-
As I wrote above:
We don't test zero-copy on hardware because it's not implemented yet. |
Beta Was this translation helpful? Give feedback.
-
doesnt it make sense to have something running on hardware before You try to upstream it? |
Beta Was this translation helpful? Give feedback.
-
We're trying to upstream a kernel <-> userspace interface. It may support zero-copy later, but that's still TBD. |
Beta Was this translation helpful? Give feedback.
-
ok, but I mean even for the interface. Some requirements You only become aware of when You have a working example. But ok, I understand that this is nothing to wait for, because it probably takes >1year until zero-copy arrives. When it arrives it could eliminate the need to have PL usb3 or network interfaces for high bandwidth applications and enable new use cases for iio. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
But then your latency is most likely off the charts... |
Beta Was this translation helpful? Give feedback.
-
I hit the same performance limitation of libiio on LibreSDR (a PlutoSDR clone) with a Gigabit Ethernet port. The stock firmware can only run at about 47 MB/s and iiod CPU utilization was close to 100%. I tried to squeeze as much bandwidth as possible on this SDR:
I achieved about 108 MB/s using the
|
Beta Was this translation helpful? Give feedback.
-
Hi! I'm also experiencing similar performance limitations on a ZynqMP based AD9361 custom board. Getting about 55MB/s throughput over ethernet at close to 95% CPU usage. I tried compiling the kernel with the -O3 flag, adjusting smp_affinity for gem interrupts, and setting CPU binding for the IIO daemon. Still no noticeable improvement in throughput. Do you have any further suggestions? @hz12opensource |
Beta Was this translation helpful? Give feedback.
-
@catkira ideally we'd use the same port as the one the USB controller is connected to (and the Ethernet controller - I can only assume it's the same one) so that the respective DMAs are coherent between each other. That way, we can pass buffers around in a zero-copy fashion without the overhead of having to sync/flush the cpu caches. |
Beta Was this translation helpful? Give feedback.
-
@pcercuei
I compared stream throughput of libiio 0.x vs 1.x on the device, the host which is connected via 1G ethernet is running libiio 0.23. The benchmark was done with SoapySDRUtil using this command
SoapySDRUtil --rate="100000000" --direction=RX --args="driver=plutosdr,hostname=192.168.137.2"
with libiio 0.23 I get
11.1751 Msps 44.7002 MBps
with libiio 1.0 I get
15.863 Msps 63.4521 MBps
When I also install libiio 1.0 on the host and then perform a benchmark with this command:
Its interesting that there is already a significant speed improvement even when upgrading only on the device side
iio_rwdev -u ip:192.168.137.2 -B -b 65768 cf-ad9361-lpc
I get around
Throughput: 52 MiB/s
. Its interesting that this is slower than the 63 MB/s using libiio 0.23 on the host side.Beta Was this translation helpful? Give feedback.
All reactions