Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am sure Apple engineers have thought of and decided not to do it -- if from the Activity Monitor, I see out of the 4GB of total RAM, 1GB is not active, and the Mac has been idle for 1 or 2 hours, then if I start a new app, it is still very slow due to "not enough RAM" -- looks like the Mac is swapping things out to the pagefile so that the new app can run in the RAM space.

But if the Mac has been idle for 1, 2, or even 8 hours, why doesn't Mac OS X swap the inactive RAM to the pagefile first, so that there is 1GB of free RAM, so that when a new app is started, it is very fast, just like there is extra RAM there free to use. Maybe it is so that the user knows the RAM is getting used up and we don't want the pagefile getting bigger and bigger and out of control? But why not limit the getting bigger and bigger just to about 6GB total, or 8GB, and then start not swapping the inactive RAM automatically? In other words, for the first 1GB or 2GB of inactive RAM, swap it to the pagefile, so that more RAM is ready for use immediately. Just don't do it all the time later on. Does someone know why that isn't done or how can it be made so? (by changing a System Preference?)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The system does not know which action will be the next. If instead of opening a new application after an hour you decide to work on some stuff that was cached (and is part of the inactive memory) it will be already there.

Instead of swapping out to free memory or emptying disk caches the system waits to see if you actually need the memory to avoid unnecessary work.

You can always force the disk caches to be flushed (freeing some memory) with the purge command.

share|improve this answer
    
you mean open up a Shell (Command Line) such as Bash and type purge? Can you choose to purge 500MB or everything? –  動靜能量 Apr 27 '12 at 0:30
    
by the way, I think there should be some threshold: if something was used for the last 8 hours, there probably is higher chance I will need the free RAM to open up something more than the thing I haven't touched for 8 hours. –  動靜能量 Apr 27 '12 at 0:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.