Updates from QA Training

Windows Server 2012 Hyper-V Dynamic Memory and Smart Paging

With the release of Hyper-V 3.0 Microsoft made some changes in improve Virtual Machine memory management which will allow increased density but can cause problems in some scenarios.


Paul Gregory | 14 March 2013

With the release of Hyper-V 3.0 Microsoft made some changes in improve Virtual Machine memory management which will allow increased density but can cause problems in some scenarios.

The new features within dynamic memory allows the setting of a Startup RAM value as well as the Minimum value we had in Windows Server 2008R2 SP1 as well as the addition of a feature called Smart Paging. With dynamic memory in Windows Server 2008R2 SP1 the minimum memory value could cause problems and administrators had to make a decision. 

The problem was in some situations in order to get the VM to book quickly the minimum memory needed to be set quiet high but once the VM stabilised the memory requirement for the VM was quite low. You can see this with Domain Controllers. If the minimum memory was set to 1.5GB the VM would book quickly but then it would settle down and need less than 0.5GB, so memory was being wasted. 

Large application services could be much worse. To resolve this in V3.0 we now have a Startup RAM value. This is the memory the VM is powered on with. Once the VM is up and running if the Hyper-V host comes under memory pressures it will remove 'spare' memory from the VM's. This will entail removing all the required unused memory from VM's down to their minimum value, if possible, to generate the free memory needed. This now introduces another problem. 

What if I have a VM which has a Startup RAM of 10GB and a Minimum of 1GB and due to memory pressures the VM memory has been claimed back by Hyper-V and the VM only has 1GB of RAM allocated?

Due to the provisioning of VM services the host only has 2-3GB's free. If this VM was rebooted it would not start because 10GB of RAM is not available in the host. In this one scenario (VM-Restart), Hyper-V will perform the following actions once the VM tries to restart to free up 10GB of RAM:

 -
Try to reclaim memory from other Dynamic Memory VM's.

If this fails enable Smart Paging for the VM.

Smart Paging will allocate diskspace on the Host to be used as a RAM swapfile for the VM's memory. This swapfile is stored, by default, in the same directory structure as the VM's files. This swapfile will only be big enough to provide the missing memory. Once the VM has booted, stabilised and the Integration services have initialized Hyper-V will reclaim memory from the VM so the swapfile is no longer required. 

Therefore the Smart Paging is only used to support the VM-Restart, is it not used to support the VM during normal operations. Also Smart Paging does not come into effect during VM boot from cold. So be careful if you choose to shut a VM down instead of restarting it!

Please watch this video to see this feature in action, attend a training course on Windows Server 2012   or attend our well received QA Authored Updating Hyper-V 3.0 skills course @QATraining

Paul
paul.gregory@qa.com .
Principal Technologist

Follow me on Twitter or see my YouTube channel

QA Training | Paul Gregory

Paul Gregory

Head of Microsoft Infrastructure

A Microsoft Certified Trainer since 1995, Paul has worked both for and with some of the world's leading IT Services organisations – including Unisys, Dell and Microsoft during the Microsoft Windows (TAP) Technology Adoption Programme. Paul specializes in delivering training around the Windows Operating system as well infrastructure and management solutions around System Center going right back to SMS 1.0. Paul is a frequent visitor to Microsoft's Global Headquarters in Seattle to attend early product workshops and for many years has delivered training courses around the world on behalf of Microsoft. In addition to being actively involved in Microsoft's Windows TAP programme, Paul has recently delivered both Microsoft's Private Cloud 2012 readiness training to partners in the UK and was a member of the Microsoft global training team delivering Windows Server 2012 early adopter training. During recent years Microsoft has requested Paul to deliver System Center training at both Redmond and The South American head office to Microsoft Partners.
Talk to our learning experts

Talk to our team of learning experts

Every business has different learning needs. QA has over 30 years of experience in combining the highest quality training with the most comprehensive range of learning services, ensuring the very best fit for your organisation.

Get in touch with our learning experts to talk about how we can help.