Re: [RFC 00/12] io_uring zerocopy send

From: David Ahern
Date: Tue Nov 30 2021 - 22:10:58 EST


On 11/30/21 8:18 AM, Pavel Begunkov wrote:
> Early proof of concept for zerocopy send via io_uring. This is just
> an RFC, there are details yet to be figured out, but hope to gather
> some feedback.
>
> Benchmarking udp (65435 bytes) with a dummy net device (mtu=0xffff):
> The best case io_uring=116079 MB/s vs msg_zerocopy=47421 MB/s,
> or 2.44 times faster.
>
> № | test: | BW (MB/s) | speedup
> 1 | msg_zerocopy (non-zc) | 18281 | 0.38
> 2 | msg_zerocopy -z (baseline) | 47421 | 1
> 3 | io_uring (@flush=false, nr_reqs=1) | 96534 | 2.03
> 4 | io_uring (@flush=true, nr_reqs=1) | 89310 | 1.88
> 5 | io_uring (@flush=false, nr_reqs=8) | 116079 | 2.44
> 6 | io_uring (@flush=true, nr_reqs=8) | 109722 | 2.31
>
> Based on selftests/.../msg_zerocopy but more limited. You can use
> msg_zerocopy -r as usual for receive side.
>
...

Can you state the exact command lines you are running for all of the
commands? I tried this set (and commands referenced below) and my
mileage varies quite a bit.

Also, have you run this proposed change (and with TCP) across nodes
(ie., not just local process to local process via dummy interface)?

> Benchmark:
> https://github.com/isilence/liburing.git zc_v1
>
> or this file in particular:
> https://github.com/isilence/liburing/blob/zc_v1/test/send-zc.c
>
> To run the benchmark:
> ```
> cd <liburing_dir> && make && cd test
> # ./send-zc -4 [-p <port>] [-s <payload_size>] -D <destination> udp
> ./send-zc -4 -D 127.0.0.1 udp
> ```
>
> msg_zerocopy can be used for the server side, e.g.
> ```
> cd <linux-kernel>/tools/testing/selftests/net && make
> ./msg_zerocopy -4 -r [-p <port>] [-t <sec>] udp
> ```
>