Where is all my RAM??????

JazzyFizzle

macrumors member
Original poster
Oct 24, 2011
66
0
I have 4GB RAM, but even when every application is closed I only have 1GB free? This is worse than windows! I experience a little lag in some applications every now and then and I think it's related to the RAM. Should I upgrade or is there software to stop the OS taking up 3GB of my RAM?
 

Adamantoise

macrumors 6502a
Aug 1, 2011
892
112
I think people have got this all wrong.

Why do people complain of their system using up RAM? RAM is supposed to be put to use.

If at your busiest, your computer says it's only using 3 of the 4GB of RAM, then why do you need to worry? Your RAM is doing its job, RAM isn't meant to sit there and idle so you can admire how much free RAM you have.

Just don't worry about it, if your computer is using a lot of RAM well at least the RAM you paid for is being put to use right? If you feel you need more, then it's cheap to upgrade to 8GB.

Just use your computer and don't worry about anything until you have a "real" problem.
 

theSeb

macrumors 604
Aug 10, 2010
6,963
91
Poole, England
I have 4GB RAM, but even when every application is closed I only have 1GB free? This is worse than windows! I experience a little lag in some applications every now and then and I think it's related to the RAM. Should I upgrade or is there software to stop the OS taking up 3GB of my RAM?
*facepalm*

People that don't understand how things work shouldn't be worrying about them. Let the operating system do its job. You've given it RAM, it is using it. This is why all of the "Free RAM" applications on the App Store are stupid and pointless and if you read the reviews from the people that know a thing or two, then you'll see why. Why the hell would you want to STOP THE OS FROM TAKING UP 3 GB of YOUR RAM? I have to say these types of threads are so depressing and I see why Apple keeps hiding this stuff away from you guys.

This is what most of you need to know:
Mac OS X has very efficient memory management. It will automatically allocate memory and adjust the contents of memory as needed.

Stop there. Leave it.

If you feel that you could do with more memory then look at the Page Outs and Page Ins figures. Then read up about this ratio and whether extra memory will help you. There are thousands of threads on the topic on this forum.

If you feel that you should know more then read:

http://support.apple.com/kb/ht1342

Then

http://hints.macworld.com/article.php?story=20010613140025184

But if you're too lazy, then:

So my advice is

a) don't be too worried about free memory being small in the top's display

b) keep an eye on pageouts and if increasing rapidly with time reduce machine's workload or add RAM if workload is a requirement.

c) Don't mess with relocating or sizing the swapfile -- an interesting exercise but really quite futile for the average Joe using X on iBooks, iMacs, etc. You simply should avoid severe swapping at all cost.
Here is another quite simple explanation
http://8help.osu.edu/1261.html

In contrast, Mac OS X uses a completely different memory management system. All programs can use an almost unlimited amount of memory, which is allocated to the application on an as-needed basis. Mac OS X will generously load as much of a program into RAM as they can, even parts that may not currently be in use. This may inflate the amount of actual RAM being used by the system. When RAM is needed, the system will swap or page out those pieces not needed or not currently in use. It is important to bear this in mind because a casual examination of memory usage with the top command via the Terminal application will reveal large amounts of RAM being used by applications.
Substitute "with the top command via the Terminal Application" to "with the Activity Monitor"

By the way, the windows machine that I am currently working on only has 3 Mega Bytes of physical memory free out of 6 GBs. What a POS!!!!! :rolleyes: :rolleyes: :rolleyes:
 

JazzyFizzle

macrumors member
Original poster
Oct 24, 2011
66
0
Ok that explains enough, thanks. I'm a new mac user, and haven't learnt about the OS yet. I guess it's a lot more efficient than Windows then. It was using 3GB with no applications running, and I wasn't aware of the RAM management.

I will sit down and do a bit of research into my latest investment!
 

heisenberg123

macrumors 603
Oct 31, 2010
6,497
9
Hamilton, Ontario
Ok that explains enough, thanks. I'm a new mac user, and haven't learnt about the OS yet. I guess it's a lot more efficient than Windows then. It was using 3GB with no applications running, and I wasn't aware of the RAM management.

I will sit down and do a bit of research into my latest investment!
RAM will also be "inactive" if it was previously in use, so technically thats Free also just doesnt move back to the Free Ram untill a restart or using a program like Free Memory. But inactive RAM is just as good as free RAM if you use an application that needs it
 

Cyong

