Libvirt KVM high CPU usage with USB attached device
Today I have needed to attach permanently an USB device to a Linux Virtual machine hosted on Ubuntu 18.04 running on KVM hypervisor.
All works fine except that the CPU usage on the Host was oddly high even if the Guest OS was idle.
The CPU usage on Host was always over 12% that is very high if at the same time the Guest is doing nothing. I mean that while the Guest CPU was between 0% and 2% the Host thread was between 12% and 15%.
The only apparent solution found was switching 'hpet' timer from 'no' to 'yes' as discussed in a thread on the Proxmox Forum.
But it didn't the trick (it was related to Windows Guest).
The solution
At the end I found that switching the controller USB model from USB2 to USB3 changed the scenario making Host CPU usage (when Guest is idle) between 2% and 5% that is definitely acceptable. So easy!














