Link to home
Start Free TrialLog in
Avatar of Steve
SteveFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Hyper-v 2012 R2 Memory Demand vs Memory Allocated

Interesting question for anyone who knows Hyper-V well.

Scenario:
Hyper-V 2012 R2 cluster with shared SAN storage.
3 x nodes with 256GB physical memory running server 2012 R2 Datacentre

Example VM running Server 2008 R2, fully updated with integration services installed and upto date.
Startup mem is 24GB, min memory is 24GB, max is 65GB & memory buffer is 5%


Issue:
Memory Demand clearly shows the VM needs more memory (48GB), but the Assigned Memory is significantly lower (32GB).

I've confirmed the host has plenty of memory available (currently 76GB) and that only around 10gb may be reserved by the memory buffer of other VMs.
No memory priorities are set on any VMs.

My question:
Any idea why Hyper-V isn't assigning the memory the VM demands, and do you have any thoughts on how to solve the issue?
Avatar of Cliff Galiher
Cliff Galiher
Flag of United States of America image

Hyper-v allocates memory based on an algorithm that includes time. Otherwise a VM spike could actually cause memory allocation and then de-allocarion which is a heavier performance hit than if memory had never been allocated. Like most things in Hyper-v, or even windows, the best way to get insight into the patterns of behavior is performance counters, not one-off glances at the hyper-v manager.
What is running in the guest?

Some server roles/services do not work well with dynamic memory such as earlier versions of SQL and Exchange.
Avatar of Steve

ASKER

Hi Cliff,
This demand has been unsatisfied for around 6 hours now. That should be long enough for any algorithm to take action.

Hi Philip,
It s a terminal server. No SQL or exchange on it.
MS Office apps etc. and that's pretty much all it does.
"That should be long enough for any algorithm to take action."

And that is why I say you *need* to use performance counters. "Should" is an assumption. Knowng what your VMs are demanding (all of them, not just the one in question) is the only reliable way to see trends and issues.
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hah. Good catch Lee. The assigned memory of 32GB should've been a dead giveaway for me. I guess I just assumed that the OP wouldn't assign more memory to a standard install and it never occurred to me. Now that I've reread the post though, the edition was not specified and that perfect 32 is a pretty good indicator. Sad I missed it.
Avatar of Steve

ASKER

Bang. and that's what I use Experts exchange for!
Spot on. An entire room of techies forgot to check the OS version!
#SchoolboyError

Thanks Lee.

For the record, I understand and agree with Cliff's suggestions of perf requirements in many cases but in this case it seems likely that being under-resourced by around 16GB for a significant period of time when there are confirmed resources available is not an expected/intended outcome of any criteria/algorithm.
I acknowledge that 'should' is an assumption as noted in my comment above, but it is a fair assumption to make in the circumstances and warrants alternative thinking in addition to the usual diagnostic steps like perf monitors etc......


Cliff is ABSOLUTELY correct - you NEED to establish what kind of performance requirements you have...
Nope. he wasn't  :-)