PDA

View Full Version : Mountain Lion Memory Management




Huntn
Mar 26, 2013, 09:22 AM
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?
Thanks!



justperry
Mar 26, 2013, 09:31 AM
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.

Huntn
Mar 26, 2013, 10:02 AM
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.

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.

benwiggy
Mar 26, 2013, 10:45 AM
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.

matt2053
Mar 26, 2013, 02:25 PM
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?

Huntn
Mar 26, 2013, 02:56 PM
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?

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! :)

Kitmoni
Mar 27, 2013, 09:42 AM
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.


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??

Chris

GGJstudios
Mar 27, 2013, 09:45 AM
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
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.
Launch Activity Monitor
Change "My Processes" at the top to "All Processes"
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")
Click on the System Memory tab at the bottom.
Take a screen shot (http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X) of the entire Activity Monitor window, then scroll down to see the rest of the list, take another screen shot
Post your screenshots (http://forums.macrumors.com/showpost.php?p=14126379&postcount=16).

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 (http://support.apple.com/kb/HT1342)

Huntn
Mar 27, 2013, 12:06 PM
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.
Launch Activity Monitor
Change "My Processes" at the top to "All Processes"
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")
Click on the System Memory tab at the bottom.
Take a screen shot (http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X) of the entire Activity Monitor window, then scroll down to see the rest of the list, take another screen shot
Post your screenshots (http://forums.macrumors.com/showpost.php?p=14126379&postcount=16).

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 (http://support.apple.com/kb/HT1342)

I'll be happy to do this. Thanks!

Huntn
Aug 25, 2013, 02:45 PM
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 (https://discussions.apple.com/thread/4157331?start=0&tstart=0) 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...

simsaladimbamba
Aug 25, 2013, 02:55 PM
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 called intercheck that that takes any where from 35-50% cpu usage. Reports online (https://discussions.apple.com/thread/4157331?start=0&tstart=0) 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...

Why do you need AV software in the first place?

GGJstudios
Aug 25, 2013, 06:12 PM
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 (https://discussions.apple.com/thread/4157331?start=0&tstart=0) 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...

There's another reason not to use Sophos: it can actually increase a Mac's vulnerability, as described here (http://forums.macrumors.com/showpost.php?p=11570070&postcount=31) and here (http://forums.macrumors.com/showpost.php?p=12029337&postcount=41). 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. Mac Virus/Malware FAQ (http://guides.macrumors.com/Mac_Virus/Malware_FAQ) If anyone insists on running antivirus for some reason, ClamXav (http://www.clamxav.com/) (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.

Huntn
Aug 25, 2013, 06:19 PM
Why do you need AV software in the first place?

Oh, I don't know... you never know? :p

simsaladimbamba
Aug 25, 2013, 06:29 PM
Oh, I don't know... you never know? :p

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.