When I run a virtual machine in VMware workstation, after a few minutes of use, it uses all my RAM (16GB). My system performance slows down to a crawl. The problem happens with Linux guest too but its worse with Windows guest. In VMware Workstation Preferences I have Reserved Memory set to 2GB, and specified to fit all virtual machine memory into reserved host RAM but that didn't help despite docs recommendation.
Does anyone know how to stop VMware Workstation from using up all my RAM when I run a guest Virtual Machine?
I don't have the problem with VirtualBox and I have tried to re-install VMware Workstation and the problem persist. I'd stop using it but there are some projects that require me to use VMware.
Here are further details:
When I run
free -m in the terminal when VMware Workstation is open but no guest running (before firing up the VM):
total used free shared buffers cached Mem: 15945 3370 12575 198 23 696 -/+ buffers/cache: 2650 13295 Swap: 19072 74 18998
After starting a Windows 10 Guest and running for a few min, if I run
free -m in my host I get:
total used free shared buffers cached Mem: 15945 15694 251 2182 66 12158 -/+ buffers/cache: 3468 12477 Swap: 19072 74 18998
When I shutdown the Windows 10 guest and run
free -m again:
total used free shared buffers cached Mem: 15945 13499 2446 197 67 10209 -/+ buffers/cache: 3223 12722 Swap: 19072 74 18998
To get my RAM back I have to run:
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches and then I run
free -m I get:
total used free shared buffers cached Mem: 15945 3312 12633 198 2 642 -/+ buffers/cache: 2667 13278 Swap: 19072 74 18998
System Host and Guest Specs
////////////////////////////////////// System Host: Ubuntu 14.04LTS VMware Workstation 12 Pro Version: 12.1.1 build-3770994 /////////////////////////////////////// ////////////////////////////////////// VM Guest: Windows10 RAM: 1984MB Processors: 1 DisplayRAM: 1GB /////////////////////////////////////// ////////////////////////////////////// Motherboard: ASUS AMD M5 A97 R2.0 /////////////////////////////////////// /////////////////////////////////////// CPU: AM3+ AMD FX 8320 8-Core 3.5GHz 16MB Total Cache, (5GHz Max) /////////////////////////////////////// /////////////////////////////////////// Graphics Card: ZOTAC Nvidia Geforce GT 730 4GB DDR3 64-bit HDCP DUAL-Link DVI, HDMI, VGA /////////////////////////////////////// /////////////////////////////////////// RAM: 16GB Kingston Hyperx 2x8GB Memory Sticks 1866 DDR3 240-pin /////////////////////////////////////// //////////////////////////////////////// POWER SUPPLY: EVGA 1000w PS 1000GQ 80+ Gold series ///////////////////////////////////////
Update, 19th September 16
(Note that this is additional information by @granjow, which hopefully represents the OP’s experience.)
To add some clarifications, the problem is not that the number in the “free memory” column is small and we are just unhappy about this number because large numbers are nicer. The problem is that system performance is actually terrible.
The problem manifests itself as follows: After starting the VM and some programs, the amount of free memory drops, which is to be expected. The amount of memory used by VMware rises far over the configured limit (i.e. 10 GB instead of 4 GB, with only 8 GB of physical RAM in total). At some point, both guest and host start freezing for > 10 s on several occasions: for example navigating in files in WebStorm (guest), opening a new browser tab or terminal tab or just pressing Alt-Tab (host).
When observing CPU load on those occasions, the guest CPU usage goes to 100 % for as long as the system freezes, but no program is showing up as busy in the task manager. Basically, I can observe the typical symptoms of a system running out of RAM and heavily using the disk as cache. When observing the VMware log, there is often a line about ballooning kicking in, which is said to be the very intelligent mechanism of VMware which manages and releases memory freed by the guest.
We are not talking about bad specs of the host machine, because
- exactly the same VM has been running on exactly the same hardware on Windows 10 smoothly without ever experiencing performance issues
- the same VM, imported in VirtualBox on Ubuntu, runs equally well as with VMware on Windows 10, with htop/glances showing constant memory usage of around 4.6 GB, and with no freezes at all.