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

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
I'm sure this has been covered but I've gotten different answers in my searches about inactive ram and how it affects the computer's performance and how much is normal, so I wanted to check here on my specific problem.

I have a retina MBP 16gb ram and recently, what I would think is, a lot of ram has been delegated to inactive status over. I first noticed this happening a couple of days ago when my computer got really sluggish. I have been told that inactive memory is just stored to reopen recently used programs more quickly and does not slow down overall performance as it is re-delegated to used memory when needed, or something to that effect. However I have repeated the results a few times now whenever I go about my normal business (a number of tabs along with a torrent program and sometimes a VLC video playing) the inactive memory skyrockets. I have been told that google chrome could be a culprit and whenever I check activity monitor Google Chrome Renderer seems to be a big player. If the answer is just to stop using Chrome that is fine, but I wanted to check to make sure. I shouldn't think that I would need to use the purge command so often to keep this machine running smoothly, although it does help...

thanks :)
 

Attachments

  • Screen Shot 2012-12-30 at 2.05.50 PM.png
    Screen Shot 2012-12-30 at 2.05.50 PM.png
    634.6 KB · Views: 150
  • Screen Shot 2012-12-30 at 2.07.36 PM.png
    Screen Shot 2012-12-30 at 2.07.36 PM.png
    155.7 KB · Views: 99

maflynn

macrumors Haswell
May 3, 2009
73,470
43,394
I personally wouldn't worry about inactive ram, its inactive meaning that its currently not being used but available if the system needs it.

By issuing the purge command you move it from inactive to free. The downside of that is that the information that was in there is removed. So if you were running Lightroom (and then exited it), and purged the memory, but then decided to go back into LR, the app would be slower starting up. If you left OSX to manage the resources then LR would start much faster since much of it was in inactive ram.

Basically OSX has an excellent memory management system, buy trying to do stuff yourself to "improve it" means you can hamper performance.
 

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
thanks :) that's what I've been told and what I assumed, but I'm just having a hard time understanding why my computer slows down so much every time the inactive ram skyrockets :p but thanks anyways :)
 

maflynn

macrumors Haswell
May 3, 2009
73,470
43,394
Your page-outs are only 72mb - that's wicked low. Page outs occur when ram is running low and it needs to write some of the pages to the swap file. Since its low you're not really running short on ram
 

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
okay thanks... must be something else going on then since it happens every single time... alright well back to the drawing board lol
 

Blondie :)

macrumors 6502a
May 12, 2010
698
3
Prescott, AZ
10.00 GB is a huge inactive file though. Personally, I don't like inactive RAM that much. In order to free up inactive RAM, you can go into terminal and type purge into the command window. I feel that it helps me quite a bit, as I open different apps all of the time, not the same ones.
 

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
10.00 GB is a huge inactive file though. Personally, I don't like inactive RAM that much. In order to free up inactive RAM, you can go into terminal and type purge into the command window. I feel that it helps me quite a bit, as I open different apps all of the time, not the same ones.

yep :) that's what I've been relying on lately. It's getting me by, it's just annoying because I can't imagine what would need that much reserve ram. This never even happened back when I was using photoshop or games or anything like that on a regular basis, just internet and movies mostly :p
 

Blondie :)

macrumors 6502a
May 12, 2010
698
3
Prescott, AZ
Well, you'll get inactive RAM whenever you close a program. If you leave your computer on for a very long time without a full shutdown, the closed programs and inactive RAM definitely add up over time. I currently have 500 MB of inactive RAM and my computer has been up for 4 days. Only quite iPhoto once I think. Personally, I'm not too big of a fan of Apple's memory usage algorithm, but I guess there's not a whole lot I can do about it.
 

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
Well, you'll get inactive RAM whenever you close a program. If you leave your computer on for a very long time without a full shutdown, the closed programs and inactive RAM definitely add up over time. I currently have 500 MB of inactive RAM and my computer has been up for 4 days. Only quite iPhoto once I think. Personally, I'm not too big of a fan of Apple's memory usage algorithm, but I guess there's not a whole lot I can do about it.

