[ovs-dev] [PATCH v5] Use TPACKET_V3 to accelerate veth for userspace datapath

William Tu u9012063 at gmail.com
Tue Feb 25 22:32:23 UTC 2020


On Mon, Feb 24, 2020 at 5:01 AM <yang_y_yi at 126.com> wrote:
>
> From: Yi Yang <yangyi01 at inspur.com>
>
> We can avoid high system call overhead by using TPACKET_V3
> and using DPDK-like poll to receive and send packets (Note: send
> still needs to call sendto to trigger final packet transmission).
>
> From Linux kernel 3.10 on, TPACKET_V3 has been supported,
> so all the Linux kernels current OVS supports can run
> TPACKET_V3 without any problem.
>
> I can see about 30% performance improvement for veth compared to
> last recvmmsg optimization if I use TPACKET_V3, it is about 1.98
> Gbps, but it was 1.47 Gbps before.
>
> TPACKET_V3 can support TSO, it can work only if your kernel can
> support, this has been verified on Ubuntu 18.04 5.3.0-40-generic
> , if you find the performance is very poor, please turn off tso
> for veth interfces in case userspace-tso-enable is set to true.

Do you test the performance of enabling TSO?

Using veth (like your run-iperf3.sh) and with kernel 5.3.
Without your patch, with TSO enabled, I can get around 6Gbps
But
with this patch, with TSO enabled,
the performance drops to 1.9Gbps.

Regards,
William


More information about the dev mailing list