Sunday, April 18, 2010

How Dynamic memory Feature of 2008 R2 Sp1 works with Failover Clustering

The news of win2k8 R2 SP1 has started coming online and the most interesting feature is dynamic memory support for Hyper-V. Constraints on the allocation of physical memory represents one of the greatest challenges organizations face as they adopt new virtualization technology and consolidate their infrastructure. With Dynamic Memory, an enhancement to Hyper-v introduced in Windows Server 2008 R2 SP1, organizations can now make the most efficient use of available physical memory, allowing them to realize the greatest possible potential from their virtualization resources. Dynamic Memory allows for memory on a host machine to be pooled and dynamically distributed to virtual machines as necessary. Memory is dynamically added or removed based on current workloads, and is done so without service interruption. At a high level, Hyper-V Dynamic Memory is a memory management enhancement for Hyper-V designed for production use that enables customers to achieve higher consolidation/VM density ratios.

Dynamic Memory is supported on guest machines running Windows Server 2003 SP2 Datacenter or Enterprise editions, Windows Server 2008 SP1 Datacenter or Enterprise editions, Windows Server 2008 R2 Datacenter or Enterprise editions, Windows Vista SP2 Enterprise or Ultimate editions, and Windows 7 Enterprise or Ultimate editions. In today’s blog I am going to focus on how dynamic memory features along with failover clustering is a win win for everyone. I am going to take example of a 3 node cluster running on 2008 R2 server core with 16 GB ram each where Red VM’s workload require 4GB ram and Grey VM’s workload require 3GB ram.


So in case of static memory assignment we see that if a cluster node goes down I either need a passive node or I need to reduce the desnsity of VM’s so that that I can place VM’s from failing node on my existing cluster nodes. In the present case [shown above] I have reduced the density of VM that I can place on Cluster nodes and by doing that I am actually loosing out usage of 5GB ram on each cluster host. However when one of the node goes down the other 2 nodes will be able to take the load of the exiting node. So lets see what happens if one of my nodes actually go down for a short interval of time.


Though I see that my virtual machine resources do failover to node A and node B, yellow VM can still not come online on node B till the time I change its static ram and reduce it so that atleast it can start up on node B. This has to be a manual operation however even by doing that I cannot guarantee that workload running on that VM will have a sufficient performance. so in ideal scenario I should modify all the VM’s ram running on node B so that my yellow VM gets enough ram to give me satisfactory performance with provided resources in the short time window where one of my node is down temporarily. But the problem here is that I cannot reduce ram on fly from other VM’s without shutting them down which I cannot as they are in production and shutting them down is not feasible. Here, Dynamic memory assignment which is a feature of 2008 R2 Sp1 brings in the magic.
 
Now we have all 2008 R2 server core Nodes with Sp1 installed and hence dynamic memory assignment feature is available/VM. For every highly available VM running on all the 3 nodes I have given 512 MB as the initial memory [customizable] and 4 GB as the max memory. Dynamic memory allows us to configure a virtual machine so that the amount of memory assigned to the virtual machine is adjusted while the virtual machine is running, in comparison to the amount of memory that is actually being used by the virtual machine. This allows us to run a higher number of virtual machines on a given physical node. It also ensures that memory is always distributed optimally between running virtual machines. Some applications assign fixed amounts of memory based on the amount of memory available when the application first starts at start of operating system. These applications will perform better with higher values for the initial memory instead of 512 mb ram that I have assigned so it depends on the workload that you are running in VM. So in our scenario, if node C now goes down, the highly available virtual machines resources will failover to other nodes and will come online with optimized host ram being shared between Virtual machines and no manual intervention required. The great benefit that comes with dynamic memory is that if a VM do not require ram at one point of time, that ram can be leverage by other VM and when required can be given back. This allows us to increase VM density, better usage of ram resources and much more control and optimization of ram resources in a failover cluster node failure scenario.
 
 
There’s lot more coming about dynamic memory here and very soon we will also compare this with VMware overcommit/ballooning feature when we get more light thrown on how it works. Also very recently XEN has released new version of their hypervisor will additional features like Transcendent Memory and Page Sharing in Xen 4.0 to enhance the performance and capabilities of the hypervisor memory operations. Xen 4.0 now supports live transactional synchronization of VM states between physical servers [very similar to VMware fault tolerance feature]. Keep checking our blog for upcoming articles and thanks for your time and hope this blog would have been a reading pleasure for you and an insight into very nice dynamic memory feature coming in 2008 R2 sp1 which is yet to be released.
 
GAURAV ANAND

No comments:

Post a Comment