VMware Communities
mrnick1234567
Enthusiast
Enthusiast

Basic VM memory usage question

I've read a bunch of guides on VMware memory usage but still have a basic question.

I have a 8GB Linux host with a windows VM which has 4GB memory allocated. If I run up the VM, and run top on the Linux host, I see 4.0G has been allocated to it (RES shows 4.2g SHR shows 4.0G). This is before I open any programs in Windows.

So, does that mean that 4GB is not available to the Linux host as soon as the VM starts? I thought memory was only allocated when requested by the guest?

Thanks

Nick

Tags (3)
Reply
0 Kudos
5 Replies
a_p_
Leadership
Leadership

The amount of host memory allocated to a VM depends on what the guest OS requests from the host. When Windows starts, it initializes it's memory, therefore requesting all memory pages (i.e. the provisioned memory). However, with VMware Tools installed, the ballooning driver will kick in case of host memory contention to reclaim some of the VM's unused guest memory.

André

mrnick1234567
Enthusiast
Enthusiast

Thanks André, that's really helpful.

So would I be right in thinking that when the ballooning driver is taking effect, I won't see the memory usage change in top? Is there a way to see when it's in operation?

Nick

Reply
0 Kudos
a_p_
Leadership
Leadership

I don't think you will see any changes on the host as the reclaimed memory from the ballooning driver will be used by VMware for other powered on VMs. To find out about the ballooned memory you can check the memory usegs of the balloon driver (vmmemctl) in the guest OS.

André

Reply
0 Kudos
mrnick1234567
Enthusiast
Enthusiast

OK as this is just VMware Player, there aren't any other VM's running.

Thanks for the info.

Nick

Reply
0 Kudos
WoodyZ
Immortal
Immortal

mrnick1234567 wrote: OK as this is just VMware Player, there aren't any other VM's running.

You say that as if VMware Player can't run multiple VM's simultaneously, which by the way it can by starting another occurrence of VMware Player or double-clicking a .vmx configuration file! Smiley Wink

Reply
0 Kudos