E N D
1. Benjamin Armstrong
Senior Program Manager Lead
Microsoft Hyper-V and Dynamic Memory in Depth
3. Agenda Users, Memory & Virtualization
Dynamic Memory
Architecture & Concepts
System Impact
Memory Techniques / Competition
4. Users, Memory & Virtualization
5. No one can size VMs How much memory does an IIS server actually need?
Print server?
File server?
Branch Cache?
Direct Access?
How much will performance be affected if you halved the amount of memory in a VM?
6. No one wants to size VMs New virtual machines get 1GB of RAM [no matter what the VM is running]. I only give people more memory if they complain about performance
All VMs get 4GB of RAM [I have no idea what is happening with that memory] and no one complains
I take the minimum system requirements and add (insert one: 50%, 100%, 150%)
A vendor tells me their app needs 4GB of RAM. I do not have the time to test this to find out if it is true or not
7. Memory is a Bottleneck Key factor to the number of running VMs
Possibly most expensive asset in system
8. Customer Requirements Maximum density, without sacrificing performance
Give predictable performance
Dont provide a feature thats unsuitable for production use
9. Hyper-V R2 SP1Dynamic Memory
10. Dynamic Memory Goals Higher VM consolidation ratios with minimal performance impact
Dependent on:
How much variation in memory utilization the workloads have
How good a job you did of sizing the systems in the first place
Work well for both server and desktop workloads
Add minimal overhead to the system
Pass the that looks right test
11. Adding/Removing Memory Adding Memory
Enlightened fashion
Synthetic Memory Driver (VSP/VSC Pair)
No hardware emulation
Light weight
Removing Memory
Wanted to remove memory
Ballooning is more efficient
Messes up task manager in the guest OS
12. System Requirements Parent Requirements:
Windows Server 2008 R2 SP1
Microsoft Hyper-V Server 2008 R2 SP1
Windows Server 2003, 2008 & 2008 R2
32-bit & 64-bit versions
Windows Vista and Windows 7
Enterprise and Ultimate Editions only
32-bit & 64-bit versions
13. Dynamic Memory Architecture & Concepts
14. Obligatory Block Diagram
15. Availability Availability is a concept
How much memory does the VM have?
How much memory does the VM want?
The difference is the availability
Availability shows how much RAM is free
E.G. A virtual machine currently needs 780MB of RAM it has 900MB of RAM. This means that the availability is (900-780)/780 == 15.3%
E.G. A virtual machine currently needs 1000MB or RAM it has 1200MB of RAM. This means that the availability is (1200-1000)/1000 = 20%
16. Pressure Pressure is another way to talk about the memory state of the virtual machine
Not used in the UI but is used in performance counters.
Pressure == amount of memory the VM wants / the amount of memory the VM has
Pressure of 1 (or 100%) means the VM has exactly what it wants
Below 100% means there is free room
Over 100% means that the VM is squeezed (high pressure)
17. Memory Buffer How much free memory should we try and keep in the VM?
Allows for responsiveness to bursty workloads
Can be used for file cache
I like to configure my virtual machines so that they have ~20% free memory
18. Benjamin ArmstrongSenior Program Manager LeadMicrosoft Dynamic Memory DEMO
19. System Impact
20. Changes to Root Reserve Hyper-V has always had the concept of a reserve of memory that is kept for the parent partition
DM allows VMs to push up against the reserve consistently
New behavior to better protect the parent partition from rampaging virtual machines
New registry key in place
Allows you to reserve static memory for the parent partition
HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\MemoryReserve
May result in less memory being available for VMs
21. Dynamic Memory System ImpactChanges to NUMA Management Hyper-V tries to get all memory for a VM from a single NUMA node; when it cannot, the VM spans NUMA nodes
Dynamic memory can result in more virtual machines spanning NUMA nodes; a VM might start all on one node but added memory might come from another node
New option to disable NUMA node spanning makes the system behave like multiple small computers
21
22. Memory Techniques / Competition
23. Understanding philosophical differences Microsoft
Understands what guest information to use
Building on top of guest OS knowledge
Trying to get the best bang for buck in virtual memory management
VMware
Does not trust guest information
Building a black box solution
Started with memory swapping, and digging out of the hole
24. Dynamic Memory, not Overcommit Overloaded Term
Page Sharing
Second Level Paging
Balloon Type Mechanisms
No one wants to overcommit their resource
You dont overcommit other resources (really you do not)
VMware does not want you to overcommit memory (really)
DM treats memory like we treat CPU resources
Dynamically schedulable resource
25. External Page Sharing How it works:
Hash all memory and store it in a table
Identify the common hashes and then
Perform a bit by bit comparison
What VMware doesnt tell you
Page Sharing not dynamic
Can take hours to share pages
The largest benefit are zero pages
Doesnt work with large pages
26. Second Level Paging Many problems:
Swapping Guest Kernel Resources
Double Paging
Disks are slow
But it always works
27. Other Techniques Memory compression
Guest directed page sharing
And on
We will continue to invest here and work on identifying the best techniques for customer work loads
28. What next?
29. Test the beta and talk to us! Try Dynamic Memory out for both server and desktop environments
Let us know how DM is working for you
Let us know if you think we have something wrong
30. Question & Answer Session
31. Complete an Evaluation on CommNet and enter to WIN these prizes!<Prizes & Process TBC>
32. Related Content SVR313 Windows Server 2008 R2 Hyper-V Performance Analysis: How You Can Get the Most out of Hyper-V SVR307 RemoteFX drilldown: What is it? How does it work?
SVR315 Disaster Recovery and Virtualization Backup Best Practices
SVR306 Networking and Windows Server 2008 R2 Hyper-V: Deployment Considerations
34. Resources