Is Inactive Memory Freeing in Lion or has the same problem as SL?

Discussion in 'Mac OS X Lion (10.7)' started by saulmr, Jul 21, 2011.

  1. saulmr macrumors newbie

    Jul 21, 2011
    I have a 6,1 White iMac :apple: with 2x2GB RAM Modules installed.

    As soon as I start giving the computer a heavy workload (Large Images in PS CS3, Picasa, Firefox and iTunes open at the same time) I see the Free memory reduced and Inactive Memory never freed, and I have to apply the "Repair Permission" trick to free the inactive memory.

    Will moving up to Lion fix this memory leak or am I to see this issue in Lion too. Unfortunately adding more RAM is not an option at this time, as the White iMac is topped out at 3GB.

    What's you experience so far?
  2. SandboxGeneral Moderator emeritus


    Sep 8, 2010
    It's been working fine for me on SL before and so far on Lion. when inactive RAM is needed, it gets freed.
  3. seepel macrumors 6502


    Dec 22, 2009
    I'm just going to go ahead and give my spiel on memory in case you're not aware, and if you are feel free to skip the next paragraph.

    Inactive memory is memory that was in use and is no longer in use. If no other application needs more memory then it will just stay there so that if it is needed again it is ready and available quickly (free memory is wasted memory). What you want to look at is your page ins vs page outs. I can't remember the exact magic number but when page outs starts to be about 20% of your page ins that's where you start to lose performance (this is called swapping). A page in is when memory is written to disk, and a page out is when memory is read from disk and put back into active memory. This swapping is what will cause poor performance.

    So are you saying that you are seeing a lot of swapping with a lot of inactive memory? I haven't experienced this.
  4. Branskins macrumors 65816

    Dec 8, 2008
    You mixed these two up! A page in is when a page is written from the disk into RAM. A page out is when you write a page from memory onto the disk. Paging out is a performance hit because it is a lot slower to transfer things to and from the disk.

    When your page outs get high it means you are writing more and more to disk because you do not have enough memory to keep them in RAM.
  5. seepel macrumors 6502


    Dec 22, 2009
    Doh! This is what I get for trolling MacRumors after the bar... Sorry! My point still stands though...
  6. MacManiac76 macrumors 65816


    Apr 21, 2007
    White Mntns, Arizona
    I always found it annoying that it used the swap file when I had 1+ GB of free RAM and 500-1000 MB of inactive RAM while in Snow Leopard. Lion seems to at least free up the inactive RAM better, but the problem of unnecessarily using the swap file still exists.
  7. phobox macrumors member

    Dec 25, 2007
    Ive only had Lion installed for a day or so, however I have noticed improved memory management already with the same or similar workload that I placed on Snow Leopard. Lion certainly seems better at freeing up the unused inactive memory and thus speeding up the general running of the system (less swap usage). I'll have to do a bit more testing first, its too early to bring any firm conclusions, but so far so good :)
  8. Branskins macrumors 65816

    Dec 8, 2008
    Don't some things always use the swap file? I've had a few GB free once and my swap went up because of something Starcraft II was doing.

    I could be completely wrong but I think there is more going on than we think!
  9. saulmr thread starter macrumors newbie

    Jul 21, 2011
    Hearing that Lion has better memory management than Snow Leopard is good news!

    Whenever I start getting the workload up on my machine, specially when PS CS3 and Firefox are open, I notice a huge amount of swapping after a while of opening and closing files in CS3, even when Inactive Memory is available. I can have around 1GB of inactive Memory but only 20MB of free memory and instead of releasing inactive memory, SL gets into an unusable state because of the swapping until inactive memory is released.

    I had read this was a common issue with SL, your free memory starts to get used up while inactive memory was is not released. Swapping starts to take place instead of using inactive memory. The known workaround for this is to launch disk utility an repair permissions, this gets the inactive memory released.

    If in your experience Lion is freeing up memory resources more efficiently, it's time to get started with a download today then and give it a try! :D
  10. saulmr thread starter macrumors newbie

    Jul 21, 2011

    Update on my questions: :D:D I installed Lion and I am amazed! The tasks that brought my machine to it's knees due to pagination and unreleased inactive memory in SL are gone in Lion!!!!

    This update injected new life into my machine! If you were experiencing the same problems I was, it may be very well worth it to give Lion a try.
  11. svkrzn macrumors regular

    Dec 8, 2009
    Are there other modes to free inactive memory? I mean, i used photoshop and aperture once, closed them and they both are using about 4gb of my ram inside inactive memory. I have 8GB, 20mb free, 120mb of swap memory and 3,75mb of inactive memory that can't be used! That's absurd!
  12. andymodem macrumors 6502a

    Nov 20, 2008
    Baltimore, MD
    1.6GB of inactive memory, yet I have 6GB of page outs. :rolleyes:

  13. Chasel macrumors newbie

    Nov 1, 2010
    Launch a different app it will get freed up when you need the extra memory.
  14. tkermit macrumors 68040


    Feb 20, 2004
    So what? You're currently using not even 7MB of swap space.
  15. MrKistic macrumors newbie

    Dec 18, 2011
    tkermit, look at the ratio of page outs to ins. That's not a healthy situation.

    andymodem and svkrzn, I've been struggling with the same problem for months and also been scouring forums trying to find solutions. I've got a mid 2009 MacBook Pro with 8GB RAM. No problem at all in SL, but only problems since the Lion upgrade. What I've found is many, many people telling us that's how it's meant to be and that the inactive memory is meant to be there and it will get used when it needs to be and what do you know about computers anyway?!?

    The thing is the inactive memory was *not* getting reused as required, it stayed there to the point where there was no free memory and the system paged itself silly. I've upgraded all my apps, turned extensions on and off, done everything recommended by everyone and no good. I had to resort to issuing `purge` commands in the terminal to get my system back on a regular basis.

    Until today. I forced Lion to run in 32 bit mode only. And now it's been up for 6 hours, I have Chrome open with a squillion tabs, I'm running Parallels, Eclipse, Pathfinder, Thunderbird, everything that was *killing* it before, and I now have 2 GB free memory and not a single page out. Not one.

    For mine, that's a serious (and stupid) problem. Why default to 64 bit mode if it's not gonna work on my hardware? This has cost me soooo much time lately it's ridiculous.
  16. KnightWRX macrumors Pentium


    Jan 28, 2009
    Quebec, Canada
    How is it not ? Those stats are cumulative. We can't know what exactly went on with the whole memory situtation since his last reboot from 1 screen grab of activity monitor. If you pretend you can, you sir don't understand the concepts of memory management.
  17. Delegator macrumors member

    Feb 13, 2008
    Every time somebody brings up the question of Inactive Memory and performance problems, people jump all over them and quote the information about inactive memory getting freed up when needed.

    Well, I and many others can say, "Hogwash" to that. There are plenty of people who can find their system practically locked up (beachball for 5+ seconds at a time when switching windows, significant input lag, etc) only to be able to fix it with a nice colonic "purge" command. The fact is that when my system's free memory gets down around 25MB and I'm sitting on 1.5GB of inactive memory, performance sucks.

    So, I'm glad to hear, even anecdotally, that this works better in Lion. I'm hoping to see more such reports like that, because I'm guessing that Apple won't talk about improvements in this area because they always claimed that the inactive memory management worked fine before.
  18. Mr. Retrofire macrumors 603

    Mr. Retrofire

    Mar 2, 2010
    I think the better memory performance inside of Lion has two reasons:
    1. Better memory management by the OS kernel.
    2. Better memory management inside of application frameworks, such as WebKit2 and Cocoa.

    Safari >= v5.1 on Snow Leopard makes my machine (17", 8 GB, SB-MBP) also a bit faster, because it uses WebKit2. Older versions of Safari can slow down an entire system. This was a problem in Mac OS X 10.3.x, 10.4.x, 10.5.x and 10.6.x.
  19. egremyl macrumors newbie

    Mar 2, 2012

Share This Page