
close
close
Security threats keep coming! Learn how to protect your organization.
A new feature was added to Hyper-V’s Dynamic Memory in Windows Server 2012 (WS2012) called Smart Paging. This new feature is something that you should very rarely see in the real world but is one that you should know about and understand. In this post I will explain what Smart Paging is and how it operates in Hyper-V Dynamic Memory.
The Smart Paging feature of Hyper-V is used in a very rare scenario when you need to restart one or more virtual machines on a memory starved host. The need for Smart Paging was introduced in WS2012 when the Minimum RAM setting was added. With Minimum RAM enabled, a virtual machine will boot up to its startup RAM (enough to boot the OS and get services running) and, if idle, it can balloon down to a lower amount of RAM as specified by Minimum RAM.
Let’s make this real with an example. Imagine a hosting customer in a cloud deploys a small specification virtual machine. This machine has the following settings:
advertisment
The virtual machine starts up and immediately consumes 512 MB plus an additional 20 percent of memory. Approximately 615 MB is consumed by the virtual machine from the host. No additional software is running, and like many hosting customers, the machine is left idle. Dynamic Memory will seek to optimize the memory allocation. Windows requires 512 MB to boot, but it can run on less! This virtual machine might balloon down to 300 MB RAM, less than the amount required to boot.
If any of the following happens then the virtual machine will need enough RAM to start the OS:
Now, 300 MB will not be enough to boot up the guest OS of the virtual machine. Normally, sufficient RAM will be assigned to the virtual machine. But what happens if the host’s administrators have been careless and deployed too many machines onto this Hyper-V host?
In the below example there are four such virtual machines, each requiring 512 MB to boot up and each able to balloon down to 300 MB. Each virtual machine is idle and has ballooned down, therefore consuming a total of just 1200 MB from the host. That’s fine, because the host had 1400 MB to run those four virtual machines.
The four virtual machines are patched and rebooted automatically. Now each virtual machine needs the memory defined in Startup RAM to get the guest OS started. There’s the problem: The host has just 1400 MB of RAM, which was fine for the virtual machines when they were idle, but now the virtual machines require a total of 2048 MB (and that’s without considering the buffer percentage).
advertisment
Smart Paging will reduce the performance of virtual machines temporarily before the idle back down to their previous state. You could argue that this doesn’t matter much because the virtual machines were idle anyway. But what if the host rebooted and every virtual machine had to start up again? You would have no control over which virtual machine would use Smart Paging in that scenario.
There are ways to avoid smart paging:
More in Hyper-V
Leveraging Virtualization for Improved Availability and Disaster Recovery
Apr 29, 2019 | Michael Otey
Most popular on petri