Stop using RAM Cleaners

Why Does a Process Refuse to Relinquish RAM?

Virtual memory ‘trimmers’ or RAM ‘cleaners’, whatever you want to call them, they’ve been a staple in the industry since the days of NT4. Almost all of these apps are best avoided! Most operate on the incorrect premise that you want more ‘free’ RAM. In fact, RAM should be as occupied as possible with commonly accessed virtual memory and file system caches. This is because it is the fastest storage medium on your computer.

After numerous requests, we added SmartTrim to Process Lasso to selectively trim processes when virtual memory use exceeds a threshold. We did this only because it was so much safer and smarter than other tools on the market that blindly whacked every process on the system. Some didn’t even do that right, they would allocate all the memory they could until they failed, then release it. Ugh. There is an API to do it the proper way.

But then the question: Why won’t a process RAM use go below x MB? Here is why: That process is actively using that virtual memory. That means as soon as it is paged out by a ‘trim’, the process attempts to access the memory, incurring a page fault, resulting in the memory getting paged right back into RAM. Continuing to trim the process at that frequency will only serve to reduce performance.

In the end, what you want is frequently referenced memory in RAM and infrequently referenced memory in the page file. That is what Windows tries to do for you. It isn’t perfect, but neither is manual intervention.