VMware Communities
jmillervmware
Contributor
Contributor
Jump to solution

VMWare Player + Ubuntu 14.04 memory leak

Hello.

I've got a newly built host running Ubuntu 14.04 LTS.  I've installed VMWare player 6.0.3 build-1895310 64-bit.   The host has an an i5 processor and 16GB RAM.  I've got a Windows 7 Pro VM with 4GB RAM allocated to it.  This VM is running video management software that is writing about 2MB/s to the virtual disk.  When I start the VM I see it consume approx 4GB RAM as expected but then I notice Linux (via top) slowly eating away at the remaining RAM.  An hour later and I'm almost out of wired RAM.

top - 17:35:03 up  7:41,  3 users,  load average: 0.40, 0.50, 0.54

Tasks: 201 total,   1 running, 200 sleeping,   0 stopped,   0 zombie

%Cpu(s):  1.4 us, 11.4 sy,  0.0 ni, 87.1 id,  0.0 wa,  0.0 hi,  0.2 si,  0.0 st

KiB Mem:  16124700 total, 15951644 used,   173056 free,    34252 buffers

KiB Swap: 16461820 total,        0 used, 16461820 free. 14946256 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND  

5628 root      20   0 6251652 4.201g 4.060g S  48.3 27.3  28:48.89 vmware-vmx

The only fix is of course a reboot as the leak seems to be happening in the kernel or some driver.  I don't see a user-land process eating this.

Any ideas?

Thanks in advance

Jim

0 Kudos
1 Solution

Accepted Solutions
jmillervmware
Contributor
Contributor
Jump to solution

After a call with VMWare Global Support it turns out this was my mistake.  There is/was no memory leak.  For some reason the kernel was caching massive amounts of RAM, probably as a result of the heavy disk usage.  The 14946256 value from my previous post is where the RAM was going.

View solution in original post

0 Kudos
6 Replies
jmillervmware
Contributor
Contributor
Jump to solution

After a call with VMWare Global Support it turns out this was my mistake.  There is/was no memory leak.  For some reason the kernel was caching massive amounts of RAM, probably as a result of the heavy disk usage.  The 14946256 value from my previous post is where the RAM was going.

0 Kudos
frodeheg
Contributor
Contributor
Jump to solution

This is not true. Yes it may look like it's being cached in top, however if you run "free -m" then you see that the amount of truly free memory (disregarding the caching) is really getting reduced over time.

I have the same problem and have investigated it some more and put on some logging on "grep Slab /proc/meminfo"  (which is the memory used by all kernel processes) and it turns out that when I'm playing music (streaming from an internet radio) within the virtual machine then the vmware kernel driver leaks about 100 MB of memory per hour. If I'm not playing music there is no memory leak. At the moment the sum of the leaked memory and the memory allocated to vmware (2 GB) get close to my total memory (8 GB) then the disk start swapping immensly (this is when the leaked memory comes near 5.5 GB). I have no other programs running except vmware and nothing is running within it. It's just swapping like crazy. The graphics driver within the vmware image (windows 7) times out and restarts over and over in an infinitive loop.

So yes, it is leaking memory and it's most likely related to vmware allocating shared memory for the sound to transfer to the host os, then vmware forget to deallocate this. Forgetting to deallocate shared memory create very invisible memory leaks.

0 Kudos
deker0
Contributor
Contributor
Jump to solution

I am currently running Ubuntu 12.04 LTS with 8GB of physical memory.

I am running VMWare Player 64-bit 6.0.5 build-2443746 and I've got a Windows 7 Pro VM with 3GB of RAM allocated to it.

I am seeing the same memory leak issue. I do stream Pandora radio from time to time, but not always. It seems as though the memory really drains out overnight, so I come back the next morning and things are very sluggish with lots of disk paging. So, I need to shut down the VM and then restart the host to get things back to normal.

This is what top shows after a clean restart -

20   0 5757m 3.3g 3.2g S   86 43.1  33:25.16 vmware-vmx

Oh, and I do have VMWare Tools (latest version) installed as well, in case that makes a difference.

I've provided additional info in this older thread (currently unanswered) - Windows 7 Professional SP1 Slows Down as time goes on...

Any help would be greatly appreciated.

0 Kudos
frodeheg
Contributor
Contributor
Jump to solution

You can try Virtualbox instead, maybe that solves the problem: https://www.virtualbox.org/

0 Kudos
deker0
Contributor
Contributor
Jump to solution

I tried it in Virtualbox, but really do not like it at all. I'm hoping that VMWare can resolve this memory leak.

0 Kudos
espw
Contributor
Contributor
Jump to solution

I do have exactly the same problem with 7.1.2 build-2780323 ubuntu 14.04.3 LTS

When you see with windows and mac the %MEM is will released. Is there already a solution?

0 Kudos