1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Mountain Lion Memory Management

Discussion in 'OS X Mountain Lion (10.8)' started by Huntn, Mar 26, 2013.

  1. macrumors G3


    I commented in another thread about the spinning balls I see on a regular basis since installing 10.8 and got into a discussion about Mountain Lion memory management. I have 4 GB of RAM installed. This morning I started my computer with Activity Monitor running. Without any active processes I had 800MB free memory. I got up for coffee, came back, and free memory had dropped to 240 MB. I decided to use the Terminal 'Purge' command and it jumped up to 2.17 GB. Obviously, I don't get it.

    I've been told that when it needs to, OS10.8 will release memory for other uses. I've got to figure a way to systematically check this assertion. I'm thinking that if I let it go until 'spinning ball' time, and keep the terminal open, or get that program SmartMemoryCleaner, if I have an opportunity to use these programs to free up memory, it would indicate that 10.8 does not manage memory as well as it might? Thoughts?

    What is the significance of Page Ins and Outs? Also is there a way to manage Virtual Memory and more importantly, is there an advantage of doing so?

    Regarding SmartMemoryCleaner, does it do other stuff that the Terminal Purge command does not do?
  2. macrumors 603


    You seem to have memory leaks or a bug in the OS, or just something amiss in your normal User Account.
    What happens if you make a new User Account, logout and into the new User Account, still have the same issues?
    Actually, you should first restart after creating the new User Account and login into it just once because it has to setup the new Account first.

    Upon startup my RAM usage is ~2.1 GB with several Login Items, I do have 8 GB though and until now I think the VM is much better than before on earlier OS's.
    Page ins are just reads from disk, they have little to say about performance, page outs are more important, if you have lots it means you need more RAM, you could do without but it will greatly improve speed.
  3. macrumors G3


    I just started doing this and just started noticing what is going on with my free memory, not that I am implying that something is amiss. I'm watching it now and becoming aware. I believe it is safe to say that 10.8 has more things going on and more drag on System resources. I believe it is no coincidence that new Macs are appearing with 8GB RAM in them. Trying a new user account could be a good thing to try out.

    As far as my free memory falling as I reported in the first post, I assume 10.8 is doing things in the background. There is a long list of processes, and I think I'd have to be watching this list as those changes occurred to know if this is normal or not.
  4. benwiggy, Mar 26, 2013
    Last edited: Mar 26, 2013

    macrumors 68020

    Your spinning beachballs may not necessarily be related to ML's increased use of memory.
    You don't generally need to purge inactive RAM. Inactive memory will be released when needed.

    A metaphor I like about computers compares them to a kitchen. Your disk storage is the cupboards; your RAM is the work surfaces. When you want to make a cake, you have to get stuff from the cupboards. If you don't have many work surfaces, you have to put things back in the cupboards when you've finished with them.
    If you have lots of work surfaces, you can get everything down and leave them out. That's what ML does. It gets everything out of the cupboard and leaves it out, because that's where you need it.

    ML worked pretty well for me on 4Gb in my MacBook. I've since put an extra 2Gb in, though. I do pretty much identical tasks on my MB as my Mini, which has 10Gb more. The Mini uses more memory than the MB, because it's got more.
  5. macrumors 6502

    2.17 GB of free memory is wasteful, inefficient state.

    Your memory should stay pretty close to full. I hate so much to hear people complain that they wan't free memory. Why??? You want to load everything from the disk every time?
  6. Huntn, Mar 26, 2013
    Last edited: Mar 26, 2013

    macrumors G3


    Maybe for the wrong reason but I want my Mac to remain functional versus the perpetual spinning ball. I am no expert on this subject and want to understand what I am seeing. In my ignorance, I might argue it's not wasteful if your memory gets tied up as you open programs and you are faced with a perpetual spinning ball and nothing responding. This has happened to me at least 3 times in 10.8 until I started paying attention to the activity monitor. BTW, this never happened with my same work habits in 10.6 with the same hardware (MBP).

    Today sometime after initial start, I had Pages, Fiefox, Activity Monitor, and Terminal running. My free memory was 100MB. I opened Graphic Converter and it dropped to 22MB. This is when I saw my first brief spinning ball. At this point, I purged memory and it jumped to 1.4GB of free memory and spinning balls went away.

    Ok, so where was this memory freed from? I have no clue. All the programs that were running, continued to run. I do know that when free memory gets down to about 20MB and I have 4 programs, or so open this is when the ball spins. And if I let it go it can be a very long time spin (10 min) before the system starts functioning again properly. And when it reaches this state, I can't force quit programs. If I open that window by pressing Opt/Cmd/Escape, all of my programs have a label that say "not responding". At this point, as far as I know, there is no way to close a program and free up some memory to return to a normal functional state. My plan is to allow the situation with the perpetual spinning ball to happen and see if a memory purge, using the Terminal fixes it.

    I'm looking for suggestions or corrections on my perception so fire away! :)
  7. macrumors newbie

    I understand what you're saying, but I'm not seeing that applied in my system. I have a MBP Retina (mid-2012) with 16gb RAM running ML 10.8.3. I have a program called Free Memory that tells me what is happening (instead of Activity Monitor). I occasionally get down to a few MB of RAM with 9 or 10 GB inactive, and my system slows to a halt. For some reason it's not "reclaiming" the inactive memory. If I clear that memory (using the aforementioned app) the system speeds up.

    Is it possible something else is happening??

  8. macrumors demi-god


    If your computer is on, you have active processes running. Make sure you have selected "All Processes" at the top of Activity Monitor, and not just "My Processes".

    Follow every step of the following instructions precisely. Do not skip any steps.
    1. Launch Activity Monitor
    2. Change "My Processes" at the top to "All Processes"
    3. Click on the "% CPU" column heading once or twice, so the arrow points downward (highest values on top).
      (If that column isn't visible, right-click on the column headings and check it, NOT "CPU Time")
    4. Click on the System Memory tab at the bottom.
    5. Take a screen shot of the entire Activity Monitor window, then scroll down to see the rest of the list, take another screen shot
    6. Post your screenshots.

    To determine if you can benefit from more RAM, launch Activity Monitor and click the System Memory tab at the bottom to check your page outs. Page outs are cumulative since your last restart, so the best way to check is to restart your computer and track page outs under your normal workload (the apps, browser pages and documents you normally would have open). If your page outs are significant (say 1GB or more) under normal use, you may benefit from more RAM. If your page outs are zero or very low during normal use, you probably won't see any performance improvement from adding RAM.

    Using Activity Monitor to read System Memory and determine how much RAM is being used
  9. macrumors G3


    I'll be happy to do this. Thanks!
  10. Huntn, Aug 25, 2013
    Last edited: Aug 25, 2013

    macrumors G3


    I don't know why it took me so long to figure this out, but I think I have the cultprit: Sophos Antivirus has a program/engine called Intercheck that that takes any where from 35-50% cpu usage. Reports online show it taking up to 100% usage. I have uninstalled the program and am going to install Avast anti-virus and see how much memory it uses in comparison.

    Update: Now that it is installed, Avast Antivirus is using .1-4% CPU depending on what is going on. Much better...
  11. #11
    Why do you need AV software in the first place?
  12. macrumors demi-god


    There's another reason not to use Sophos: it can actually increase a Mac's vulnerability, as described here and here. 3rd party antivirus apps are not needed to keep a Mac malware-free, as long as the user practices safe computing, as described in the following link. If anyone insists on running antivirus for some reason, ClamXav (which is free) is one of the best choices, since it isn't a resource hog, detects both Mac and Windows malware and doesn't run with elevated privileges.
  13. macrumors G3


    Oh, I don't know... you never know? :p
  14. #14
    Just so you know, browsing torn sites or watching cat fighting videos or downloading the latest software will not get you in trouble if you use some common sense, though that could be disabled while watching those ... videos. Hmmm.

Share This Page