Hyper-V in Windows 10

Are you using Hyper-V on your Windows 10 machine and toying around with virtual machines or did you test it and reverted back to VMware Workstation or Oracle Virtualbox?

If you found that Hyper-V was to sluggish you may want to read the following and perhaps give it another try sometime.

Changes in memory allocation

Starting in build 15002, Microsoft changed how Hyper-V on Windows 10 allocates memory for starting virtual machines.

In the past, when you started a virtual machine, Hyper-V allocated memory very conservatively.  As an example, we maintained reserved memory for the Hyper-V host (root memory reserve) so even if task manager showed 2 GB available memory, Hyper-V wouldn’t use all of it for starting virtual machines. Hyper-V also wouldn’t ask for applications to release unused memory (trim). Conservative memory allocation makes sense in a hosting environment where very few applications run on the Hyper-V host and the ones that do are high priority – it doesn’t make much sense for Windows 10 and desktop virtualization.

In Windows 10, you’re probably running several applications (web browsers, text editors, chat clients, etc) and most of them will reserve more memory than they’re actively using.  With these changes, Hyper-V starts allocating memory in small chunks (to give the operating system a chance to trim memory from other applications) and will use all available memory (no root reserve). Which isn’t to say you’ll never run out of memory but now the amount of memory shown in task manager accurately reflects the amount available for starting virtual machines.

Note:  For people using Hyper-V with device emulators in Visual Studio – the emulator does have overhead so you will need at least 200MB more RAM available than the emulator you’re starting suggests (i.e. a 512MB emulator actually needs closer to 700MB available to start successfully).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s