Transparent Page Sharing and Address Space Layout Randomization

I recently had a customer ask, “How is VMware’s Transparent Page Sharing impacted by Windows’ “new” Address Space Layout Randomization?”  Here is my response and some other interesting tidbits about what the other hypervisors are doing (or not doing) to increase consolidation ratios.

Microsoft’s Address Space Layout Randomization (ASLR) has little to no impact on VMware’s Transparent Page Sharing (TPS).  The intention of ASLR is to protect physical memory from things such as viruses by placing dll’s and executables in a virtual address space.  This virtual address space is then translated into the physical address by the operating system kernel.  Therefore, only the kernel has knowledge of the location of the physical mappings.

When a hypervisor like ESX/ESXi sits between the physical memory and the operating system, it takes the “physical mappings” from the OS and places then in true physical RAM.  Because the hypervisor controls the RAM, it can still perform TPS operations on this memory by identifying redundant memory pages and sharing them rather than duplicating them in memory.

Note that to-date, Hyper-V and XenServer do not offer any form of transparent page sharing.  Both XenServer and Hyper-V have implemented a memory ballooning technology (Dynamic Memory Control  and Dynamic Memory respectively) which VMware pioneered many years ago (~10 years).  These technologies utilize a driver in the guest operating system that intelligently “borrows” memory from the guest by essentially reducing the memory available to applications and the operating system without actually changing what is visibly shown in Windows.  Microsoft’s Dynamic Memory is only available with Hyper-V Server 2008 R2 Service Pack 1 which is currently only a release candidate.  It is supported in most server guest OS’s from 2003 through 2008 with particular Service Pack levels but it is only supported on client OS’s from Vista through Windows 7.  This means, VDI implementations that require XP will not benefit from the ballooning.

To summarize, no, TPS is not negatively impacted by ASLR.  Hyper-V and XenServer do not do any level of page sharing.  Actually, a year ago, Citrix and Microsoft strongly believed customers did not have a need to overcommit memory but it seems they are changing their stance on this because customers achieve far greater consolidation ratios on VMware vSphere.

One thought on “Transparent Page Sharing and Address Space Layout Randomization

Leave a Reply