0% found this document useful (0 votes)
96 views27 pages

Vhost Virtio Net Need For Speed 2

The document discusses virtio-net and vhost-net, which are used to improve network performance for virtual machines. Vhost-net allows the virtual switch to be bypassed, sending packets directly from the guest to the host networking stack. This reduces overhead compared to traditional tap devices. New features like ioeventfd, irqfd, and multiqueue rings are described which further optimize networking performance and provide features like interrupt handling between guest and host. Areas for continued improvement are also outlined.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODP, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views27 pages

Vhost Virtio Net Need For Speed 2

The document discusses virtio-net and vhost-net, which are used to improve network performance for virtual machines. Vhost-net allows the virtual switch to be bypassed, sending packets directly from the guest to the host networking stack. This reduces overhead compared to traditional tap devices. New features like ioeventfd, irqfd, and multiqueue rings are described which further optimize networking performance and provide features like interrupt handling between guest and host. Areas for continued improvement are also outlined.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODP, PDF, TXT or read online on Scribd
You are on page 1/ 27

virtio- and vhost- net

Michael S Tsirkin Red Hat

need for speed


Performance challenges

1
TX
Guest
Guest

KVM
KVM tap
tap

qemu
qemu
2
RX
Guest
Guest

KVM
KVM tap
tap

qemu
qemu
3
Vhost-net
Guest
Guest

KVM Vhost-net tap


KVMVhost-net tap

qemu
qemu
4
TX
Guest
Guest

KVM
KVM Vhost-net
Vhost-net tap
tap

5
RX
Guest
Guest

KVM
KVM Vhost-net
Vhost-net tap
tap

6
ioeventfd
Guest
Guest

KVM
KVM eventfd
eventfd Vhost-net
Vhost-net

qemu
qemu
7
ioeventfd
Guest
Guest

KVM
KVM eventfd
eventfd Vhost-net
Vhost-net

qemu
qemu
8
irqfd
Guest
Guest

KVM
KVM eventfd
eventfd Vhost-net
Vhost-net

qemu
qemu
9
irqfd
Guest
Guest

KVM
KVM eventfd
eventfd Vhost-net
Vhost-net

qemu
qemu
10
Mb/s

Guest Host ●
Host Guest

vhost
User User vhost
space space
11
trans/s

vhost

User space
12
macvtap
Guest
Guest

KVM
KVM Vhost
Vhost tapmacvtap
tap bridge
bridge

NIC
NIC
13
zcopy
Guest
Guest

KVM
KVM Vhost
Vhost macvtap

NIC
NIC
14
zcopy
Guest
Guest

KVM
KVM Vhost
Vhost backend

NIC
NIC
15
Header copy
Guest
Guest hdr

KVM
KVM Vhost
Vhost backend

NIC
NIC
skbuff
16
alignment
hdr data
Guest
Guest

KVM
KVM Vhost
Vhost backend

NIC
NIC 17
multiqueue
Guest
TX RX TX RX

TX RX Macvtap TX RX

?
RX NIC
TX TX RX
18
Virtio ring
Avail Desc Used

Guest Vhost
19
fragmentation
Desc

41 packets
packet
Vhost

20
new ring
Avail Desc Used

id

Vhost
21
window
!
Used
Guest Vhost

22
Publish guest index
!
Used
Guest Vhost

23
Guest 2 external

Guest
Guest Guest
Guest
KVM
KVM Vhost
Vhost tap
tap bridge
bridge tap Vhost
tap Vhost KVM
KVM

NIC
NIC

Thread per guest 24


Thread per host
Guest 2 Guest

Guest
Guest Guest
Guest
KVM
KVM Vhost
Vhost tap
tap bridge
bridge tap Vhost
tap Vhost KVM
KVM

Thread per host


Thread per guest 25
status

ioevenfd/irqfd V

Vhost-net V

Virtio-net tuning V

Macvtap V

Mergeable buffers V

26
TODO

Zero copy +

Multiqueue +

Virtio ring +

Threading ?

Level interrupts ?

27

You might also like