Latest Articles related to all categories. Microsoft, Twitter, Xbox, Autos and much more

Full width home advertisement

Post Page Advertisement [Top]

Dynamic Memory was introduced for Hyper-V in Windows Server 2008 R2 as a way of
enabling virtualization hosts to make more effective use of physical memory allocated to VMs running on the host. Dynamic Memory works by adjusting the amount of memory available
to the VM in real time. These adjustments in memory allocation are based on how much
memory the VM needs and on how Dynamic Memory has been configured on the VM.
Dynamic Memory provides important scalability and performance benefits, especially for virtual desktop infrastructure (VDI) environments, where at any given time, a subset of the VMs running on the host tend either to be idle or to have a relatively low load. By using Dynamic Memory in such scenarios, you can consolidate greater numbers of VM on your Hyper-V hosts. The result is that you’ll need fewer hosts for provisioning virtual desktops

to your user population, which means you won’t need to procure as much high-end server hardware. In other words, Dynamic Memory can help you save money.

Configuring Dynamic Memory

Dynamic Memory is enabled on a per-VM basis. You can enable and configure Dynamic Memory in the Memory section of the VM’s settings in Hyper-V Manager, as shown in Figure 2-13 below. You also can enable and configure Dynamic Memory using Windows PowerShell by using theSet-VM cmdlet, which can be used to configure the various
properties of a VM. Note that you can enable or disable Dynamic Memory only when the VM
is in a stopped state.

FIGURE 2-13 Configuring Dynamic Memory for a VM.

Configuration options for Dynamic Memory for VMs on Hyper-V hosts running Windows
Server 2008 R2 were as follows:

  • Startup RAM The amount of memory needed for starting the VM
  • Maximum RAM The maximum amount of memory that the VM can use
  • Memory buffer An amount of memory (as a percentage of the amount that the VM actually needs to perform its workload) that can be allocated to the VM when there is sufficient memory available on the host
  • Memory weight A parameter that determines how available memory on the host is allocated among the different VMs running on the host

Configuration options for Dynamic Memory for VMs on Hyper-V hosts running Windows
Server 2012 have been enhanced in several ways:
A new configuration setting called Minimum Memory allows you to specify the minimum amount of memory that the VM can use when it is running. The reason for introducing
this new setting is because Windows generally needs more memory when starting than it does when idle and running. As a result of this change, you now can specify sufficient startup memory to enable the VM to start quickly and then a lesser amount of memory (the minimum memory) for when the VM is running. That way, a VM can get some extra memory so it can start properly, and then once it’s started, Windows reclaims the unneeded memory so other VMs on the host can use the reclaimed memory if needed.
Another change in the way that Dynamic Memory can be configured in Windows Server
2012 is that now you can modify the maximum and minimum memory settings while the VM is running. In Windows Server 2008 R2, the maximum memory setting could be modified only when the VM was in a stopped state. This change gives you a new way of quickly provisioning more memory to a critical VM when needed.

Smart Paging

Specifying a minimum memory for a VM can enable Windows to reclaim some unneeded memory once the VM has started. Then this reclaimed memory can be reallocated towards other VMs on the host. But this raises a question: What if you start as many VMs as you can
on a host, allow Windows to reclaim unneeded memory once the VMs are running, then start more VMs using the reclaimed memory, then again allow Windows to reclaim any additional unneeded memory, then try to start more VMs on the host . . . and so on? Eventually, you reach the point where almost all the host’s memory is in use and you’re unable to start
any more VMs. But then you find that one of your running VMs needs to be restarted immediately (for example, to apply a software update). So you try and restart the VM, and it shuts down successfully but it won’t start again. Why not? Because there’s not enough free memory on the host to meet the Startup RAM criterion for that VM.
To prevent this kind of scenario from happening while enabling Dynamic Memory to work its scalability magic, Hyper-V in Windows Server 2012 introduces a new feature called Smart Paging (see Figure 2-14). Smart Paging allows a VM that’s being restarted to use disk resources temporarily on the host as a source for any additional memory needed to restart
the VM successfully. Then, once the VM has started successfully and its memory requirements lessen, Smart Paging releases the previously used disk resources because of the performance hit that such use can create.

FIGURE 2-14 Smart Paging works with Dynamic Memory to enable reliable VM restart operations.

Smart Paging is used only when a VM is restarted and there is no free physical memory on the host and no memory can be reclaimed from other running VMs. Smart Paging is not used if you simply try and start a VM that’s in a stopped state, or if a VM is failing over in a cluster.

Viewing Dynamic Memory at work

Sometimes small changes make a big difference in the usability of a user interface feature. In the Hyper-V Manager of Windows Server 2008 R2, you could monitor in real time how much physical memory was allocated to each VM that had Dynamic Memory enabled on it. This
real-time allocation amount is called the assigned memory. In addition, you could monitor the memory demand (the total committed memory) and the memory status (whether the current amount of memory assigned to the VM as a buffer is sufficient) for the VM. The problem, though, was that these real-time measurements were displayed as columns in the Virtual Machines pane of Hyper-V Manager, which meant that you had to scroll horizontally to
see them.

Hyper-V in Windows Server 2012 adds a series of tabs to the bottom central pane, and by selecting the Memory pane, you can view the assigned memory, memory demand, and memory status for the selected VM quickly (see Figure 2-15).

FIGURE 2-15 Using Hyper-V Manager to display real-time changes in memory usage by a VM with

Dynamic Memory enabled.

You also can use the Get-VM cmdlet in Windows PowerShell to display these same real-time measurements, as shown in Figure 2-16.

FIGURE 2-16 Using Windows PowerShell to display real-time changes in memory usage by a VM with

Dynamic Memory enabled.

Blogger Labels: Dynamic,Memory,improvements,Hyper,Windows,Server,adjustments,allocation,performance,infrastructure,environments,subset,scenarios,user,population,money,basis,settings,Manager,Figure,PowerShell,properties,Note,Configuration,options,Startup,Maximum,percentage,workload,parameter,Minimum,Another,Smart,example,criterion,scenario,disk,resources,requirements,Sometimes,difference,interface,addition,status,measurements,columns,Virtual,Machines,pane,scroll,series,tabs,usage,cmdlet

No comments:

Post a Comment

Bottom Ad [Post Page]