thanks :) yeah that all makes sense :) but this is approx. 10GB of buildup over the span of a few hours from a previous restart :p seems a little excessive to me lol especially when I never had to restart my computer for anything except when I was installing new updates :p
 

Blondie :)

macrumors 6502a
May 12, 2010
698
3
Prescott, AZ
thanks :) yeah that all makes sense :) but this is approx. 10GB of buildup over the span of a few hours from a previous restart :p seems a little excessive to me lol especially when I never had to restart my computer for anything except when I was installing new updates :p

If you have 10.00 GB of swap built up over a few hours that seems a little excessive. Sounds like something is eating way more RAM than it should. I checked through your activity monitor picture you posted, but nothing seems to be the culprit there. Something definitely sounds wrong though.

Are you using Mountain Lion or Lion as your OS X version?
 

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
If you have 10.00 GB of swap built up over a few hours that seems a little excessive. Sounds like something is eating way more RAM than it should. I checked through your activity monitor picture you posted, but nothing seems to be the culprit there. Something definitely sounds wrong though.

Are you using Mountain Lion or Lion as your OS X version?

that's the thing that gets me though, there is no swap or page outs used. It's all 10 GB of inactive use, but the second the available free ram drops to around 100mb or less it's as if the inactive ram isn't being allocated to free ram because it starts shutting down to extremely slow levels and pages become jerky and takes forever to render and things like that. So I understand that my inactive ram shouldn't be a problem, but it's almost as if it's not being transferred to active when it's needed, or something like that :p
 

NewishMacGuy

macrumors 6502a
Aug 2, 2007
636
0
Your page-outs are only 72mb - that's wicked low. Page outs occur when ram is running low and it needs to write some of the pages to the swap file. Since its low you're not really running short on ram

Your pageouts are low, but with 16GB on light usage to moderate usage, they should be 0.

How long had you been up and running when that screenshot was taken? A few hours right? Something is wrong.

Some browsers are known for poor memory management (Safari). I don't use Chrome so I couldn't say for sure, but it seems weird that it's got so many line items on AM. Firefox and Safari have 2 at the most and while Safari has been known to consume/leak gigabytes, Firefox rarely exceeds 500MB.

You can get Free Memory (in the App Store) to auto-purge for you once you hit a defined lower limit of free memory. I used to use it religiously before I upgraded to 16GB. Haven't needed it since then though.


___
 

throAU

macrumors G3
Feb 13, 2012
8,818
6,985
Perth, Western Australia
Inactive RAM = "free" RAM that OS X is keeping the previous contents of until it needs to be properly freed, in case it is needed again.


All you're doing with "purge" is forcing the issue, and eliminating the operating system's chance of being able to have something already in memory when you try to open something you opened before.

Page-outs can happen pro-actively when you still have free RAM, if an app (or part of it) has been inactive for a while.

Page-outs are also likely to be cached in "inactive" memory. The reason for this is that the OS can pro-actively page out BEFORE ram is needed for something else, rather than have to spend time paging stuff out before giving you memory when you need it (slowing things down). If the RAM is paged, but cached in "inactive", the "inactive" ram is just cleared and the page-out is already on disk.

So, if you have an app that has been paged out and then needs to be paged in, there's a chance it is already paged in, and stored in "inactive" memory, if the memory hadn't yet been needed for something else.

If you had run PURGE, it would need to be re-read from disk.


Short story: memory management is a lot more complex than "used" or "not used", and ram that is "not used" in any way is wasted and not pulling its weight.

Lion perhaps paged a little too aggressively prior to 10.7.4 - possibly because it expected to be run from SSD. Mountain Lion (and 10.7.4) is a lot better in that regard. It's a balancing act between keeping things in RAM "active" and paging them out and keeping them cached or paging them out so the RAM can be used to cache other "hot" data on disk. Original release of Lion got it wrong.
 
Last edited:

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
Your pageouts are low, but with 16GB on light usage to moderate usage, they should be 0.

How long had you been up and running when that screenshot was taken? A few hours right? Something is wrong.

