0

I'm running a Linux Mint 19 in VMWare virtual machine on Windows 10 as a host OS. The VMWare Player version is 16.2.3.

The issue is that it consumes a lot more RAM than it is supposed to. On top of RAM consumed by the guest OS itself it also consumes a lot of RAM for mapping the vmdk file into memory.

Here you can see that on top of 10G which are configured for VM it also consumed 9G more for memory mapped file.

Screenshot.

Yes, it is in standby and in theory can and should be freed whenever needed, but on practice whenever I'm trying to start something that needs a lot of RAM - it kills the entire host system failing to free that standby memory.

UPDATE: Another example.

Screenshot.

Here is the state after 5 minutes of running this VM and copying files inside guest back and forth. The more time the guest VM is online and the more disk IO happens inside it the more host's RAM goes to standby mode, up to 100% of available RAM is being moved to standby.

  1. Is it a problem of VMWare or host OS?
  2. Is there any way to solve this and stop it from using that much RAM for memory mapped file of a guest's vmdk file? I would assume that I can create a disk partition and use it instead of keeping guest's filesystem in file, but is there any other option?
7
  • With a state similar to when you took the RamMap screenshot, please take a screenshot of Task Manager’s “Performance” tab, with “Memory” selected and add it to your question.
    – Daniel B
    Commented Mar 27, 2023 at 15:09
  • You appear to have the Windows page file disabled. The page file must be enabled to allow Windows' memory management to function normally. Windows does not over-commit virtual memory.
    – Daniel B
    Commented Mar 27, 2023 at 16:19
  • I think that I have more than enough RAM for the host to work with page file disabled. Host is having 32Gb RAM, guest is supposed to be limited to 10Gb. I don't want to enable the page file on SSD. The problem is that either OS or VMWare player for some unknown reason tries to map VMDK file into memory. My question is whether it is possible to disable this behavior somehow.
    – akir
    Commented Mar 27, 2023 at 18:35
  • 1
    This isn’t about having enough RAM. This is about how virtual memory works in Windows. Programs are regularly getting lots of committed memory but only use a fraction of it. Without a page file, even the unused part blocks your physical memory. You are wasting your physical memory. Enable the page file, with Windows-managed size. Then see if you still have problems.
    – Daniel B
    Commented Mar 27, 2023 at 18:50
  • 1
    Your original and only problem that I see is your PC running out of commit space. This is what is causing out-of-memory errors. Enabling the page file will solve that. The VMDK contents being cached is simply irrelevant then.
    – Daniel B
    Commented Mar 28, 2023 at 4:44

3 Answers 3

0

Memory for a VMware machine (Workstation or Player) is set in the VM Settings with the machine OFF. Memory is not set within the Guest machine.

General rule of thumb is to limit the amount of memory allocated to the machine to not more than half the host memory. Allocating 10 GB requires you have 20 GB of memory in your host machine.

A VM set this way can use all the memory allocated without impacting the Host machine.

whenever I'm trying to start something that needs a lot of RAM - it kills the entire host system failing to free that standby memory.

This is the result of allocating too much memory to the Guest machine. 10 GB is likely more than half your host memory.

It is not a problem with VMware as that is the way VMware allocates memory.

Memory swapping may be occurring in the guest. According to memory settings, swapping can occur. But excessive swapping may be a guest issue.

Make sure you have adequate Host memory to run Virtual Machines - minimum (in my view) is 16 GB.

Note:

I have 3 VMware Guests running here on a Windows 11 Host and everything co-exists well by keep machine and guest memory well managed.

4
  • My host is having 32G RAM. My guest is configured to have 10G RAM. But nevertheless the overall RAM consumption reaches about 19G. Because of that vmdk memory mapped file.
    – akir
    Commented Mar 27, 2023 at 14:05
  • VMware will not let your real memory exceed 10 GB . So memory swapping may be occurring in the guest. That is how it should work. According to memory settings, swapping can occur. But that may be a guest issue.
    – anon
    Commented Mar 27, 2023 at 14:10
  • I have swap disabled at all. I've attached a RAMMap screenshot where it shows that the memory consumed by doing a memory mapped file of a guests's vmdk file. My question is there any way to stop it from doing this.
    – akir
    Commented Mar 27, 2023 at 14:26
  • Perhaps try using a bit less memory in the Guest machine. I have 3 VMware machines running here and not memory issues. Try less guest memory.
    – anon
    Commented Mar 27, 2023 at 14:28
0

Well, I wasn't able to solve the issue with the VMDK file being mapped entirely into memory. Enabling and increasing page file, decreasing guest's RAM is not a solution I would say. So I converted it to img, then took an SSD and cloned the img there, added to VM, booted guest from that SSD now and the problem is solved. No VMDK file - no more mapping VMDK into memory, no more standby memory at all. That devalues a bit the whole idea of running isolated VMs but in my case I need just one VM and I'm ready to trade one 128Gb SSD for 10Gb+ RAM.

0

I have the same problem as you but at higher levels. What they told you about swap files and how windows works is not true. The problem is a bug in the management of the VMware workstation RAM. This defect you describe only occurs with some operating systems that vmware cannot manage the RAM well. I have windows 10 with 512gb of ram and 1tb of ram, and I assure you that when I run w10 guest and assign 128gb of ram what happens is that all the ram is allocated and no longer freed. The flaw only affects some guest systems and not all so your workstation/player operating system where you use vmware is not at fault. I have reported the reason for the problem to vmware several times but they are not interested in solving it. I read that you solved it by creating img, but I didn't understand what you did and what it means. If there is a way to contact you. Thank you

2
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jun 3 at 8:01
  • I believe your issue is a bit different than mine. I don't have problem with RAM allocating for a guest system. It is being allocated on demand. I was having a problem when the host OS was allocating RAM for mapping the VMDK disk file upon any disk IO operation in the guest system. So for example in my case I was having 32Gb RAM and 10GB ram for guest. At the end of the day all 32GB were consumed, because the host was mapping the VMDK in memory. After I moved VMDK to an SSD - it had stopped mapping anything into memory and the problem is gone.
    – akir
    Commented Jun 4 at 8:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .