Programs to reclaim lost RAM without rebooting?

goodcow

macrumors 6502a
Original poster
Aug 4, 2007
620
298
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?
 

Nugget

macrumors 68000
Nov 24, 2002
1,747
586
Houston Texas USA
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.
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.
 

goodcow

macrumors 6502a
Original poster
Aug 4, 2007
620
298
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.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,360
701
Yes, I had a basic working knowledge of how OS X manages memory before posting.
If you did, you would know that free memory alone is not an indicator of what memory is available, as Nugget described.
 

goodcow

macrumors 6502a
Original poster
Aug 4, 2007
620
298
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.
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?
 

Nugget

macrumors 68000
Nov 24, 2002
1,747
586
Houston Texas USA
It seems as is whenever I go home at night and lock the machine (because it's doing stuff in the background)...
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.

...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.
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.
 

goodcow

macrumors 6502a
Original poster
Aug 4, 2007
620
298
If you did, you would know that free memory alone is not an indicator of what memory is available, as Nugget described.
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.
 

goodcow

macrumors 6502a
Original poster
Aug 4, 2007
620
298
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.
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.
 

Nugget

macrumors 68000
Nov 24, 2002
1,747
586
Houston Texas USA
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.
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.
 

Soundhound

macrumors 6502a
Mar 29, 2006
604
1
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!
 

GGJstudios

macrumors Westmere
May 16, 2008
44,360
701
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!
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.
 

Soundhound

macrumors 6502a
Mar 29, 2006
604
1
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.

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.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,360
701
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.
What makes you think you're running out of RAM? What are you looking at that leads you to believe that?
 

Soundhound

macrumors 6502a
Mar 29, 2006
604
1
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....


What makes you think you're running out of RAM? What are you looking at that leads you to believe that?
 

GGJstudios

macrumors Westmere
May 16, 2008
44,360
701
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....
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.
 

JavierP

macrumors regular
Mar 17, 2008
134
0
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....
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.
 

Soundhound

macrumors 6502a
Mar 29, 2006
604
1
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...
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.
 

JavierP

macrumors regular
Mar 17, 2008
134
0
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...
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?
 

Soundhound

macrumors 6502a
Mar 29, 2006
604
1
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.

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?
 

JavierP

macrumors regular
Mar 17, 2008
134
0
I understand that you don't want to tweak your system. Never used Logic, so I cannot help you there.