Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

karohan

macrumors 6502
Original poster
Jun 25, 2010
396
0
How do I get OS X to free up inactive RAM? I have 8gb of RAM and I am using 1.7 GB of swap but I have 2.11 GB of inactive memory and 511 MB of free memory. That seems weird.
 
You don't need to. OS X will automatically use that RAM if it needs to. Generally inactive RAM is information from recently launched applications that hasn't been transferred to swap space. Since it's inactive, OS X will overwrite it if it runs out of free space.
 
I read that article, but I don't understand why I still have swap being used when I have inactive memory. Wouldn't it make sense for the memory in the swap file to replace the inactive? Or does the swap memory sort of function like inactive memory as well, and is just there in case I re-open a recently use program.
 
I read that article, but I don't understand why I still have swap being used when I have inactive memory. Wouldn't it make sense for the memory in the swap file to replace the inactive? Or does the swap memory sort of function like inactive memory as well, and is just there in case I re-open a recently use program.
It matters if the swap is page-ins or page-outs, but the bottom line is stated in the first part of that article:
Mac OS X has very efficient memory management. It will automatically allocate memory and adjust the contents of memory as needed.
You're better off just ignoring it and let Mac OS X do its job. There's nothing you can do to improve on it.
 
It matters if the swap is page-ins or page-outs, but the bottom line is stated in the first part of that article:

You're better off just ignoring it and let Mac OS X do its job. There's nothing you can do to improve on it.

This. I have 4GB of ram. at any given moment I am using about 1.5GB, and have about 50MB of free ram, the rest is inactive. Still runs like the day I took it out of the box. Mac knows what it's doing, it's not Windows Me... :p j/k
 
It matters if the swap is page-ins or page-outs

Sorry, I should've specified, I am witnessing page outs. I'll take all of your guys' advice and ignore it, especially because I don't feel any of the sluggishness, but it just feels odd that swap needs to be used with 8gb of RAM (when I haven't even done too much RAM intensive stuff lately). I guess if I'm not feeling sluggishness though, it's nothing to worry about.
 
What matters is the number of page-outs you see. If it is high, you need more RAM.
If you want to free up that inactive RAM, run Repair Permissions. I have no idea why this works but it does, almost as good as a reboot. Make sure no applications are running first.
 
I have some page outs on my MacBook, but the number is minuscule compare to the number of page ins. I have over 1,000,000 page ins, and 253 page outs. So it's not an issue.
 
What matters is the number of page-outs you see. If it is high, you need more RAM.
If you want to free up that inactive RAM, run Repair Permissions. I have no idea why this works but it does, almost as good as a reboot. Make sure no applications are running first.

See that sort of reasoning is concerning me because I have 107k page outs and in iStat Pro my swap is 1.0gb/2.0gb (does that mean 1.0 gb of 2.0 gb is being occupied or I've had 2.0 gb of memory paged out?) with 8gb of RAM. I can't upgrade my RAM anymore with my Macbook Pro. Is it possible that OS X, when purging inactive memory puts in swap because that is quicker than not having it in memory at all?

I'd rather not run repair permissions because a reboot is just as quick. Especially if I have to quit out of all applications first.
 
I'd rather not run repair permissions because a reboot is just as quick. Especially if I have to quit out of all applications first.
You don't have to repair permissions or do anything else. Mac OS X will manage your RAM without you doing anything. Just use your Mac and forget about watching RAM usage. If you're experiencing significant loss of performance, then address it. Otherwise, it's a waste of time to try to improve on the built-in memory management in Mac OS X. After all, it's not Windows!
 
Sorry, I should've specified, I am witnessing page outs. I'll take all of your guys' advice and ignore it, especially because I don't feel any of the sluggishness, but it just feels odd that swap needs to be used with 8gb of RAM (when I haven't even done too much RAM intensive stuff lately). I guess if I'm not feeling sluggishness though, it's nothing to worry about.


Modern OSs use swap files no matter how much RAM you have. Stop wasting time witnessing page outs and your computer will seem faster. Studies have also shown that quitting Activity Monitor leads to a better user experience.
 
See that sort of reasoning is concerning me because I have 107k page outs and in iStat Pro my swap is 1.0gb/2.0gb (does that mean 1.0 gb of 2.0 gb is being occupied or I've had 2.0 gb of memory paged out?) with 8gb of RAM. I can't upgrade my RAM anymore with my Macbook Pro. Is it possible that OS X, when purging inactive memory puts in swap because that is quicker than not having it in memory at all?
I'd rather not run repair permissions because a reboot is just as quick. Especially if I have to quit out of all applications first.
First, relax. :cool::cool::cool: As the poster above said, unless the computer is really slowing down, why worry?
AFAIK, the ratio at which you should be concerned about page in/page outs has not been cleary defined, but in your case 107k of page outs is extremely low. Maybe if your page outs are 1/3 of your page ins.... then you can start to wonder what application or process is hogging the CPU. Activity Monitor is a good tool for sorting out issues in the hands of someone informed enough to use it correctly, but you are using it to find points to worry about and making incorrect assumptions along the way (107k is really small). So, you really have only 2 choices, read up on the memory management in OSX if you are interested, or just let OSX do its thing. Apple has some of the best software engineers in the field, and while I wouldn't trust all of them with my wallet or my girlfriend, i will leave the memory management in OSX in their good hands.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.