macrumors newbie
Apr 27, 2011
10
0
Orlando, FL
By the way, the windows machine that I am currently working on only has 3 Mega Bytes of physical memory free out of 6 GBs. What a POS!!!!! :rolleyes: :rolleyes: :rolleyes:
And on my development machine with 12GB of RAM, iTunes has over allocated it self once again and is sitting at just over 2GB of RAM by itself just to listen to Tiesto. While Windows 7 only starts up using 1.24 GB, and Visual Studio 2010 only runs at 768 MB. Thanks to Apple, I have a media player that uses up more RAM than Windows, Visual Studio, Google Chrome, and Trillian put together.

Apple does have RAM issues, both in OSX and in iTunes.

(I haven't needed to restart Windows in a month, but I need to restart iTunes at least weekly.)
 

dusk007

macrumors 68040
Dec 5, 2009
3,386
62
I have to agree with you Cyong. I like the Usability of OSX but all those fanboys keep saying that OSX has great memory management while I experience the opposite.
Microsoft definitely has done its homework in that respect much better than OSX. While I cannot confirm your iTunes problems mine currently just sits there with 44MB with a 36GB music library, I have experienced on many occasions that Windows programs that I use need less RAM and stay more responsive at the same time than OSX.
OSX does good enough for me and I also have much more memory available than I ever had on Windows but objectively one cannot deny it is definitely worse than Windows in that respect. Considering all the work they do on Windows 8 to improve on RAM usage it will look much worse in a year. On the technical side Windows is more advanced. OSX has the nicer frontend a much better frontend something MS doesn't seem to care enough for to improve, I always need some extra tools for MS (they even offer them but won't build them into the OS for some reason).
 

theSeb

macrumors 604
Aug 10, 2010
6,963
91
Poole, England
And on my development machine with 12GB of RAM, iTunes has over allocated it self once again and is sitting at just over 2GB of RAM by itself just to listen to Tiesto. While Windows 7 only starts up using 1.24 GB, and Visual Studio 2010 only runs at 768 MB. Thanks to Apple, I have a media player that uses up more RAM than Windows, Visual Studio, Google Chrome, and Trillian put together.

Apple does have RAM issues, both in OSX and in iTunes.

(I haven't needed to restart Windows in a month, but I need to restart iTunes at least weekly.)
Sorry, I was being sarcastic in that bit. Your post suggests that you do not have much understanding of Windows or OSX memory management.

----------

Ok that explains enough, thanks. I'm a new mac user, and haven't learnt about the OS yet. I guess it's a lot more efficient than Windows then. It was using 3GB with no applications running, and I wasn't aware of the RAM management.

I will sit down and do a bit of research into my latest investment!
I wouldn't worry too much about it until your page outs exceed the page ins by a significant margin, which means that you need more physical RAM. Much like if your committed bytes exceed the commit limit regularly in Windows 7.
 

Cyong

macrumors newbie
Apr 27, 2011
10
0
Orlando, FL
I have to agree with you Cyong. I like the Usability of OSX but all those fanboys keep saying that OSX has great memory management while I experience the opposite.
Microsoft definitely has done its homework in that respect much better than OSX. While I cannot confirm your iTunes problems mine currently just sits there with 44MB with a 36GB music library, I have experienced on many occasions that Windows programs that I use need less RAM and stay more responsive at the same time than OSX.
OSX does good enough for me and I also have much more memory available than I ever had on Windows but objectively one cannot deny it is definitely worse than Windows in that respect. Considering all the work they do on Windows 8 to improve on RAM usage it will look much worse in a year. On the technical side Windows is more advanced. OSX has the nicer frontend a much better frontend something MS doesn't seem to care enough for to improve, I always need some extra tools for MS (they even offer them but won't build them into the OS for some reason).
I only have 8 gb of music.... The only reason I ever touched a Mac was to learn iphone development. Let me run OSX in a VM in Windows, and my laptop would be a macbook pro (i like the metal, better heat displacement, now if only I could get a windows logo to put over the led backlit apple on the cover...), with windows 7/8 and a VM of Lion for iphone dev. (Better yet let me do it on Windows, but that would mean that apple would lose hardware sales to run their OS, and dev environment for iOS. it is a good sales move to bind the two.)

The reason the memory management is the way it is on Windows comes back to the methodology. E.g.
Application Start, Import all files in directory to a database and delete the files, upon completion wait for another file to be placed in directory.

In Windows land the RAM allocation happens during the import, but as soon as the program says it no longer needs it, its zeroed and back to the pool, which is great because then another application can use it without going through the motion of can i have ram, yes you can have this much please wait a second so i can release this inactive stuff.

