1: Yes, you can over commit. See 2,3 for details
2: If the physical memory gets full, the ESX(i) starts its Memory Ballooning
, Transparent Page Sharing
and Memory Compression
features. When the memory gets full while these features are used the Host will swap.
Memory Ballooning
When an administrator installs VMware Tools, the memctl driver (a.k.a. ballooning
driver) is installed in the guest OS. This driver creates a bubble or “balloon” of memory
consumed inside the guest so the OS sees it as being used by an application. The
hypervisor then takes the physical RAM freed up by inflating this balloon and allocates it
to other VMs that require it.
Memory ballooning introduces a small amount of processing overhead, and if it forces a
guest OS to begin paging to disk, this can significantly slow down the application(s) on
the VM. If the VM isn’t using the memory, then ballooning itself isn’t a serious
performance issue, but it is an indication that physical memory on the host is becoming
scarce.
One of the biggest advantages of memory ballooning over other methods for handling
memory over-commitment is that the memory ballooning driver allows the guest
operating system to choose which pages are relinquished to the hypervisor for other
VMs. This way, pages which aren’t in active use can be safely freed up, causing almost
no performance impact from the guest’s perspective.
Transparent Page Sharing
Transparent page sharing is the “de-duplication” of memory that permits identical virtual
memory pages to be collapsed into a single page within the host’s physical RAM,
thereby freeing up memory for other uses. For example, if multiple virtual machines on a
host are all running the same operating system and application, the hypervisor will
compare pages of memory through hashing to locate identical pages that can be freed
up through their consolidation. Ballooning and transparent page sharing work together
to ensure that over-committed memory doesn't cause performance issues for the
applications in the guest virtual machines.
Memory compression
Memory compression and disk swapping by the hypervisor are the last-ditch efforts by
ESX/ESXi to keep the hypervisor from crashing when memory resources on the host
are stretched to the breaking point. The compression of memory pages by the
hypervisor also causes additional processing overhead; however, this overhead is small
in comparison to the slow-down caused by swapping pages out to a storage device.
Users of vSphere 4.1 and above will be able to take advantage of this feature to reduce
the amount of swapping taking place when physical memory resources are close to
being exhausted.
Stolen from VM Memory (vRAM) Sizing Considerations
3: If you power off, you cannot use it anymore, so no statistics are recorded, etc. I do not know what happens to HA and stuff. I would not switch it off. If the VM is idling, ESX will know and handle it. Please notice, the memory features listed are used when needed (see description), so the memory will increase less the more memory used. Try to dramatically waste the memory to see how your vCenter VM scales down. I dont think it will waste too much memory on idle
4: See the linked White Paper for information how to get the answer