Hello, Can you clarify a bit your topology? * virtio-net is tipically a driver within the guest * vhost-user is deployed in the hyperfvisor.
Maybe a diagram would help us to understand. Jerome De : <vpp-dev@lists.fd.io> au nom de "chu.penghong" <javin...@163.com> Date : mardi 28 avril 2020 à 09:16 À : "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> Objet : [vpp-dev] Why performance of vpp vhost-user is poorer than vhost-net Hello, I use vpp as the bridge between two virtual manchines on the same host. I use vpp vhost-user as the backend and use iperf3 on the vm to test tcp performance. I found that the performance of vpp vhost-user is poorer than vhost-net. For vhost-net, I can get 30Gbps . For vpp vhost-user, I only get 10Gbps. This is the vpp output : vpp# show vhost-user Virtio vhost-user interfaces Global: coalesce frames 32 time 1e-3 Number of rx virtqueues in interrupt mode: 0 Number of GSO interfaces: 2 Interface: VirtualEthernet0/0/0 (ifindex 1) GSO enable virtio_net_hdr_sz 12 features mask (0xffffffffffffa27c): features (0x15020dd83): VIRTIO_NET_F_CSUM (0) VIRTIO_NET_F_GUEST_CSUM (1) VIRTIO_NET_F_GUEST_TSO4 (7) VIRTIO_NET_F_GUEST_TSO6 (8) VIRTIO_NET_F_GUEST_UFO (10) VIRTIO_NET_F_HOST_TSO4 (11) VIRTIO_NET_F_HOST_TSO6 (12) VIRTIO_NET_F_HOST_UFO (14) VIRTIO_NET_F_MRG_RXBUF (15) VIRTIO_NET_F_GUEST_ANNOUNCE (21) VIRTIO_F_INDIRECT_DESC (28) VHOST_USER_F_PROTOCOL_FEATURES (30) VIRTIO_F_VERSION_1 (32) protocol features (0x3) VHOST_USER_PROTOCOL_F_MQ (0) VHOST_USER_PROTOCOL_F_LOG_SHMFD (1) socket filename /home/pml/run/sock1.sock type client errno "Success" rx placement: thread 6 on vring 1, polling tx placement: spin-lock thread 0 on vring 0 thread 1 on vring 0 thread 2 on vring 0 thread 3 on vring 0 thread 4 on vring 0 thread 5 on vring 0 thread 6 on vring 0 thread 7 on vring 0 thread 8 on vring 0 Memory regions (total 3) region fd guest_phys_addr memory_size userspace_addr mmap_offset mmap_addr ====== ===== ================== ================== ================== ================== ================== 0 60 0x0000000000000000 0x00000000000a0000 0x00007f659e200000 0x0000000000000000 0x00007faa41a00000 1 61 0x00000000000c0000 0x00000000bff40000 0x00007f659e2c0000 0x00000000000c0000 0x00007f4fff0c0000 2 62 0x0000000100000000 0x0000000140000000 0x00007f665e200000 0x00000000c0000000 0x00007f4ebf000000 Virtqueue 0 (TX) qsz 1024 last_avail_idx 39946 last_used_idx 39946 avail.flags 0 avail.idx 40511 used.flags 1 used.idx 39946 kickfd 63 callfd 64 errfd -1 Virtqueue 1 (RX) qsz 1024 last_avail_idx 46846 last_used_idx 46846 avail.flags 1 avail.idx 46846 used.flags 1 used.idx 46846 kickfd 58 callfd 65 errfd -1 Interface: VirtualEthernet0/0/1 (ifindex 2) GSO enable virtio_net_hdr_sz 12 features mask (0xffffffffffffa27c): features (0x15020dd83): VIRTIO_NET_F_CSUM (0) VIRTIO_NET_F_GUEST_CSUM (1) VIRTIO_NET_F_GUEST_TSO4 (7) VIRTIO_NET_F_GUEST_TSO6 (8) VIRTIO_NET_F_GUEST_UFO (10) VIRTIO_NET_F_HOST_TSO4 (11) VIRTIO_NET_F_HOST_TSO6 (12) VIRTIO_NET_F_HOST_UFO (14) VIRTIO_NET_F_MRG_RXBUF (15) VIRTIO_NET_F_GUEST_ANNOUNCE (21) VIRTIO_F_INDIRECT_DESC (28) VHOST_USER_F_PROTOCOL_FEATURES (30) VIRTIO_F_VERSION_1 (32) protocol features (0x3) VHOST_USER_PROTOCOL_F_MQ (0) VHOST_USER_PROTOCOL_F_LOG_SHMFD (1) socket filename /home/pml/run/sock2.sock type client errno "Success" rx placement: thread 8 on vring 1, polling tx placement: spin-lock thread 0 on vring 0 thread 1 on vring 0 thread 2 on vring 0 thread 3 on vring 0 thread 4 on vring 0 thread 5 on vring 0 thread 6 on vring 0 thread 7 on vring 0 thread 8 on vring 0 Memory regions (total 3) region fd guest_phys_addr memory_size userspace_addr mmap_offset mmap_addr ====== ===== ================== ================== ================== ================== ================== 0 68 0x0000000000000000 0x00000000000a0000 0x00007f314a600000 0x0000000000000000 0x00007faa41800000 1 69 0x00000000000c0000 0x00000000bff40000 0x00007f314a6c0000 0x00000000000c0000 0x00007f4d3f0c0000 2 70 0x0000000100000000 0x0000000140000000 0x00007f320a600000 0x00000000c0000000 0x00007f4bff000000 Virtqueue 0 (TX) qsz 1024 last_avail_idx 50139 last_used_idx 50139 avail.flags 0 avail.idx 50761 used.flags 1 used.idx 50139 kickfd 71 callfd 72 errfd -1 Virtqueue 1 (RX) qsz 1024 last_avail_idx 24888 last_used_idx 24888 avail.flags 1 avail.idx 24888 used.flags 1 used.idx 24888 kickfd 66 callfd 73 errfd -1 vpp# show node counters Count Node Reason 382312 l2-output L2 output packets 382312 l2-learn L2 learn packets 382312 l2-input L2 input packets 20 VirtualEthernet0/0/1-tx tx packet drops (no available descriptors) 34878 l2-output L2 output packets 34878 l2-learn L2 learn packets 34878 l2-input L2 input packets Please can you tell me what is wrong ? Thank you
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#16170): https://lists.fd.io/g/vpp-dev/message/16170 Mute This Topic: https://lists.fd.io/mt/73322483/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-