Some browsers are known for poor memory management (Safari). I don't use Chrome so I couldn't say for sure, but it seems weird that it's got so many line items on AM. Firefox and Safari have 2 at the most and while Safari has been known to consume/leak gigabytes, Firefox rarely exceeds 500MB.

You can get Free Memory (in the App Store) to auto-purge for you once you hit a defined lower limit of free memory. I used to use it religiously before I upgraded to 16GB. Haven't needed it since then though.


___

yeah a few hours and I did a purge and restart after that post and as of now it's back up to 7.5 gb inactive. It's still running fine because I still have about 4 gb free and no page outs at the moment but once that runs low again I will see what happens.

Edit: Not even watching video or anything and stopped using Chrome for awhile to see what happens. Only using firefox and already down to 3.7 free memory and 7.76 in inactive.

----------

Inactive RAM = "free" RAM that OS X is keeping the previous contents of until it needs to be properly freed, in case it is needed again.


All you're doing with "purge" is forcing the issue, and eliminating the operating system's chance of being able to have something already in memory when you try to open something you opened before.

Page-outs can happen pro-actively when you still have free RAM, if an app (or part of it) has been inactive for a while.

Page-outs are also likely to be cached in "inactive" memory. The reason for this is that the OS can pro-actively page out BEFORE ram is needed for something else, rather than have to spend time paging stuff out before giving you memory when you need it (slowing things down). If the RAM is paged, but cached in "inactive", the "inactive" ram is just cleared and the page-out is already on disk.

So, if you have an app that has been paged out and then needs to be paged in, there's a chance it is already paged in, and stored in "inactive" memory, if the memory hadn't yet been needed for something else.

If you had run PURGE, it would need to be re-read from disk.


Short story: memory management is a lot more complex than "used" or "not used", and ram that is "not used" in any way is wasted and not pulling its weight.

Lion perhaps paged a little too aggressively prior to 10.7.4 - possibly because it expected to be run from SSD. Mountain Lion (and 10.7.4) is a lot better in that regard.

thanks :) again though, I would love to be able to just let OS X do it on its own. But as I've said a couple of times, once my free memory gets low, the multiple GB of inactive memory doesn't seem to move or help in anyway. Once I'm out of free memory my computer just shuts down to crawling levels and starts getting all jerky and stutters etc. until I purge and/or restart. I know the system should be cleaning up the inactive memory on its own when needed, but for some reason that I can't figure out, it does not seem to be doing so.
 

throAU

macrumors G3
Feb 13, 2012
8,818
6,985
Perth, Western Australia
I do not see the behaviour you describe. I do not use Chrome (Safari or Opera). Try a different browser?

It's possible Chrome is being too aggressive trying to maintain its own cache, which is preventing OS X from having the memory available for other things...

I do not need to run purge, even after running games through steam (borderlands 2), virtual machines in Fusion, etc. I've only got 8gb and no SSD....
 

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
I do not see the behaviour you describe. I do not use Chrome (Safari or Opera). Try a different browser?

It's possible Chrome is being too aggressive trying to maintain its own cache, which is preventing OS X from having the memory available for other things...

I do not need to run purge, even after running games through steam, virtual machines in Fusion, etc. I've only got 8gb and no SSD....

I thought chrome would have been the culprit because I've heard it eats ram sometimes, but I've shut chrome down most of the day and am only using firefox for the last few hours. No games, no movies since my last purge and restart and it still seems to be climbing steadily...
 

throAU

macrumors G3
Feb 13, 2012
8,818
6,985
Perth, Western Australia
Inactive RAM will continue to climb irrespective of what you do, as it will be caching things you access on disk (run a virus scanner's "full scan" for example and watch it blow out).

Free RAM is wasted RAM. If the RAM isn't needed for an active application, OS X (and most other Unix variants) will use RAM for cache.
 

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
Inactive RAM will continue to climb irrespective of what you do, as it will be caching things you access on disk (run a virus scanner's "full scan" for example and watch it blow out).

Free RAM is wasted RAM. If the RAM isn't needed for an active application, OS X (and most other Unix variants) will use RAM for cache.

thanks :) I understand, but regardless of the logic of what should happen, I'm just saying, once that inactive ram gets up to about 11-12gb or so (which it will shortly probably since it's at 8.4 and still moving) my computer is likely to slow to a crawl once and become basically unusable until I purge and/or restart. Yes I know inactive ram will climb. But what am I accessing that is making it put so much in reserve? I have 3 firefox windows open. no games or videos have been run for a long time now. For having a 16gb system I wouldn't think using email and 3 tabs would have much to cache in reserve in inactive ram. :/
 

