VMware Cloud Community
davidyuz
Contributor
Contributor

Clarification of memory usage?

Hi All, I have an IBM X3400 with 32gig RAM and 2TB HD. I would like to ensure 32gig RAM is fully utilized.

The confusion part is if I create 8 virtual machines - each has 4gig RAM assigned = 32gig RAM total used.

On each virtual machines, I could see a 4gig file created when it is started up. I think this is a virtual memory file.

So in theory, should each virtual machines actually use the physical memory (32gig RAM) instead of creating a virtual memory file?

How do I know that my 32gig RAM is actually being used when there is a 4gig RAM file created per each virtual machine?

David.

0 Kudos
2 Replies
marcelo_soares
Champion
Champion

The file created is a swap file. ESX creates it as it can handle more virtual memory than the existent physical memory. If you want to avoid it, simply go to the Edit Settings of each VM, tab resources, and reserve all 4GB for each VM. When you power on again the VM the file will not be created, but you must have the 4GB free memory for the VM.

As ESX have an memory overhead, probably you will not be able to power on all 8 VMs with memory reservation.

Marcelo Soares

VMWare Certified Professional 310/410

Virtualization Tech Master

Globant Argentina

Consider awarding points for "helpful" and/or "correct" answers.

Marcelo Soares
weinstein5
Immortal
Immortal

As Marcelo pointed what you are seeing is the per VM Swap file - this file's size is equal to the amount of memory assigned to the VM minus any reservation. This enables the vmkernel the ability to swap a virtual machines memory from physical to this swap space. This is memory of last resort and is only used when the ESX sevrer cannot supply physical memory -

There are two othe things that come into play first before the vmkernel will use the per VM swpa file -

  1. Transparent Page Sharing - This is the vmkernel ability to identify memory pages that are identical and will store these pages one time in read only memory. When the VM goes to write to this page a copy is made and the change is made. This saves a ton of memory. SO in your example of 8 VMs with 4 GB each will most definitely not use all of the 32 GB in your ESX Host -

  2. Balloon Driver - This is installed with VMware Tools. This allows the vmkernel to influence how the VMs guest O/S uses its own virtual memory (spa or page files) freeing up memory for other VMs

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

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