You are not logged in.

#1 2016-10-14 22:00:30

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

[KVM] High CPU load by Virtio net driver

On my Arch server, I set up a slim Arch installation inside a KVM, to serve solely as hostapd instance for one USB card. It connects to a host bridge with Virtio driver.

The problem is, that when there is any significant transfer (lets say anything above 300kb/s)  between the host and and WiFi guest connected to the hostapd KVM, the CPU usage on host goes up up to 100%.

I previously experienced that with FreeBSD KVM guest and I took it that Virtio drivers in BSD are not fully compatible with KVM. But I was dead-sure that linux-on-linux Virtio net driver would perform with minimal CPU overhead. Was my assumption incorrect, or is there some setting I could tweak or change?

Offline

#2 2016-10-15 15:17:26

damjan
Member
Registered: 2006-05-30
Posts: 462

Re: [KVM] High CPU load by Virtio net driver

I can't reproduce that,
nc -l -p 9999 < /dev/zero # on the host
nc host 9999 > /dev/null  # on the guest

I get some 6.9Gbit/s data rate, nc is using 99% of the cpu in the guest, while on the host: nc is using 36%, with vhost-857 using 22% and qemu 100% (it's a dual core)

Offline

#3 2016-10-15 20:21:55

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: [KVM] High CPU load by Virtio net driver

I tried your method and it upped host CPU only to 20%, but this is not real-life load.
Can you try running speed-test on the client connected to guest?
This is what I am getting on host in this scenario:
http://storage2.static.itmages.com/i/16 … 4264e2.png

126%  cpu load on host.

Offline

Board footer

Powered by FluxBB