PDA

View Full Version : 8gig RAM MBA 2012 starting to run out of app memory




dominicdiep
Aug 10, 2012, 05:51 PM
:( I don't understand why I'm starting to get this recently, considering that the programs I've been using mainly consisting of just Chrome, Safari, Finder and iTunes! I've checked Activity Monitor and something is definitely up. How can I run of memory with just a few programs open with 8gigs of ram to spare? Someone explain please



simsaladimbamba
Aug 10, 2012, 05:53 PM
Open Activity Monitor and go to the System Memory* tab and look for Page Outs and Swap used and report back.
Using Activity Monitor to show you CPU and RAM usage
* Mac OS X: Reading system memory usage in Activity Monitor (http://support.apple.com/kb/ht1342)
Can you make a screenshot (http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X) of Activity Monitor (SHOW ALL PROCESSES and sorted by REAL MEM and with the SYSTEM MEMORY tab visible) and attach (http://forums.macrumors.com/showthread.php?p=11836587#post11836587) it to your next post?

GGJstudios
Aug 10, 2012, 05:55 PM
:( I don't understand why I'm starting to get this recently, considering that the programs I've been using mainly consisting of just Chrome, Safari, Finder and iTunes! I've checked Activity Monitor and something is definitely up. How can I run of memory with just a few programs open with 8gigs of ram to spare? Someone explain please
What do you mean, you've "run out of memory"? My guess is you're misinterpreting your System Memory readings. Add Free and Inactive memory together to determine what's available for apps to use.
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).
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).

dominicdiep
Aug 10, 2012, 06:45 PM
Open Activity Monitor and go to the System Memory* tab and look for Page Outs and Swap used and report back.
Using Activity Monitor to show you CPU and RAM usage
* Mac OS X: Reading system memory usage in Activity Monitor (http://support.apple.com/kb/ht1342)
Can you make a screenshot (http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X) of Activity Monitor (SHOW ALL PROCESSES and sorted by REAL MEM and with the SYSTEM MEMORY tab visible) and attach (http://forums.macrumors.com/showthread.php?p=11836587#post11836587) it to your next post?

Sorry for the late reply. My MacBook just did it again and when it does the whole computer becomes unresponsive and I have to cold boot it.

http://www.flickr.com/photos/80954133@N08/7755761748/

youse123
Aug 10, 2012, 06:50 PM
Go to Terminal and type in 'purge' (without the quotations). This should free up unused memory. Your computer will become unresponsive for 20-30 seconds. Post screenshot after doing so

GGJstudios
Aug 10, 2012, 06:56 PM
Sorry for the late reply. My MacBook just did it again and when it does the whole computer becomes unresponsive and I have to cold boot it.
Restart your computer, then follow the instructions in my earlier post to take a new screen shot and post it. Don't skip any steps.
Go to Terminal and type in 'purge' (without the quotations). This should free up unused memory.
That is not necessary. Inactive RAM is available for use, just like free memory, except it has an added advantage. Purging removes that advantage.

dominicdiep
Aug 10, 2012, 07:51 PM
Restart your computer, then follow the instructions in my earlier post to take a new screen shot and post it. Don't skip any steps.

That is not necessary. Inactive RAM is available for use, just like free memory, except it has an added advantage. Purging removes that advantage.

here you go, thanks

GGJstudios
Aug 10, 2012, 07:55 PM
here you go, thanks
You're no where near running out of memory. Just relax and enjoy your Mac. Mac OS X will manage memory quite well without you doing anything.

dominicdiep
Aug 10, 2012, 08:00 PM
You're no where near running out of memory. Just relax and enjoy your Mac. Mac OS X will manage memory quite well without you doing anything.

This is straight after restarting my computer, like you said before. In about a couple of hours use it will happen again. Did you want me to take screenshots when it's about to run out of memory after opening basic apps?

GGJstudios
Aug 10, 2012, 08:01 PM
This is straight after restarting my computer, like you said before. In about a couple of hours use it will happen again. Did you want me to take screenshots when it's about to run out of memory after opening basic apps?
Please do.

dominicdiep
Aug 10, 2012, 08:25 PM
Please do.

After just 14 minutes of use...

Safari web content? i only have facebook and reddit open... :confused:

GGJstudios
Aug 10, 2012, 08:28 PM
After just 14 minutes of use...

Safari web content? i only have facebook and reddit open... :confused:
You still have no page outs, which means you haven't maxed out your memory. However, you are using Flash, which is notorious for high resource usage. For Flash-related issues:
Find your Flash version (http://kb2.adobe.com/cps/155/tn_15507.html#main_LatestFlashPlayer) and make sure it's the latest version (http://www.adobe.com/software/flash/about/) available. Never install or update Flash from a pop-up on a website. Always go to Adobe's site to get Flash or updates.
Install ClickToFlash (http://hoyois.github.com/safariextensions/clicktoplugin/) (Safari), Flashblock (https://addons.mozilla.org/en-US/firefox/addon/flashblock/) (Firefox) or FlashBlock (http://www.chromeextensions.org/appearance-functioning/flashblock/) (Chrome) to control which Flash content plays on websites.
Try using the YouTube HTML5 Video Player (http://www.youtube.com/html5) to watch YouTube videos, when available. (May impact fullscreen viewing. See link for details.) Some have reported better performance with HTML5, while some have reported worse. Try it and find out what works best for you.

killerrobot
Aug 10, 2012, 08:38 PM
Do you have any extensions installed in Chrome, such as 1Password?

Also, how many tabs do you usually keep open in Chrome and Safari?

EDIT: Make sure you have the 64 bit of shockwave flash installed - that may just solve all your problems.

http://get.adobe.com/shockwave/

dominicdiep
Aug 10, 2012, 08:38 PM
You still have no page outs, which means you haven't maxed out your memory. However, you are using Flash, which is notorious for high resource usage. For Flash-related issues:
Find your Flash version (http://kb2.adobe.com/cps/155/tn_15507.html#main_LatestFlashPlayer) and make sure it's the latest version (http://www.adobe.com/software/flash/about/) available. Never install or update Flash from a pop-up on a website. Always go to Adobe's site to get Flash or updates.
Install ClickToFlash (http://hoyois.github.com/safariextensions/clicktoplugin/) (Safari), Flashblock (https://addons.mozilla.org/en-US/firefox/addon/flashblock/) (Firefox) or FlashBlock (http://www.chromeextensions.org/appearance-functioning/flashblock/) (Chrome) to control which Flash content plays on websites.
Try using the YouTube HTML5 Video Player (http://www.youtube.com/html5) to watch YouTube videos, when available. (May impact fullscreen viewing. See link for details.) Some have reported better performance with HTML5, while some have reported worse. Try it and find out what works best for you.

Think I've found the problem after looking at this http://forums.macrumors.com/showthread.php?t=1387267. Seems like AdBlock is causing a memory leak in Safari. Just uninstalled it now and with Fb and Reddit open, Safari Web Content is only using around 100mb now :)

heyadol
Aug 10, 2012, 08:50 PM
[QUOTE=GGJstudios;15441816
That is not necessary. Inactive RAM is available for use, just like free memory, except it has an added advantage. Purging removes that advantage.[/QUOTE]

What exactly is that advantage? I used to run into this all the time on my 27" iMac and it is extremely frustrating getting that response. Having 12GB RAM with Wired + Active totaling almost 4GB, Inactive totaling 8GB and a 40MB green sliver of Free RAM my computer would come screeching to a halt. As I open new web pages or programs I would stare at the spinwheel for 30+ seconds before anything would happen! When I had a lot of Free RAM the iMac was always so snappy.

Anyway, being told by Apple Geniuses and other bloggers that all is well and I just don't understand how OS X utilizes RAM didn't change the fact that that my Mac was crawling.

GGJstudios
Aug 10, 2012, 08:56 PM
What exactly is that advantage?

Mac OS X: Reading system memory usage in Activity Monitor (http://support.apple.com/kb/HT1342)
This information is in RAM but it is not actively being used, it was recently used.

For example, if you've been using Mail and then quit it, the RAM that Mail was using is marked as Inactive memory. Inactive memory is available for use by another application, just like Free memory. However, if you open Mail before its Inactive memory is used by a different application, Mail will open quicker because its Inactive memory is converted to Active memory, instead of loading it from the slower drive.

Anyway, being told by Apple Geniuses and other bloggers that all is well and I just don't understand how OS X utilizes RAM didn't change the fact that that my Mac was crawling.
There are other factors other than memory issues that can cause poor performance.

heyadol
Aug 10, 2012, 09:25 PM
Mac OS X: Reading system memory usage in Activity Monitor (http://support.apple.com/kb/HT1342)



There are other factors other than memory issues that can cause poor performance.

I suppose you are right, I was probably pointing fingers at RAM since "Used" total was usually about 0.1GB away from my actual total and CPU usage was typically 45% or less. Anyway, the OP seems satisfied so I will thank you for your feedback and the Apple support article. I shouldn't jump into someone else's post for and make it about me. :o

dyn
Aug 12, 2012, 10:16 AM
Sorry for the late reply. My MacBook just did it again and when it does the whole computer becomes unresponsive and I have to cold boot it.

http://www.flickr.com/photos/80954133@N08/7755761748/
Ah the famous Safari web content aka Safari + Flash. Safari is a very buggy and memory intensive webbrowser, especially when using Flash. It causes it to use enormous amounts of memory and make the cpu go crazy at times. I've had that very same issue and resolved it by simply stop using Safari all together (I wasn't running any extensions!). Opera, Chrome and Firefox are much better browsers that don't have this problem. It is best to use any one of these. Updating to the latest Safari and Flash version does not seem to resolve the memory issue.

Running purge and rebooting the machine will not resolve this problem. After running Safari for a few hours (say listening/looking at some playlist at YouTube) will cause it to use 4+ GB of memory like in your screenshot. If you must use Safari than regularly close it and restart it. You may need to do this after 2 or 3 vids even.

kolz
Aug 13, 2012, 01:28 AM
confirmed from me as well, use clicktoflash to control the flash settings and you're good to go.

Another way is to quit safari (as in command-Q instead of pressing the red button on the top left side). That should free up all memories hogged by flash.

Nova Sensei
Aug 13, 2012, 01:44 AM
here you go, thanks

Hmmm what was your wallpaper in this particular screenshot?? :cool:

dominicdiep
Aug 13, 2012, 09:09 AM
Hmmm what was your wallpaper in this particular screenshot?? :cool:

http://www.flickr.com/photos/jelisse_garkson/7638184720/in/faves-29624681@N02/

:D

dcorban
Aug 14, 2012, 12:15 PM
After just 14 minutes of use...

Safari web content? i only have facebook and reddit open... :confused:

This is probably from Adobe Flash.

----------

Think I've found the problem after looking at this http://forums.macrumors.com/showthread.php?t=1387267. Seems like AdBlock is causing a memory leak in Safari. Just uninstalled it now and with Fb and Reddit open, Safari Web Content is only using around 100mb now :)

I noticed this as well, although not lately. The memory overhead with adblock when visiting sites that contain a lot of links, javascript, and ads is huge.

killerrobot
Aug 21, 2012, 08:09 PM
I edited this into a previous post, but I think it may have been overlooked. Make sure you have upgraded the flash to the 64 bit version. Safari boots in 64 bit and the 32 bit flash causes lots of problems.

http://get.adobe.com/shockwave/

Dustman
Aug 21, 2012, 08:13 PM
OS X is meant to utilize every bit of ram it can get it's hands on. This is a good thing. Why have ram sitting there not being utilized. You're not paging out thats the main thing.

TyroneShoes2
Aug 21, 2012, 08:41 PM
Isn't the 260 GB virtual memory file a little alarming? With a 128 GB SSD (as stated in the OPs specs), where does that even reside?

Another question: should the OP be using Safari if this is happening? Would Chrome prevent this, or is it just Flash that is causing this?

TyroneShoes2
Aug 21, 2012, 09:07 PM
What exactly is that advantage?...To me, that is still unclear. If you read between the lines of the article link, it may refer to cache memory. IOW, stuff can be offloaded to the VM file on a HDD or SDD, or it can be offloaded to L3 or other cache (not sure if L3 is still used). Since cached data is acquired as fast as, or even faster than RAM (due to how fast the bus may or may not be) there is an advantage to offloading data to a cache. Maybe this is what we are talking about.

Ironically, the G3 chip originally processed significantly faster in the real world than the G4 chip because the G3 development team concentrated on having a lot of L3 cache while the G4 team did not. This was difficult to explain, and resulted in a lot of chips being plowed under to cover this fact up (source: Leo LaPorte on MacBreak Weekly).

So if we assume that this is what they are referring to as "Inactive" memory. and I am purely speculating here, that would at least explain why it may have an "advantage" that free memory (memory unused and sitting in RAM) might not.

The obvious question then becomes "what does 'purge' do?". Does this mean that when you invoke a purge command that it blows that memory out of cached status and back into free memory?

If so, then it makes sense not to invoke it if you expect to reload recent documents or apps. And it seems then not to matter if you don't expect to. And even then, any "advantage" seems pretty minor.

Especially in the era of SSDs. It would seem that accessing RAM, while significantly faster than accessing a HDD, might not be all that different than accessing an SSD. That means the "advantage" of cache memory is even less than it would be with a standard HDD, and the same applies to how much virtual memory there is being used, and to the page ins and page outs.

Can anyone confirm or deny any of this?

twintin
Aug 22, 2012, 05:07 AM
Isn't the 260 GB virtual memory file a little alarming? With a 128 GB SSD (as stated in the OPs specs), where does that even reside?


Think you are mixing up VM size with swap file size. They may appear same, but are evidently not (just compare the VM size with amount of free disk space in Activity Monitor).

Kludge420
Aug 22, 2012, 05:34 AM
Restart your computer, then follow the instructions in my earlier post to take a new screen shot and post it. Don't skip any steps.

That is not necessary. Inactive RAM is available for use, just like free memory, except it has an added advantage. Purging removes that advantage.

Wrong and wrong. You have no idea what you are talking about. Do NOT restart your computer but instead run purge as was stated. Also inactive memory is NOT available to other apps but only the app that has the memory leak (probably a Chrome plugin) that's eating up all his free memory so there is zero advantage. Saying to reboot is ridiculous since that would, in effect, purge the memory but would take longer.

twintin
Aug 22, 2012, 07:08 AM
Also inactive memory is NOT available to other apps but only the app that has the memory leak (probably a Chrome plugin) that's eating up all his free memory so there is zero advantage.

Seriously, this is pretty standard Unix memory management. You can google NetBSD, FreeBSD or Linux and you will see they pretty much all work in same way as OS X when it comes to memory management.

Here is an article for you explaining OS X memory management.

http://sg80bab.blogspot.se/2007/03/is-my-mac-using-too-much-memory.html

TyroneShoes2
Aug 22, 2012, 07:08 AM
Isn't the 260 GB virtual memory file a little alarming? With a 128 GB SSD (as stated in the OPs specs), where does that even reside?...Think you are mixing up VM size with swap file size. They may appear same, but are evidently not (just compare the VM size with amount of free disk space in Activity Monitor).Am I? Apple doesn't even use the terminology "swap file" so that is a part of what I don't understand; I need that definition.

Indiana University information technology services knowledge base seems to define VM as a system comprising of Ram and HDD space using an algorithm to park data in RAM in a HDD file during multitasking so that that RAM is freed up for use when a different task is being requested of the computer. Put more simply, data in RAM is temporarily off-loaded to a file on the HDD when not actively being addressed. So it is RAM, HDD space, and a particular implementation of the two. And that is not in any way different from the understanding that I already had.

They go further to imply that a "swap file" is indeed that file on the HDD that VM uses. Again, that has always been my understanding as well.

If all of that is true, then wtf is the VM size reported in Activity Monitor? Is that the accrued amount of data that is swapped since bootup? One would assume that it is not if the pages in and out are also listed as being this low, so I still do not understand what VM size is referring to.

GGJstudios
Aug 22, 2012, 09:41 AM
Wrong and wrong. You have no idea what you are talking about.
Before you erroneously claim someone is wrong, you might want to read up on the topic so you don't embarrass yourself.
Do NOT restart your computer but instead run purge as was stated.
Purge does not reset page outs and swap used to zero, as a restart does.
Also inactive memory is NOT available to other apps but only the app that has the memory leak (probably a Chrome plugin) that's eating up all his free memory so there is zero advantage.
That is false. From the link I posted earlier:
Inactive:

This information is in RAM but it is not actively being used, it was recently used.

For example, if you've been using Mail and then quit it, the RAM that Mail was using is marked as Inactive memory. Inactive memory is available for use by another application, just like Free memory. However, if you open Mail before its Inactive memory is used by a different application, Mail will open quicker because its Inactive memory is converted to Active memory, instead of loading it from the slower drive.
Saying to reboot is ridiculous since that would, in effect, purge the memory but would take longer.
Again, purge doesn't reset page outs and swap used, which is the purpose of the restart, so those can be tracked from zero. Page outs are cumulative since the last restart.

Kludge420
Aug 22, 2012, 02:11 PM
Before you erroneously claim someone is wrong, you might want to read up on the topic so you don't embarrass yourself.

Back at ya. The reason he has so much page outs and swap usage is exactly because he has all that memory tied up as inactive. Running purge will almost instantly drop the drive hits and speed up the Mac. Since you have no practicle knowledge and are simply regurgitating partially understood docs you might want to stop before you make more of a fool of yourself.

dyn
Aug 22, 2012, 02:31 PM
Wrong and wrong. You have no idea what you are talking about. Do NOT restart your computer but instead run purge as was stated.
The only one having absolutely no idea about memory whatsoever would be you. From the manual for the purge command:


NAME
purge -- force disk cache to be purged (flushed and emptied)

SYNOPSIS
purge

DESCRIPTION
Purge can be used to approximate initial boot conditions with a cold disk buffer cache for performance
analysis. It does not affect anonymous memory that has been allocated through malloc, vm_allocate, etc.

SEE ALSO
sync(8), malloc(3)


Purge only flushes disk cache, not the other things that are in memory. A reboot does EVERYTHING. That's the major difference and the reason why rebooting is a much better idea. Using purge has also some nasty side effects such as a very slow computer right after completing the purge and even crashing apps (not every apps likes what purge does). This is the main reason why you shouldn't be using purge but be doing a reboot.

The effect of the purge command varies greatly. It depends on how much of the memory is being used as disk cache. If it is a lot you can regain a lot of memory, if it isn't then you don't regain a lot of memory (aka stating the obvious).


Also inactive memory is NOT available to other apps but only the app that has the memory leak (probably a Chrome plugin) that's eating up all his free memory so there is zero advantage.
It is the OS that handles the memory and not the applications. The applications will request but it is the OS who decides what the apps will get. Of course apps can only reach what they have been given. If they could reach the area in memory for other apps this is a major bug in terms of security and safety (stealing mem from other apps will make them crash, corrupt data and many other nasty things).

One thing you are correct about: using purge will indeed do nothing with the inactive memory (it has zero advantage) thus requiring the user to reboot in order to reclaim inactive memory.

Check out post #2 by simsaladimbamba. It contains a link to the official Apple knowledge base where they explain OS X's memory management. You definitely won't like what it says under "inactive memory" as it shows that you are nothing more than a simple troll:

Inactive:

This information is in RAM but it is not actively being used, it was recently used.

For example, if you've been using Mail and then quit it, the RAM that Mail was using is marked as Inactive memory. Inactive memory is available for use by another application, just like Free memory. However, if you open Mail before its Inactive memory is used by a different application, Mail will open quicker because its Inactive memory is converted to Active memory, instead of loading it from the slower drive.

GGJstudios
Aug 22, 2012, 03:18 PM
Back at ya. The reason he has so much page outs and swap usage is exactly because he has all that memory tied up as inactive.
Your posts indicate you have much to learn about Mac OS X memory management. Page outs and swap usage are a result of no free or inactive memory available. Purge simply removes the one advantage of having inactive memory, and nothing more, since inactive memory is the same as free memory in all other respects.
Since you have no practicle knowledge and are simply regurgitating partially understood docs you might want to stop before you make more of a fool of yourself.
I actually have more than a few years of practical knowledge, and can even correctly spell "practical". You have no idea what I do or don't understand, and since my statements about Mac OS X memory are supported by statements from Apple, who developed Mac OS X, I'll trust my knowledge and understanding on this one. You've been presented with the facts. If you choose to ignore the facts, that's up to you.

Kludge420
Aug 27, 2012, 07:42 AM
Your posts indicate you have much to learn about Mac OS X memory management. Page outs and swap usage are a result of no free or inactive memory available. Purge simply removes the one advantage of having inactive memory, and nothing more, since inactive memory is the same as free memory in all other respects.

I actually have more than a few years of practical knowledge, and can even correctly spell "practical". You have no idea what I do or don't understand, and since my statements about Mac OS X memory are supported by statements from Apple, who developed Mac OS X, I'll trust my knowledge and understanding on this one. You've been presented with the facts. If you choose to ignore the facts, that's up to you.

You know you've won when all they can address is a spelling mistake.

The reality is purge works: end of discussion.

GGJstudios
Aug 27, 2012, 08:50 AM
You know you've won when all they can address is a spelling mistake.
That indicates that you didn't read the rest of the post. You can keep denying the facts, but that doesn't make them any less true.