Link to home
Start Free TrialLog in
Avatar of jskfan
jskfanFlag for Cyprus

asked on

Vmware Reservation vs Shares

Vmware Reservation vs Shares

If I understand when you have for instance 2 VMs :

VM1 = Memory Reservation : 3 GB ,  CPU : 1GHZ
VM2= Memory Reservation : 4 GB ,   CPU:  2GHZ

Now whatever Share you allocate to VM1 or VM2, it is not going to make any difference , since VM1 and VM2 will have Memory and CPU guaranteed as allocated above.

So how does the Share work in comparison to Reservation ?

Thank you
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

A Reservation is a RING FENCE guarantee, that the HOST cannot take away any resources CPU or MEMORY from a VM.

Shares only work when contention occurs.

It's a priorty option for CPU and Memory.
Avatar of Hello There
Hello There

I recommend you to check Reservations and Shares explained in this document on page 3.
https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/techpaper/performance/drs-cluster-mgmt-perf.pdf
Reservation
Reservation is a way of guaranteeing resources for a VM. When the user reserves resources for a VM, they are asking the host to make sure the VM always gets the reserved resources. The reservations set are static, which means that the VM is entitled to these resources whether it uses them or not. For this reason, resources reservations for a VM will have a multi-dimensional impact.

Shares
Shares dictate the relative priority of resources for a VM, compared to resources of other child objects (siblings) of the same parent. The absolute number does not matter in shares, as the values are always relative. For example, if three VMs of the same resource pool have shares set to 16000, 8000 and 4000, the resources are distributed among the VMs in the ratio of 4:2:1 respectively.

Some examples:
https://4sysops.com/archives/understanding-vsphere-shares-reservations-and-limits/
Avatar of jskfan

ASKER

in my example above:


 VM1 = Memory Reservation : 3 GB ,  CPU : 1GHZ
 VM2= Memory Reservation : 4 GB ,   CPU:  2GHZ


to make it simple let 's say we have  one  ESX  that has 7GB RAM and 3GHZ CPU
Now if you give VM1 Shares 10000 and VM2 500, then if VM1 needs more memory , it cannot get any more than 3 GB, even though it has more Shares than M2
Correct because you've defined the VM memory settings to 3GB.

Memory is not dynamic....it cannot grow above what has been defined....

What would the OS make of having it's memory map change in real time....
Avatar of jskfan

ASKER

So it sounds to me Reservation and Shares are Exclusive.
If you have Reservation for a VM, then the VM will not start unless if it meets the condition of the Reservation.

Shares will apply for VMs that do not have Reservation set up..

Please correct me where I am wrong
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland 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
Avatar of jskfan

ASKER

Thank you Guys!

I will come back to this topic.. as I am not really clear on it.