In OSX land, the OS thinks that the application may need that RAM space again so it would keep it in inactive state most likely, when the truth is that the program just doesn't need it anymore. That's why programs will load noticeably faster under OSX, because it basically left itself still available in the RAM.

Adobe used this concept and built the speed launcher which basically loads some of adobe reader on windows start up instead of when you actually open a pdf.

Some developers might call the existence of RAM left allocated after an application is closed a memory leak... (at least in Windows... it would only be a leak in OSX if it is still active, but you get the joke. :))
 

theSeb

macrumors 604
Aug 10, 2010
6,963
91
Poole, England
I only have 8 gb of music.... The only reason I ever touched a Mac was to learn iphone development. Let me run OSX in a VM in Windows, and my laptop would be a macbook pro (i like the metal, better heat displacement, now if only I could get a windows logo to put over the led backlit apple on the cover...), with windows 7/8 and a VM of Lion for iphone dev. (Better yet let me do it on Windows, but that would mean that apple would lose hardware sales to run their OS, and dev environment for iOS. it is a good sales move to bind the two.)

The reason the memory management is the way it is on Windows comes back to the methodology. E.g.
Application Start, Import all files in directory to a database and delete the files, upon completion wait for another file to be placed in directory.

In Windows land the RAM allocation happens during the import, but as soon as the program says it no longer needs it, its zeroed and back to the pool, which is great because then another application can use it without going through the motion of can i have ram, yes you can have this much please wait a second so i can release this inactive stuff.

In OSX land, the OS thinks that the application may need that RAM space again so it would keep it in inactive state most likely, when the truth is that the program just doesn't need it anymore. That's why programs will load noticeably faster under OSX, because it basically left itself still available in the RAM.

Edit: I take it that you haven't read much about SuperFetch and the fact that the exact same complaints in this thread about Mac OSX have been made about Windows 7?




Adobe used this concept and built the speed launcher which basically loads some of adobe reader on windows start up instead of when you actually open a pdf.

Some developers might call the existence of RAM left allocated after an application is closed a memory leak... (at least in Windows... it would only be a leak in OSX if it is still active, but you get the joke. :))
Windows 7 (& Vista) memory management is a lot more like Mac OSX in that it tries use the available memory much more aggressively and hold onto it rather than free as quickly as possible.

http://arstechnica.com/microsoft/news/2010/02/behind-the-windows-7-memory-usage-scaremongering.ars

So it was little surprise that, upon checking my reported stats on XPnet, I found that I too was in the "alarming" position of having virtually no free memory. A quick glance at Task Manager revealed the truth. Though my "free" memory is indeed negligible, this is because so much is used by cache. The important number is not "free," but "available." The "available" memory includes both memory that is free, and memory that can be trivially made available, and this figure is far more representative of the true amount of memory available to applications. The vast majority of cached memory can be freed up near-instantly, since it is used up merely by cached data from disk.
This is what I was alluding to earlier when I said that my Windows 7 currently has "3 Mega bytes free".
 
Last edited:

Cyong

macrumors newbie
Apr 27, 2011
10
0
Orlando, FL
Windows 7 (& Vista) memory management is a lot more like Mac OSX in that it tries use the available memory much more aggressively and hold onto it rather than free as quickly as possible.
Agreed, with caveats.

The application I referenced is something that was built in house to process 100 MB files into a database. Most of the time its just sitting in wait of a file with 6.5 MB of RAM in working set, but as soon as a file comes in the RAM utilization shoots to 125 MB, and afterwords is back down 6.5.

Since you are bringing up superfetch, it will grab the working set information of any recently released code/data into itself, and serialize it to reduce space. It's doing this by only a few pages of RAM per second, with a low priority so as not to affect any other process. The minute a new file comes in the running process spins back up, and once it releases the information in superfetch disappears into the recycling pile to be zeroed and become free again, and it is replace with what the working set just released.

OSX if I recall will keep the entire private bytes collection in inactive memory until it is needed, similar, but with the difference that Windows is keeping the working set instead, and has a different weighting algorithm to determine if RAM should be zeroed.

There are also a ton and a half of other factors involved, I don't claim to know the full scope, and I by nature distrust any one who claims to. But what I do know is that on a 8GB MBP, with nothing running but VMWare Fusion with a 4GB Windows 7 instance, which in theory is allocated to that process for that VM. What starts off the day with 25% RAM Free, ends with 0% free, a ton and a half of inactive in addition to the 4GB the is theoretically dedicated to the VM, and an inability to even watch a youtube video. (Granted some of that is VMWare itself, but I doubt 2 GB worth.)

I have been a developer for 7 years now, before this I did support desk for 5 years. The view of the user can be slow while the developer sees it being efficient. One of our programmers said the other day when told of a company with one product that was smooth and seamless, "That's because the do ____." I pulled him aside, because it doesn't matter if we are doing it differently, the result is not as smooth and seamless, and it frustrates the user. The user is not gonna understand why we can't be that way just because we chose one method of skinning a cat vs the other. What Apple is calling a feature, I am calling a need for me to have to do the purge command in the terminal, but for someone else it is probably the golden egg. And it all depends on the perspective of the user.
 

theSeb

macrumors 604
Aug 10, 2010
6,963
91
Poole, England
I am not sure what you mean by "inability to watch youtube videos".

I currently have 36 Mega bytes in "free memory" and I can do everything just fine.

I would suggest that you read this:

http://hints.macworld.com/article.php?story=20010613140025184

http://developer.apple.com/library/...tual/ManagingMemory/Articles/AboutMemory.html

In simplest terms (and ties in to the top link about OSX and its unix kernel underpinnings :

There are no reasons that having inactive memory are bad. Inactive is as good, and often better than, free from an operating perspective. Restarting to free memory is a mistake. Doing so will purge the file system buffer cache, as well as inactive memory and, thus, decrease performance.
 

thundersteele

macrumors 68030
Oct 19, 2011
2,984
7
Switzerland
I was too lazy so far to upgrade to 8GB. Then I noticed Lion eating up 1.3 GB after a reboot, and Safari happily using up to a GB for it's "Web content", which left me quite concerned, and thinking that I need more ram and a more efficient browser. Then I decided to give it a try and fired up SC2 with only about a GB of free+inactive ram left.

I didn't experience any issue. OSX smoothly reduced the "web content" of Safari. I think parts were swapped out, because afterwards the swap was 200 MB, but I didn't experience any lag or slowdown from this (SSD helped probably).
During and after gaming, the system was always responsive. This was a big issue on my previous MBP with 2GB ram, running SL. There, after gaming, the system needed several minutes to "recover", most likely to retrieve swapped out data from the HDD. Of course 4 vs. 2 cores also help!
 

visim91

macrumors 6502
Nov 13, 2011
332
0
See my attachment below. Those page outs are pretty nasty IMHO. You can never have too much RAM though...

EDIT: Should I throw another 4Gig stick in? lol...I feel like I have created a monster!
Aw man, that is unfortunate to see.
I have the same memory config. as you w/ Lion on a 2008 unibody Macbook. Things aren't nearly as bad.

here's my situation after one week without restarting/shutting down the computer. In comparison, there is definitely something weird going on w/ your set-up..

 

Mal

macrumors 603
Jan 6, 2002
6,249
17
Orlando
See my attachment below. Those page outs are pretty nasty IMHO. You can never have too much RAM though...

EDIT: Should I throw another 4Gig stick in? lol...I feel like I have created a monster!
If you've been running for weeks or months without a restart, it's probably not a big deal. If that's a day/week's normal usage, then it's definitely time for more RAM.

jW
 

nateo200

macrumors 68030
Feb 4, 2009
2,857
6
Northern District NY
When was the last time you rebooted?
I'd like to say a month ago lol but I restart regularly. I restarted yesterday, but FCP X and Handbrake just rape my machines performance.
Aw man, that is unfortunate to see.
I have the same memory config. as you w/ Lion on a 2008 unibody Macbook. Things aren't nearly as bad.

here's my situation after one week without restarting/shutting down the computer. In comparison, there is definitely something weird going on w/ your set-up..

[url=http://img46.imageshack.us/img46/992/screenshot20111123at608.png]Image[/URL]
Haha well its better than 4GB's I must say. I hate the core 2 duo though, it is such a drag for my tasks. I think I have a computer curse, every machine I touch one way or another slows down...I think I have to just get a Mac Mini for tasks where I need to "throw the kitchen sink at the CPU"...That or get a fast SATA II SSD...

I'm a natural performance junky...I could probably kill a 12-core Mac Pro, 64gigs of RAM, 4 bays of SATA III SSD's, etc. just from usage if you have me a day to stress it just from usage, some adderall, and some raw RED footage to edit..lol
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.