VMware Cloud Community
nahum1
Contributor
Contributor

Vmware memory sharing.

Hello guys,

Bear with me on this one, becuase i'm i rooky, and i need your help about memory sharing...

So, i'm not asking for a pdf links with theories, just looking for a brief prodessional answer on:

1.When do we use memory sharing

2.Is it enabled by default?

3.In what scenarios do we use memory sharing?

4.Can i limit the amount of memory that i want to share?

Hope to hear from you soon,

Best regards,

Nahum

Israel. Smiley Happy

0 Kudos
5 Replies
weinstein5
Immortal
Immortal

Welcome to the COmmunity - I assue you are referring to Transparent Memory Sharing  - TPS is enabled by default is constantly active. It identifies pages that are identical and stores them a single time - for VMs running common operating systems this can save a great deal of memory with out impacting VM performance -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
MauroBonder
VMware Employee
VMware Employee

how aditional information follow guide of memory managment www.vmware.com/files/pdf/perf-vsphere-memory_management.pdf

*Please, don't forget the awarding points for "helpful" and/or "correct" answers. *Por favor, não esqueça de atribuir os pontos se a resposta foi útil ou resolveu o problema.* Thank you/Obrigado
nahum1
Contributor
Contributor

Thank you very much....looks very intresting.

0 Kudos
nahum1
Contributor
Contributor

Hi weinstein,

Thank you for the warm welcome...

Just wanted to make sure i understood this TPS correctly...

Let's say i'm running 4 VM's with windows 2008 R2 with 2gb memory on each vm.

let's take the above VM's scenario....now imagine that one of the VM's is an SQL server and doing some really hard CPU and memory work...will the other vm's that running windows 2008R2 will share memory to this specific machine in order to release some CPU, and reduce her cpu/memory back to "normal"?

Hope you i made my self clear.

and one more thing...

what is: "identifies pages that are identical and stores them a single time"?

Best regards,

Nahum

0 Kudos
weinstein5
Immortal
Immortal

Memory and CPU are handled seperately -

Memory - Using your example with 4 VM of 2 GB each running an identical operatring systems with one of them running SQL - so lets assume all 4 start simultaneously the vmkernel (the hypervisor that provides virtual resources ot the VMs) will assign 8 GB (2 to each) VM to the 4 VMs - as the OS starts loading pages into memory the vmkernel will identify those pages that are identical and instead of storing 4 seperate pages it will store it one time in read only memory - if one of the VMs needs to write to that page a copy is made and the write is made to that page and if it is recognized as being identical to another page it will be linked to that page so yu can see that a lot of many can be saved in the order of 40% - no continuing with your SQL server it starts up and starts storing its own memory pages because TPS has freed up physical memory that can be used by the SQL server.

CPU - As a vm issues an instruction the vmkernel will schedule the instruction to run on a Logical CPU (LCPU) which can be a physical core or hyperthread - if the vm is idle it will not be issuing many instruction so once again when your SQL VM becomes active its instruction will get scheduled to a LCPU.'

To get a better understanding on how to manage CPU and memory resources check out - http://pubs.vmware.com/vsphere-50/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-50-resourc...

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos