6 Replies Latest reply: Jun 6, 2013 8:47 AM by bellicose100xp
Robert Paris Level 1 Level 1 (145 points)

Hi...  Often when I run Windows on my Mac under VMware Fusion, I find that I'm eating up all 8 GBytes of RAM on my machine...  It wasn't always that way and I fear that VMware is starting to follow the same path I once discovered with Parallels Desktop, that being that with each new upgrade the memory usage seems to go up and up...

 

But what I really want to know here is almost all the time, even though there is almost no free memory, still I see that there is usually around 3 Gbytes (of 8 total) that shows in the Activity Monitor as "Inactive".  Why can't that memory be used by other apps if needed???  It's not wired.  It's not active...  But nor does it seem to be available to be used by any other apps.  Instead, the computer starts to Page Out like crazy and everything slows to a crawl.  Is there anything I can do to free up and use some of this "Inactive" memory???  thanks...


MacBook Pro, OS X Mountain Lion
  • 1. Re: memory management
    Kappy Level 10 Level 10 (226,720 points)

    About OS X Memory Management and Usage

     

    Using Activity Monitor to read System Memory & determine how much RAM is used

    Memory Management in Mac OS X

    Performance Guidelines- Memory Management in Mac OS X

    A detailed look at memory usage in OS X

     

    Understanding top output in the Terminal

     

    The amount of available RAM for applications is the sum of Free RAM and Inactive RAM. This will change as applications are opened and closed or change from active to inactive status. The Swap figure represents an estimate of the total amount of swap space required for VM if used, but does not necessarily indicate the actual size of the existing swap file. If you are really in need of more RAM that would be indicated by how frequently the system uses VM. If you open the Terminal and run the top command at the prompt you will find information reported on Pageins () and Pageouts (). Pageouts () is the important figure. If the value in the parentheses is 0 (zero) then OS X is not making instantaneous use of VM which means you have adequate physical RAM for the system with the applications you have loaded. If the figure in parentheses is running positive and your hard drive is constantly being used (thrashing) then you need more physical RAM.

     

    Adding RAM only makes it possible to run more programs concurrently.  It doesn't speed up the computer nor make games run faster.  What it can do is prevent the system from having to use disk-based VM when it runs out of RAM because you are trying to run too many applications concurrently or using applications that are extremely RAM dependent.  It will improve the performance of applications that run mostly in RAM or when loading programs.

     

    Both Parallels and Fusion only use the amount of memory you have assigned for your VM plus the applications own overhead and assigned VRAM. Under no circumstances should you assign more than half your available to RAM to either application plus the VMs. There is no way otherwise for them to eat up 8 GBs of RAM.

  • 2. Re: memory management
    Topher Kessler Level 6 Level 6 (9,340 points)

    That memory can be used. Inactive memory is for all intents and purposes "free" memory, with the exception that the contents it holds was from recent activity so it can be recalled quickly if needed. For example, if you open Mail from a cold boot it will take a few seconds to load, but if you quit and relaunch it then much of it is still loaded in memory as "Inactive memory" that will activate, having it load much faster.

     

    If the memory is needed by other programs, the system will relinquish it for use. There will always be some inactive memory as programs use and relinquish RAM. It sounds like overall you would benefit from a RAM upgrade. Depending on your system, you might be able to get a solid 16GB RAM in it.

  • 3. Re: memory management
    Robert Paris Level 1 Level 1 (145 points)

    But I still don't understand the following...  First, I've been watching Vmware Fusion since I completely restarted the computer, brought it back up and then started Windows 8 from within Vmware Fusion.  The computer itself was using about 2 GBytes...  Vmware is showing that it's using another 2Gbytes...  So far so good...  But I've been watching the pie on the Activity Monitor slowly chunk away until the original 4 Gbytes of computer + Vmware is now up to almost the full 8 GBytes that I have in the computer...  And that's all over about 1/2 hour...  So I think there is a big time memory leak somewhere...

     

    But at least 3 GBytes is showing Blue, meaning Inactive...  But if I open other apps now that there is almost no Free memory, everything slows down and the Page Outs go wild...  But the Blue never changes.  The same amount just stays Inactive so I don't see how these other apps are using it...  In fact, it appears they are not but instead they are just using VM instead and swapping in and out while everything slows considerably..  So I don't get how you say the Inactive memory really ever gets used by other apps..  As I open more apps I would expect the Blue chunk to go down while the yellow and red chunks go up...  But no...  Instead, the system just starts using VM...  ?????

  • 4. Re: memory management
    vkehayas Level 1 Level 1 (60 points)

    I am also dissapointed by the same thing. Instead of using the "Inactive memory" my Mac will use swap,

    even if I am running small apps and even if I have the memory to run all of them.

    The crazy thing is that simply getting more memory does not solve this issue.

    I see that this totally makes sense for a user that will open and reopen only some apps (Mail, Browser, etc.)

    but I would like to have the ability to customize this behaviour and I haven't found the way yet.

    Something I do when I really have to, is to change the high- and low- watermarks of the dynamic_pager for that session.

  • 5. Re: memory management
    Robert Paris Level 1 Level 1 (145 points)

    I did a more careful experiment last night where I shut down Windows and vmware Fusion entirely, restarted the computer and noted the memory usage.  The mac with basic apps I use at start up came up to about 2 GBytes used and when I say "used" I mean the sum of "Wired" and "Active".  Then I started Fusion and ran a Windows 8 install I have where I have the Windows OS set up to use 2048 MBytes of memory (call it 2 GBytes).  And sure enough, the mac Used memory rises to about 4 GBytes total.  I have 8 GBytes in this MacBook Pro...  I opened a couple of apps within Windows because I wanted to do some work.  But overall I opened and watched the memory usage on the Mac...  The Inactive memory started increasing pretty much coincident with me starting Fusion.  I watched it count up and up and up and up until it literally consumed ALL of the approximately 4 GBytes that was previously Free.  And the Page Outs which had been zero all the time previously suddenly took off and went skyward when the Free memory got down to about 50 MBytes.  I launched a support request to VMware because it's clearly a Fusion issue that is causing the Free memory to be converted to Inactive memory in the first place.  But I also have a Mac issue becuase folks are saying the Inactive memory should be available to be used by other apps but that appears NOT to be the case because the swapping to hard drive starts and takes off when the Free memory gets very large even though there is nearly 4 GBytes of Inactive memory just sitting there...  But it appears to NOT be available to other apps as if Fusion is somehow locking it up where it can't be used elsewhere...  So the questions would be

     

    1.  why is Fusion converted Free memory into Inactive memory untill all the Free memory is gone, and,

    2.  why aren't other apps using some of the Inactive memory sitting there rather than starting page swaps which slows the mac to a crawl???

     

    I have a support request to VMware for question 1 and I ask others here if they have any ideas on question 2...

     

    See attached a visual showing after about 1/2 hours of running Fusion and Windows 8 where the Free memory is almost zero and the Inactive (Blue) part of the pie is well over half of the mac's total 8 GBytes (all due to Fusion), and see also where the Page Outs which were zero until just before I took this screenshot are now on the rise...

     

    thanks... bob...

     

    wmware leaks till all memory used.jpg

  • 6. Re: memory management
    bellicose100xp Level 1 Level 1 (0 points)

    Kappy,

     

    I'd receommend that you stop explaining( or copy/pasting explanation) of what is active/Inactive memory. It seems like this post comes up in every discussion thread realted to lion/mountain lion memory management issues. We all know by now what they mean. What we are instested in how it can be fixed. I am facing the same issue and have increased my RAM from 4 to 8 to 16 GB with no use. The amount of inactive memory used by VM behaves as if it's wired and the moment Free memory goes to Zero and I launch another app, swap kicks in. When this happens the computer slows to a crawl a and even becomes unusable sometimes. I have been able to resolve the slowness by replacing my HDD with SSD. The problem is still there but it seems like SSD resolves any slowness that was happening due to my old slow HDD speed.

     

    The screenshot below was taken 30 min after launcing 2 windows 8 on vmware. On mac chrome is running with just 1 Tab.

    Screen Shot 2013-06-06 at 8.44.41 AM.png