Programs to reclaim lost RAM without rebooting?

Discussion in 'macOS' started by goodcow, Feb 19, 2010.

  1. goodcow macrumors 6502a

    Joined:
    Aug 4, 2007
    #1
    I have a MacPro 3,1 here at work and it basically stays on 24/7. I notice that every few days however, I have to reboot the machine to get back memory and make things run smoothly again, because the "free" amount on Activity Monitor will be under 100MB, and they'll be a bunch of page-ins and page-outs.

    I have 12GB of RAM in here and there's nothing special on this machine, just Final Cut Studio and VMWare Fusion, but again, every few days it starts to run like garbage until I reboot and sweep all the RAM clean. Most of it stays under the inactive section (3-5GB), but just trying to do things like load the VM again is painfully slow.

    Suggestions?
     
  2. Nugget macrumors 68000

    Nugget

    Joined:
    Nov 24, 2002
    Location:
    Houston Texas USA
    #3
    You're right that page-ins and page-outs are an indicator that there's some memory weirdness occurring. Free and Inactive memory, though, are functionally equivalent and you can't rely on the reported "Free" memory to learn anything. An app can just as easily grab "inactive" memory as it can grab "free" memory when it needs to allocate more.

    Most likely you have some application or service that's leaking memory and the solution will involve isolating whichever process is leaking. Keep an eye on the "Real Mem" column in the Activity Monitor process list and see if there's anything suspicious bubbling up to the top over time. Mail.app and Safari are common culprits here.
     
  3. goodcow thread starter macrumors 6502a

    Joined:
    Aug 4, 2007
    #4
    Yes, I had a basic working knowledge of how OS X manages memory before posting.

    If I boot my system with 12GB of RAM, start doing things throughout the day in Final Cut Pro, Handbrake, VMWare Fusion etc. the free amount obviously goes down, however things remain smooth between programs.

    It seems as is whenever I go home at night and lock the machine (because it's doing stuff in the background), then come back in the morning, my free memory will be 100MB or under and even if I kill programs like the VM, it doesn't go up. And then if I relaunch the VM or just try to do other things, the system will be slow and run like garbage until I reboot and it totally flushes the memory. It shouldn't be doing this on a MacPro.
     
  4. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #5
    If you did, you would know that free memory alone is not an indicator of what memory is available, as Nugget described.
     
  5. goodcow thread starter macrumors 6502a

    Joined:
    Aug 4, 2007
    #6
    The amount of memory being used in the "real" column never really adds up to anything close to 12GB though, so I don't know what's grabbing a third of my memory in the inactive space and why it won't give that back.

    This morning I came in and kernel_task was gobbling 600MB of real memory. Right now it's still using 528MB, though I am copying about 2TB of files from a SAN to a DroboPro, but maybe that's just Finder being a piece of crap at any kind of actual file management operations?
     
  6. Nugget macrumors 68000

    Nugget

    Joined:
    Nov 24, 2002
    Location:
    Houston Texas USA
    #7
    What screen saver do you use? I had real problems on one machine with the iPhoto slideshow screen saver leaking memory and causing everything to get swapped out over night. I changed to the boring "machine name" saver and the problem completely disappeared.

    That's normal. It's not expected that free memory will ever go up. Deallocated RAM goes into the Inactive pool, not the Free pool, until some other app claims it.
     
  7. goodcow thread starter macrumors 6502a

    Joined:
    Aug 4, 2007
    #8
    Yes, but then explain why I come back in the morning and have 4GB of RAM being used in the inactive space, noticeable slowdown where it takes 5-10 seconds just to open a new tab in IE in my Vista VM and page-ins and page-outs.
     
  8. goodcow thread starter macrumors 6502a

    Joined:
    Aug 4, 2007
    #9
    No screen saver, I go home and just lock it at the login screen for the night. Come back and it runs like crap until I reboot.
     
  9. Nugget macrumors 68000

    Nugget

    Joined:
    Nov 24, 2002
    Location:
    Houston Texas USA
    #10
    Nobody is saying you aren't having a problem -- clearly you are. It's just worth mentioning that there's no value in focusing on the reported free memory. That value just does not have the significance you think it does. It's just distracting you from figuring out what the actual problem is.
     
  10. Soundhound macrumors 6502a

    Joined:
    Mar 29, 2006
    #11
    I wanted to revive this thread. I'm interested in this as well. Does anyone know of a program that frees up unused RAM? I'm pushing my iMac to the limit and have to reboot now and then to free up ram. Thanks!
     
  11. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #12
    You don't need such an app, and you don't need to reboot to free up RAM in Mac OS X. It does it automatically, unlike Windows. Read the link I provided in post #2 in this thread.
     
  12. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #13
    Here's an odd tip..

    sudo du -h -d1 /

    And watch your "Free" memory appear.
     
  13. Soundhound macrumors 6502a

    Joined:
    Mar 29, 2006
    #14
    If it does it automatically, then why do I run out of RAM, and then after rebooting, I have enough RAM? Doesn't make sense. There must be a way to deal with this without rebooting.

     
  14. Soundhound macrumors 6502a

    Joined:
    Mar 29, 2006
    #15
    ???

     
  15. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #16
    What makes you think you're running out of RAM? What are you looking at that leads you to believe that?
     
  16. Soundhound macrumors 6502a

    Joined:
    Mar 29, 2006
    #17
    Logic tells me so! A warning comes up saying it's running out of RAM. This is apparently how it works in Logic (I've been on a few Logic forums recently, and they all refer to it). In addition, I have a widget called iStat, and in that I can see when the RAM is getting low (under 500 megs, then 300, when it gets in that area, I know I'll be getting a message soon...

    I'm keeping other programs to the bare minimum, watching everything carefully, but it occured to me that there must be a utility out there that frees up unused RAM....


     
  17. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #18
    Launch Activity Monitor and post a screen shot of the System Memory tab at the bottom of the window. That will tell you more than any single app or widget can.
     
  18. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #19
    Open Terminal, paste that in, enter your admin password, and watch the Free memory repopulate in the Activity Monitor.
     
  19. JavierP macrumors regular

    Joined:
    Mar 17, 2008
    #20
    Buy more RAM or reduce the amount of disk cached in RAM. If Logic leaks memory, neither of the 2 options will work. You will have to close and reopen Logic every now and then. Do it before it makes the OS page RAM data to disk.
     
  20. Soundhound macrumors 6502a

    Joined:
    Mar 29, 2006
    #21
    I've maxed out the ram for myy iMac. I wAs hoping to avoid havng to buy a new one! Money is very tight these days...
     
  21. JavierP macrumors regular

    Joined:
    Mar 17, 2008
    #22
    How much RAM is that? The amount of RAM used for disk cache is proportional to the total installed RAM. You could try to reduce the disk cache, if you have a fast disk you will not take a large performance hit. Thay way you will have more RAM for apps and less RAM for kernel disk cache.

    Run this from terminal:

    sudo sysctl kern.maxvnodes

    and post the number the command returns

    Are you using VM Ware fusion?
     
  22. Soundhound macrumors 6502a

    Joined:
    Mar 29, 2006
    #23
    Thank you so much for the helpful suggestions Javier, but I'm really not any good, at all, with stuff like using the terminal. I've never used it, and I'm sure I would just make a hash out of it. If that's the only way to get more out of my ram, I'm going to have to get a new imac I'm afraid. :(

    I have 3 gigs of RAM. I'm not sure what is used for disk cache (or what that is) but I'll look it up in the Logic information, and maybe that's something I can adjust? Performance is critical, since writing music is a real time process, and requires good performance to keep up.

     
  23. mabaker macrumors 65816

    mabaker

    Joined:
    Jan 19, 2008
    #24
    Could you post your RAM stats? How much of it is INACTIVE ram?
     
  24. JavierP macrumors regular

    Joined:
    Mar 17, 2008
    #25
    I understand that you don't want to tweak your system. Never used Logic, so I cannot help you there.
     

Share This Page