In mid March Microsoft officially announced the upcoming introduction of Dynamic Memory for Hyper-V, a feature for memory overcommit that will arrive as part of the Windows Server 2008 R2 Service Pack 1.
Early information about how Dynamic Memory works were published a couple of weeks ago by a company evangelist but promptly removed.
Microsoft is receiving heavy criticism from VMware supporters about Dynamic Memory after downplaying the value of VMware overcommit techniques for years. So it is trying to be as careful and detailed as possible in explaining its approach to memory management in virtualization.
To do so Jeff Woolsey, Lead Program Manager, Windows Virtualization, is publishing on the corporate blog a series of very long posts that aims at explaining the different approach between Microsoft and VMware to memory overcommit.
The most relevant piece to date is the one appeared yesterday, where he talks about page sharing, one of the techniques used by VMware.
The whole article is worth a reading but virtualization.info publishes here just the conclusion points (emphasis is from Microsoft):
- Large Memory (2MB) Pages support is widely available in processors from AMD and Intel today. AMD has included Large Memory Page Support in the last few generations of Opterons and Intel has added support in the new “Nehalem” processors. In short, Large Memory Pages will soon be standard.
- Page Sharing on systems with Large Memory Pages enabled results in almost no shared pages. While you can identify and share 4k pages relatively easily, the likelihood of sharing a 2MB page is very, very low (if not, zero). Again, this is an area where Microsoft and VMware agree.
- Read that last bullet item again
- Page Sharing works with small 4k memory pages. The downside to small memory pages is that they don’t efficiently use the TLB while Large Memory Pages more efficiently use the TLB and can significantly boost performance
- Using small 4k memory pages instead of Large Memory pages reduces performance on SLAT hardware by ~20%
- Windows Server 2008/2008 R2 have Large Memory Pages enabled by default
- Windows Vista/7 have Large Memory Pages enabled by default
- Windows Server 2008 R2 Hyper-V added support for Large Memory Pages and is one of the many new performance improvements in R2 (surprise!)
- Page Sharing efficacy is decreasing (irrespective of Large Memory Pages) as modern OSes take full advantage of system memory to increase performance
- The process of inspecting, hashing all the memory in the system, storing it in a hash table and then performing a bit-by-bit inspection can take hours. The time it takes is dependent on a number of variables such as the homogeneity of the guests, how busy the guests are, how much memory is physically in the system, if you’re load balancing VMs, etc.
- Page sharing isn’t a particularly dynamic technique, meaning, if the hypervisor needs memory for another virtual machine immediately, page sharing isn’t the best answer. The converse is true as well. If a virtual machine frees up memory which could be used by other virtual machines, page sharing isn’t the best answer here either.