Why Windows 10 is slow? Is it because of HVM?

96 views
Skip to first unread message

Guerlan

unread,
Jan 19, 2020, 1:34:44 AM1/19/20
to qubes-users
Windows 10 VM is considerably slower than my traditional PV VMs, the ones that come with Qubes. In fact no one would notice that my PV VMs are virtualized, they look just like regular bare metal machines.

However, Windows 10 has lags. Anyone would notice and think either the computer is slow or the system is badly virtualized. For example, when I press Win button, it takes a while for the menu to appear. I can only think that it's because Windows 10 is running in HVM mode. Should I try running it in PV mode? If so, how?

Claudio Chinicz

unread,
Jan 19, 2020, 1:58:17 AM1/19/20
to qubes-users
Hi,

As far as I understand, HVMs should be faster than PV. With the latter, the OS makes hyper calls to the hyper-visor while HVMs simply see virtualized hardware through the hyper visor.
 
I use Win 10 HVM with 6GB RAM and see no difference from another notebook where I run Win 10 bare metal with 8GB.

Maybe you're running Win with 4GB?

Regards

Claudia

unread,
Jan 19, 2020, 6:32:11 AM1/19/20
to Claudio Chinicz, qubes-users
January 19, 2020 6:58 AM, "Claudio Chinicz" <cchi...@gmail.com> wrote:

> Hi,
>
> As far as I understand, HVMs should be faster than PV. With the latter, the OS makes hyper calls to
> the hyper-visor while HVMs simply see virtualized hardware through the hyper visor.

I always thought the opposite was true. PVs should be faster because they don't have to go through a hardware emulator, they can just communicate with the hypervisor using an efficient protocol. I think that was the only reason for creating PVs in the first place (other than historical reasons before VT-x maybe). Otherwise they would have made HVM the only mode, much like KVM does.

Btw, Qubes 4.0 uses PVH as the default mode, except for PCI passthru VMs. The reason is that the PV, while efficient, has become really insecure and is becoming deprecated. PVH runs the VM under VT-x like an HVM, but also has special guest-side PV drivers to make I/O faster by bypassing the emulated hardware. For example, PV(H) guests use the blkback driver (e.g. xvda) while HVM guests use a virtual SATA controller (e.g. sda) which is emulated by Qemu in userspace. Similarly, PV(H) uses netfront (e.g. "vif0" network interface) while HVMs use an emulated ethernet device (e.g. "eth0"). For PCI devices, PV(H) uses pcifront, however I think this is deprecated, which is why Qubes 4.0 uses HVM for all passthru VMs. HVMs use the platform features (e.g. IOMMU) to passthru the actual PCI hardware.

HVM:
DomU driver -> Xen -> Qemu -> Dom0 hardware driver -> Dom0 hardware

PV:
DomU PV driver -> Xen -> Dom0 hardware

At least that's my understanding.

Claudia

unread,
Jan 19, 2020, 6:36:26 AM1/19/20
to Guerlan, qubes-users

You could try it in PV mode. I'm not sure if it's supported by Qubes but you could probably make it work. https://xenproject.org/windows-pv-drivers/

Also consider that Windows might simply be slower than Linux, especially in resource-constrained environments like a VM. Are your Linux HVMs also slow/laggy?

Guerlan

unread,
Jan 19, 2020, 8:32:52 PM1/19/20
to qubes-users
I have kali linux in HVM mode and it's as fast as the PV VMs. The probem seems to be related to windows. I'm gonna try to make Windows 10 PV anyway
Reply all
Reply to author
Forward
0 new messages