throAU

macrumors G3
Feb 13, 2012
8,818
6,985
Perth, Western Australia
thanks :) I understand, but regardless of the logic of what should happen, I'm just saying, once that inactive ram gets up to about 11-12gb or so (which it will shortly probably since it's at 8.4 and still moving) my computer is likely to slow to a crawl once and become basically unusable until I purge and/or restart. Yes I know inactive ram will climb. But what am I accessing that is making it put so much in reserve? I have 3 firefox windows open. no games or videos have been run for a long time now. For having a 16gb system I wouldn't think using email and 3 tabs would have much to cache in reserve in inactive ram. :/

Oh I get it - but I suspect it is an application issue - an app is either leaking memory or attempting to maintain its own cache rather than relying on the OS to do it (this is one thing Firefox has done in the past)...

Do you have a virus scanner? My machine won't even fill 7gb of RAM (WAY less) doing a web browser and an email client for hours so I'm a bit surprised that you're seeing that sort of performance problem with that sort of usage...

And to confirm - you're on Mountain Lion?


edit:
Also - javascript can cause memory to be consumed quite a lot depending on the page. Previous version of Safari (5.x) used to leak memory like a sieve if you left it with facebook open...
 

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
Oh I get it - but I suspect it is an application issue - an app is either leaking memory or attempting to maintain its own cache rather than relying on the OS to do it (this is one thing Firefox has done in the past)...

I did notice that my utorrent was still open and working on a much heavier transfer load than I've ever had working before. So I closed that out to see if that makes any difference.

Do you have a virus scanner? My machine won't even fill 7gb of RAM (WAY less) doing a web browser and an email client for hours so I'm a bit surprised that you're seeing that sort of performance problem with that sort of usage...

I probably should :p but no I only have a virus scanner at the moment on my windows partition.

And to confirm - you're on Mountain Lion?

yep :) 10.8.2 I closed out my utorrent. I've used it regularly since I got the computer, but have never run as large file size tranfers as I have the last couple of days. That's the only thing that is different with my usage since I got the computer so I'll monitor everything and see what happens. thanks again

----------

edit:
Also - javascript can cause memory to be consumed quite a lot depending on the page. Previous version of Safari (5.x) used to leak memory like a sieve if you left it with facebook open...

hmm I hadn't considered that. I have menutab pro that runs facebook whenever I click on it. But I've had that going since I got the computer last August and haven't had any problems until the last couple days.
 

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
alright so I think I narrowed it down to my utorrent downloads. I closed that out and reopened all my usual chrome windows, ran youtube and itunes and some other things all at the same time and it stayed down around 600MB of inactive ram the whole time and I had no problems and the second I fired utorrent back up it started to climb again.

anyways, thanks for all the help and I'll be back if this wasn't it, but I think I got it worked out.
 

fryc86

macrumors member
Original poster
Mar 1, 2011
46
0
yeah it makes sense and I should have thought of it earlier, I just didn't consider it since I use it on and off pretty much all the time and it never was a problem like this, but at least I figured it out :p
 

throAU

macrumors G3
Feb 13, 2012
8,818
6,985
Perth, Western Australia
alright so I think I narrowed it down to my utorrent downloads. I closed that out and reopened all my usual chrome windows, ran youtube and itunes and some other things all at the same time and it stayed down around 600MB of inactive ram the whole time and I had no problems and the second I fired utorrent back up it started to climb again.

anyways, thanks for all the help and I'll be back if this wasn't it, but I think I got it worked out.

I highly recommend "transmission" as a torrent client.

From what you're saying, uTorrent may be trying to cache things (your torrent) too aggressively.... Which makes sense from its point of view actually as it may need the blocks the file(s) are made up of to serve to other users due to the way torrents work...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.