VMware Communities
diitto
Contributor
Contributor

some sort of memory leak???

Hi...  For some time now I've noticed the following problem.  I have 8 GBytes of RAM in my MacBookPro.  When I start the Mac, about 2 GBytes of memory gets used...  Then when I start VMware Fusion and launch one of three different installed versions of Windows (XP, 7, 8), all of which I have previously assigned to have 2 Gbytes dedicated to the OS, the memory usage goes up to about 4 total Gbytes, the 2 being used by the Mac and 2 more being used by Windows...  So far so good...  But then, over the next half hour or so, Inactive memory begins to grow and grow...  On a mac, there are for categories of memory, Wired, Active, InActive and Free.  Wire and Active are not available to be used elsewhere while Free certainly IS available...  InActive is supposedly available to other apps.  It was previously used by another app and it is still sitting there in case that old app needs it again.  But it is supposedly available to other apps... 

However, over say 1/2 hour after launching Vmware Fusion and Windows, the InActive memory just grows and grows until there is NO MORE FREE memory.  And when I open other apps, rather than using some of this supposedly available Inactive memory, instead the app begins to Page swap into Virtual Memory and everything slows down... 

I saw another post from a couple years ago that talked about exactly this same problem, where Inactive memory grows and grows until the rest of the computer begins too sluggish to use...  At that point, I am forced to restart the entire computer and leave Windows off if I want to do other work.  It's clear that Vmware Fusion is what is causing the Inactive memory to squeeze out the remaining free memory and for reasons unknown Fusion appears to be locking or holding on to that Inactive memory just as though it is Wired or Active memory... 

Any thoughts??  thanks... bob...

Reply
0 Kudos
6 Replies
ColoradoMarmot
Champion
Champion

Are you using Firefox or Safari on the host?  Both of them have memory leaks (Firefox is particularly bad).

I'm seeing something similar on my new rMBP, but it never get's to the swap stage.  You can try the terminal command:  purge  on the host to force the OS to release inactive memory.  During that process though, the machine may get sluggish until it's all released.

Reply
0 Kudos
diitto
Contributor
Contributor

Hi...  I use Safari...  I do agree with you that Safari does appear to have its own memory leak problem but that's small at best compared to what I see when I launch Fusion and run one of my Windows installs...  See an attached image of the memory usage in the Activity Monitor.  I restarted my mac from scratch and the Red (Wired) and Yellow (Active) looked at the startup and right after the launch of Fusion pretty much like the Red and Yellow in the attached jpg...  But after no more than 1/2 hour, all the Green was replaced by what you see in the jpg, solid Blue which is Inactive memory... But see also that the Page Swapping started just about the time I gathered this screenshot, again about 1/2 hour after I started the computer and started Fusion.  Somehow Fusion is grabbing all the memory (Safari never eats up this much memory Wired, Active or Inactive) and apparently locking it up such that other apps can't seem to use it...  Instead, the mac starts Page Swapping and when that happens, everything becomes slugglish...

I am not familiar with "purge"...  Thanks for that input...  I will look into that command... 

I have input a support request to VMware Fusion asking them to comment and hopefully help...

In the jpg attached, the Page Outs started (were zero before) as the Free memory got very low, all eaten up by all the Inactive memory (see where tht is nearly 5 of the 8 Gbytes on the machine)...

thanks.. bob...

wmware leaks till all memory used.jpg

Reply
0 Kudos
MrFun78
Contributor
Contributor

I am having the exact same issue.  Please advise on your resolve.

Reply
0 Kudos
wila
Immortal
Immortal

Hi,

Inactive memory means that the OS is holding it, not Fusion.

Please have a look at this -pretty old- discussion over here:

http://communities.vmware.com/message/679171

Also note there that you can lower Fusion's need for memory by disabling disk caching. This _will_ lower your VMs response performance, but it might be the balance in resources that you are looking for. You can configure this on a per VM bases by going to  Virtual Machine->Settings-> Advanced -> Hard Disk Buffering.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
diitto
Contributor
Contributor

Hi...  I agree with you that the Inactive memory is being held as Inactive by the OS, not by Fusion...  And that clearly is an OS X issue that I am working on separately...  But the Fusion issue in this is the large and rapid accumulation of Inactive memory in the first place.  As an example, as I run my mac right now without Fusion running, I have nearly 5 Gbytes (our of 8 Gbytes total) of Free memory and 300 MBytes of Inactive memory...  If I was to start Fusion right now and launch any of three versions of Windows I have available, I could sit and watch the Inactive memory start rising almost linearly over the next half hour or so until all the Free memory is gone... Then the page swapping starts and the performance of the entire mac goes in the tank...  That's a flaw and I'm convinced that's a flaw being caused by Fusion...  So we have two problems...  First, Fusion is devouring Free memory and turning it into Inactive memory at a high rate for reasons unknown (Fusion did NOT always do this but I can't say when it started).  And second, OS X's memory manager isn't working to make memory available for other applications...  If you watch the memory "pie" in Mac OS X's Activity Monitor, you can watch the Free memory get eaten up and the Inactive memory grow at the same rate from the moment you launch Fusion...  And that's just not right...  And as I said, I know Fusion did not always do this but i can't say for sure when it started...  Perhaps when version 5 came along???  I just don't know...  thanks.. bob...

Reply
0 Kudos
wila
Immortal
Immortal

Hi Bob,

diitto wrote:

Hi...  I agree with you that the Inactive memory is being held as Inactive by the OS, not by Fusion...  And that clearly is an OS X issue that I am working on separately...  But the Fusion issue in this is the large and rapid accumulation of Inactive memory in the first place.  As an example, as I run my mac right now without Fusion running, I have nearly 5 Gbytes (our of 8 Gbytes total) of Free memory and 300 MBytes of Inactive memory...  If I was to start Fusion right now and launch any of three versions of Windows I have available, I could sit and watch the Inactive memory start rising almost linearly over the next half hour or so until all the Free memory is gone... Then the page swapping starts and the performance of the entire mac goes in the tank... 

A good explanation on inactive memory and what it does for you is here (read the answer with the 26 points):

http://apple.stackexchange.com/questions/67031/isnt-inactive-memory-a-waste-of-resources

With Fusion there are continouos improvements on the memory handling. Of course what is a general improvement for the product might end up being a problem for you in a specific environment and need.

I think the disk caching improvement (Hard Disk Buffering) setting is the biggest culprit for inactive memory to run up fast after using your guest.

This is one area where I sometimes tune my guest OS by turning it off explicitly, especially if the guest OS already has heavy disk caching mechanisms by itself.

An OS like Win7/Win8 has this mechanism by itself and should not have to use it. Read the Hard Disk Buffering help on details.

With for example Windows XP however that has been created with an older version of Fusion the setting "auto" might end up using the Hard Disk caching mechanism from Fusion. You can turn that off, but unless you align your disks the performance of your guest will really tank.

Hope this helps,

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos