1 2 3 Previous Next 117 Replies Latest reply: Apr 4, 2014 5:44 AM by Dell Green Branched to a new discussion.
imclerran Level 1 Level 1 (0 points)

I will start describing the problem where I first discovered it.

 

My early 2011 MBP had been asleep, and upon opening and waking it, it was incredibly slow. I opened activity monitor and couldn't believe my eyes.

 

I have 8 GB of RAM, and all but 8 mb was in use. Around 6 GB was "inactive". I had no applications running besides Activity Monitor.

 

I opened terminal and ran the purge command After a short wait, total memory usage was back to around 2 GB. Then right before my eyes, over approximately 30 seconds, the "inactive" memory grew until once again, I had about 8 mb of RAM free. This fluctuated a few mb, but nothing significant.

 

After rebooting, I opened Activity monitor again, to watch ram usage. Usage increased to a little more than 2 GB. I then launched the App Store. Before putting my laptop to sleep earlier, I had been downloading a 10 GB update to Borderlands, but had paused the download, and quit the application before closing the laptop. I hit resume download, and went back to Activity Monitor. Memory usage seemed normal for several seconds, but shortly started increasing rapidly again. I imediately hit "pause download" in the App Store. But ram usage continued rising, so I quit the application. It kept rising, until my full 8 GB was in use.

 

At this point I took a screenshot:

Screen Shot 2012-09-26 at 5.52.28 PM.png

 

The only thing I have left to tell you is that before upgrading to ML, I had previously attempted to download the same update, but hadn't had time to download the full 10 GB, so had cancelled the update. That was in Lion 10.7.4, with 4 GB of RAM, and I had no issues.


