Hi Ken,
I have answers for some of your questions, but for some of the VC stuff I'll have to find other people to answer them.
Scenario 1: I create a VM and allocate 2GB vRAM and set a Reservation of 1GB. I install Windows as the Guest OS. Since this is a Windows VM, on startup, it will touch all allocated memory, which will indicate that the Reservation has been claimed.
- - ESX will not, via swapping/ballooning, reclaim the Reserved vRAM (1GB).
- - vRAM from Reservation to allocation could be reclaimed via swapping/ballooning
- - All pages of vRAM are eligible for collapse via TPS
Yep. So initially the VM may be using very close to its full memory, but over time TPS will bring that down (most likely even below the reservation).
Scenario 2: I create a VM and allocate 2GB vRAM and set a Reservation of 1GB. I install Linux as the Guest OS. Since this is a Linux VM, on startup, it will not gratuitously touch all allocated memory.
- - ESX will not, via swapping/ballooning, reclaim Reserved vRAM (up to 1GB) that has been touched by the Guest OS.
- - vRAM from Reservation to allocation could be reclaimed.
- - All pages of vRAM are eligible for collapse via TPS
Yep.
Questions:
- - Under what circumstances will the "touched" Reserved vRAM be released by ESX? (Guest OS shutdown/VM power cycle/etc.)
- Transparent page sharing
- "Hard" VM reset. In a hard reset, the underlying hypervisor code does a reset of the VM, thus releasing the VM's memory back to the free memory pool. If it's just a "soft" reset, initiated internally by the VM, then the hypervisor code doesn't even realize anything's happening, so the VM keeps all the memory it's allocated.
* - Under which counter(s) do these values show up in VC? (mem.granted.average / mem.consumed.average / etc.)
Unfortunately my knowledge is more ESX-specific, so I'm not sure about VC. But what values are you looking for in particular?
2. No, transparent page sharing is not disabled by default.Questions:
- - Does setting Reservation == Allocation in the .vmx file disable TPS for a VM?
Nope. TPS will run unless you explicitly disable it. (There's some VM config file option for it, but I can't think of it off the top of my head.)
- - Disabling TPS has been suggested for Citrix/TS workloads, does disabling TPS impact performance?
I've heard of this rumor as well, but I've yet to see any hard data that this actually helps. It's certainly possible that it does, but in general I'd recommend leaving TPS enabled unless you have specific data showing that disabling it will help improve performance. I'll ask some other engineers in the resource mgmt group and get their feedback as well.
- - Can you explain the purpose of each of the following advanced configuration options?
Basically how aggressive do you want TPS to scan for shared pages? Obviously TPS has a cost to running in terms of CPU, but has benefits in terms of reduced memory usage. So there's a tradeoff. We have a default that we think is a good balance, but we let the user modify that if they want.
I think both of these are just adjusting how aggressive you want to scan a particular VM. Scanning too quickly could share pages that are in the write working set, meaning that the sharing will be broken very quickly. Thus scanning too quickly may not be the best. But scanning too slowly means that memory that could be shared won't be for longer, meaning a higher memory usage. Another tradeoff, we set some defaults.
Hmm, I don't see these... Where are you seeing them?
Thanks,
Kit