Ripcord
Senior Lurker
So I've been concerned about Mac memory management for a while.
I've had 4GB of RAM on a number of different systems with 10.5-10.7. I have 8GB at work.
I'm constantly running out of memory and paging, though. It seems like Mac OS X doesn't release memory once used. For example, if I:
1) Start with 3GB of RAM free
2) Start Chrome and a bunch of tabs
3) Start iPhoto (with my massive massive library)
4) Start VMware and start a virtual machine
I can pretty quickly run the amount of "Free" memory reported by Activity Monitor down to zero.
Now, I close iPhoto.
I close VMWare.
This marks about 1GB as free. Only 1GB. I end up with 1.82GB of "wired" memory. Some of it is marked as Inactive Memory - 700MB in the test I just did.
According to http://support.apple.com/kb/ht1342:
"This information in memory is not actively being used, but was recently used.
For example, if you've been using Mail and then quit it, the RAM that Mail was using is marked as Inactive memory. This Inactive memory is available for use by another application, just like Free memory. However, if you open Mail before its Inactive memory is used by a different application, Mail will open quicker because its Inactive memory is converted to Active memory, instead of loading Mail from the slower hard disk."
Based on this, I assume applications should be able to use this Inactive memory even if they previously didn't own it.
Now I start up some other things, like iTunes and Firefox. The free memory goes away. Once it does, I start swapping to disk - Page Outs start rising and "Swap used" increases depending on what all I load. *Inactive memory never drops*.
My concern here is that after the system boots, I can generally keep about 3GB of Active Memory. That's 3GB for my apps to play with. After using the system for a while, the amount of Active+Free memory is rarely over 1.5GB, no matter how many apps I quit, and I seem to swap a whole lot more. It seems directly related to having opened and quit other apps in the meantime
Or to put it another way, here's a test:
1) Open Chrome and do things in a bunch of tabs. No Swap used, speed is nice and fast.
2) Close Chrome
3) Do a bunch of other things with the system. Open a bunch of apps and close them.
4) Quit all apps
5) Open iPhoto, which uses 1GB of real memory. Lots of swap used, speed is slow because I'm paging out all over the place.
I have 4GB of RAM, so even if some memory is permanently reserved in step #3 for some reason, I should have plenty of memory with no apps open to use an app that reserves 1GB of Real Memory, I'd think???
I have this general problem on all my systems. Same with my system with 8GB - after using the system for a while I start swapping out all over the place even with a few apps open that use only 8GB of Real Memory.
Plus, why am I swapping out when I have 730MB of inactive memory??
Anyone looked close into this kind of thing?
I've had 4GB of RAM on a number of different systems with 10.5-10.7. I have 8GB at work.
I'm constantly running out of memory and paging, though. It seems like Mac OS X doesn't release memory once used. For example, if I:
1) Start with 3GB of RAM free
2) Start Chrome and a bunch of tabs
3) Start iPhoto (with my massive massive library)
4) Start VMware and start a virtual machine
I can pretty quickly run the amount of "Free" memory reported by Activity Monitor down to zero.
Now, I close iPhoto.
I close VMWare.
This marks about 1GB as free. Only 1GB. I end up with 1.82GB of "wired" memory. Some of it is marked as Inactive Memory - 700MB in the test I just did.
According to http://support.apple.com/kb/ht1342:
"This information in memory is not actively being used, but was recently used.
For example, if you've been using Mail and then quit it, the RAM that Mail was using is marked as Inactive memory. This Inactive memory is available for use by another application, just like Free memory. However, if you open Mail before its Inactive memory is used by a different application, Mail will open quicker because its Inactive memory is converted to Active memory, instead of loading Mail from the slower hard disk."
Based on this, I assume applications should be able to use this Inactive memory even if they previously didn't own it.
Now I start up some other things, like iTunes and Firefox. The free memory goes away. Once it does, I start swapping to disk - Page Outs start rising and "Swap used" increases depending on what all I load. *Inactive memory never drops*.
My concern here is that after the system boots, I can generally keep about 3GB of Active Memory. That's 3GB for my apps to play with. After using the system for a while, the amount of Active+Free memory is rarely over 1.5GB, no matter how many apps I quit, and I seem to swap a whole lot more. It seems directly related to having opened and quit other apps in the meantime
Or to put it another way, here's a test:
1) Open Chrome and do things in a bunch of tabs. No Swap used, speed is nice and fast.
2) Close Chrome
3) Do a bunch of other things with the system. Open a bunch of apps and close them.
4) Quit all apps
5) Open iPhoto, which uses 1GB of real memory. Lots of swap used, speed is slow because I'm paging out all over the place.
I have 4GB of RAM, so even if some memory is permanently reserved in step #3 for some reason, I should have plenty of memory with no apps open to use an app that reserves 1GB of Real Memory, I'd think???
I have this general problem on all my systems. Same with my system with 8GB - after using the system for a while I start swapping out all over the place even with a few apps open that use only 8GB of Real Memory.
Plus, why am I swapping out when I have 730MB of inactive memory??
Anyone looked close into this kind of thing?