0

In KVM, NIC model can be set to virtio (latest) or the older e1000 (not recommended, emulated). In virtio, one has the option of using vhost-net driver or qemu.

vhost-net and qemu differs in how packets are sent from guest to host and subsequently sent to physical NIC.

The vhost-net module is a kernel-level back end for virtio networking that reduces virtualization overhead by moving virtio packet processing tasks out of user space (the QEMU process) and into the kernel (the vhost-net driver). vhost-net is only available for virtio network interfaces. If the vhost-net kernel module is loaded, it is enabled by default for all virtio interfaces, but can be disabled in the interface configuration if a particular workload experiences a degradation in performance when vhost-net is in use. cite

My question is, how do one check if vhost-net module is loaded or not? Does the usual command modinfo work here as well?

1

To see which kernel modules are loaded use the lsmod command.

You can use grep to pipe the output of lsmod to filter something more desirable.

e.g.

# lsmod | grep net
vhost_net              24576  10
vhost                  45056  1 vhost_net
tap                    24576  1 vhost_net

This host is using vhost_net kernel module - I happen to have 10 adapters configured, the output of ifconfig lists 10 vnet adapters. The 10 in the lsmod | grep output is the number of times the kernel module is being used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.