MacBook Pro, OS X Mountain Lion (10.8.2)
  • 1. Re: Massive Mountain Lion memory leak
    Linc Davis Level 10 Level 10 (118,270 points)

    Your screenshot shows nothing abnormal. Having a lot of inactive memory simply means that it's been used and released. If you're curious as to what was using it, you'll have to look at All Processes, not My Processes.

  • 2. Re: Massive Mountain Lion memory leak
    imclerran Level 1 Level 1 (0 points)

    Inactive memory is memory that hasn't been released, and is therefore unusable by any other programs or the operating system. If the process the the memory was allocated for is no longer running, then it is, by definition, a memory leak.

     

    Besides which, my computer was running at a snails pace at that point. Taking a screenshot took around 10 seconds before the file appeared. And constant pinwheels. Even trying to bring up the shutdown dialog took ages.

     

    If a completely disfunctional computer isn't abnormal, I don't know what is.

  • 3. Re: Massive Mountain Lion memory leak
    LousyFool Level 4 Level 4 (2,640 points)

    EDIT:

     

    All said to where it belongs.

     

    Other than http://support.apple.com/kb/HT1342 which speaks for itself...

  • 4. Re: Massive Mountain Lion memory leak
    imclerran Level 1 Level 1 (0 points)

    I appologize for my hasty and know-it-all-esque response before checking my facts.

     

    However, I do know that when that inactive segment filled the pie, my system was dead in the water. When I did a purge, it ran smoothly again, until in a matter of seconds, my inactive memory was full.

     

    I don't know why that would be since, as Linc Davis said, its been released.

  • 5. Re: Massive Mountain Lion memory leak
    LousyFool Level 4 Level 4 (2,640 points)

    Thank you very much, apology greatly appreciated, and readily accepted.

     

    You'll have to admit that it sounds like the perfect oxymoron when you state on one hand

    ...it was incredibly slow.

    and

    Besides which, my computer was running at a snails pace at that point.

     

    and on the other hand

    I had no applications running besides Activity Monitor.

     

    Hmmm, nothing running, how do you know it's slow then, anyway?

     

    Whatever, the last thing I worry with OS X is memory management - it's famous for its clever dealing with my Macs' grey cells, and that in mind I couldn't sleep better - since many years.

  • 6. Re: Massive Mountain Lion memory leak
    imclerran Level 1 Level 1 (0 points)

    Agreed, I have always appreciated OS X's clever memory management algorithms.

     

    As I stated in my more regretable post, my screen shot took around 10 seconds to post, as opposed to the usual split second. Clicking on anything in activity monitor brought up a pinwheel, as did clicking on anything in the menu bar. Clicking the apple Icon to attempt a restart resulted in waiting for the pinwheel about a minute.

  • 7. Re: Massive Mountain Lion memory leak
    BobHarris Level 6 Level 6 (13,120 points)

    Inactive memory is frequently used as an I/O cache.  While I do not know for sure, I think that a lot of the inactive memory may have data that still needs to be synced back to disk (as in disk writes that are cached, and still need to be written to disk).  When other processes need RAM, and inactive memory is used to satisfy the need, the app may nave to wait for slow disk I/O flushing inactive pages before the inactive memory can be given to the requesting app.

     

    Again, I do not know for a fact that Mac OS X keeps cached writes in inactive memory for extended periods of time, however, the slow performance when needing RAM and inactive is all that is available, and considering that laptops consume a lot of power keeping the rotating disk drive spinning, and there are some tasks that update logs on a regular bases that would tend to force a laptop to keep writting to disk, it seems to me that maybe Mac OS X addressed this situation by deferring writes to disk, and using inactive memory to cache it.

     

    The purge command seems to forces Mac OS X to move pages from inactive memory to the free list, and in doing that it would need to flush cached writes to disk, which is why it could take a long time for a purge to complete.

     

    All speculation on my part.

     

    As to Activity Monitor being your ONLY running process, you need to look at ALL PROCESSES in Activity Monitor, as Mac OS X ALWAYS has dozens of background apps running, and if one of them is running away doing lots of I/O, or maybe you have a backup running which will also do lots of I/O, all of which will tend to fill the inactive memory with cached I/O buffers, this could be the source of your growing inactive memory.

  • 8. Re: Massive Mountain Lion memory leak
    imclerran Level 1 Level 1 (0 points)

    So what I'm understanding is that even though I quit the App Store application, there could still be a backend process or service that was sucking up my RAM. Makes sense, I'll check that in future.

     

    Your theory as to why inactive memory was slowing down my system so much certainly makes sense.
    The purge command itself actually didn't take much longer than usuall, although it should be noted that it usually takes several seconds. It did initially it take me a while to issue the command, but after it completed, the inactive memory filled back up, and the system was once again unresponsive.

     

    I can also state that the problem appears to have been caused by a corrupted app store temporary download file. (I had forgotten to pause the download before closing the laptop) After a lot of fiddling I was finally able to get the app store to start the download over, and this time the problem didn't occur.

     

    P.S. Thank you for taking my admittedly strange problem at face value, and not questioning whether a problem actually occurred.

  • 9. Re: Massive Mountain Lion memory leak
    WillytheKidd Level 1 Level 1 (25 points)

    I understand what is being said, but I notice that on my Mac Pro with 20gb of ram, if I start the computer, let it just sit there with only the apps that it uses at startup, come back 2 or 3 hours later and open activity manager, there are times when there has been 8 or 9 gb in inactive memory without ever opening an application.  All i have running on startup (aside from the OS) is Itunes helper, and Dragthing.  What is using that 8 or 9 gb of ram?

  • 10. Re: Massive Mountain Lion memory leak
    BobHarris Level 6 Level 6 (13,120 points)

    Do you have automatic backups (TimeMachine, SuperDuper or Carbon Copy Cloner, etc... as a schedule regular backup)?

     

    The Inactive memory is used as a cache for program pages and I/O data.  The more the operating system can cashe the less it has to use that old slow clunky rotating disk drive, and the faster Mac OS X can respond to your I/O needs (or that is what it is trying to do).

     

    Also you have background daemons, so you my have been doing network I/O, such as Software Update checking standard program versions to see if there are any new updates that apply to your system.

     

    There could be any number of background activities going on that would be doing I/O when you are not sitting in front of your Mac.

  • 11. Re: Massive Mountain Lion memory leak
    WillytheKidd Level 1 Level 1 (25 points)

    Thank you for the response.  I guess what is odd to me is that this did not happen under Snow Leopard.  I have had this happen when I do a safe boot when only the plain OS is supposed to load.  (right)  If I am using the machine, I have never had more than 1 or 2 gb in the inactive area.  I  am just supprised at the amount of ram going to inactive when to me (as far as I know) I am not using any programs which would cause that amount of ram to be cached.

  • 12. Re: Massive Mountain Lion memory leak
    ShyLion Level 1 Level 1 (0 points)

    I think I was able to nail it down as I have the same issue.  I'm running an iMac that was sold with Snow Leopard and I've updated to Lion then Mountain Lion.  I noticed the memory leak after a week of my upgrade.  After lots of searching and trials, I noticed that if I use Safari to search the web, the inactive memory starts to grow.  And by looking into the activity, it looks like flash applications like facebook causes the problem to exploit.  I noticed later that I had an extension running under Safari which is "FastTube" to download from youtube. 

     

    It seems that FastTube causes some memory leaks through the flash application.  So, I deleted FastTube and since then, my iMac is back on trac.

  • 13. Re: Massive Mountain Lion memory leak
    YagoDR Level 1 Level 1 (0 points)

    AM.png

    (blue is inactive).
    I've been reading and trying to troubleshoot. Still cannot understand why thei happens. Only Activity Monitor and Safari Running...
    (S)ucks.
    MacBook Pro i7 4GB Ram
  • 14. Re: Massive Mountain Lion memory leak
    BobHarris Level 6 Level 6 (13,120 points)

    Do you have a problem, or do you just not like lots of Inactive RAM?

     

    If you do have a problem (performance, or some app will not run, etc...), then start a new thread so you are in control of that thread and can mark it Answered when you feel you have found a solution.

     

    In an earlier post to this thread, I explained that Inactive can be filled from things like backup (TimeMachine, or your own), it can also contain previous run programs that are waiting to be relaunched.

     

    Inactive RAM is RAM that has known information it, for quick reuse, but can also be given up an application needs RAM for code or data that is not already part of Inactive RAM.

1 2 3 Previous Next