Q. With Hyper-V R2 SP1 dynamic memory, how should I set Startup RAM and Maximum RAM?

A. Correctly sizing the amount of RAM you assign to virtual machines (VMs) is a task that nobody does very well. Some of us just assign 4GB and move on. Others assign a minimum amount, adding extra RAM only when users complain.

But there's an argument that determining the correct amount of RAM is best left to the machine itself. Who knows better than that VM how much RAM it needs? Its performance counters always know how much it has and how much it's just about to need.

That's why dynamic memory in Hyper-V R2 SP1 is a pretty slick new feature. With dynamic memory, your Hyper-V host takes care of monitoring memory use and needs on every VM. It does its checks every second, ensuring that immediate VM needs can be quickly taken care of.

This said, using dynamic memory requires you to set values for Startup RAM and Maximum RAM for each VM. These values tell dynamic memory the absolute minimum amount of RAM (Startup RAM) required in order to boot the machine and get the dynamic memory management functionality up and running. The values also identify the maximum amount of RAM that any VM should ever be assigned (Maximum RAM).

You'll obviously then want to keep your Startup RAM at a lowest-possible value. By default, this value is set to 512MB per VM. That value identifies the bare minimum of what is needed to get the machine booted so that Dynamic Memory can begin identifying its real needs.

Because Dynamic Memory does all the memory management work for you, each VM's Maximum RAM setting simply needs to be set at a sufficiently high number. The default is 65536MB which gives the manager a supremely large leeway in directing RAM to needy computers.

However, there may come a situation where setting Maximum RAM to a lesser value can be important. For example, if you have a VM workload that will absolutely suck up every bit of RAM that's available for it. Or if you have lots of desktop VMs on a server and you want to prevent a user from loading a monster database.

Setting a much lower limit on Maximum RAM in these cases prevents the situation where one VM still needs the RAM but isn't playing nicely with others in how much it needs. Set this value to a lower quantity when you don't trust the VM not to behave in its memory consumption.

Catch up with @ConcentratdGreg on Twitter!

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.