William, I tested it in VM because I doesn't have physical machine with new kernel, the number is similar, mine is about 2 Gbps, can you show me your iperf output for the case without this patch, I saw a very strange phenomenon, with this patch, retransmit is almost 0, but without this patch, retransmit is extremely high, maybe this can explain why somehow, I will investigate this further, I doubt two consecutive packets have overlap for the case without this patch, you can check source code, from source code, this patch is more efficient, maybe this is an issue on kernel side otherwise. I'll check it further.
-----邮件原件----- 发件人: dev [mailto:[email protected]] 代表 William Tu 发送时间: 2020年2月26日 6:32 收件人: [email protected] 抄送: yang_y_yi <[email protected]>; ovs-dev <[email protected]> 主题: Re: [ovs-dev] [PATCH v5] Use TPACKET_V3 to accelerate veth for userspace datapath On Mon, Feb 24, 2020 at 5:01 AM <[email protected]> wrote: > > From: Yi Yang <[email protected]> > > 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 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
