Memory boosters, optimizers, and washers --- whatever the name, they all do mostly the same thing, free up physical RAM. They do this by forcing as much allocated physical RAM into the page file as possible. Does this make your computer run faster? The short answer is No. In fact, just the opposite is usually the case.
What virtual nemory is and how it works:
Modern operating systems use virtual memory. Virtual memory exists in both physical RAM and on disk in the page file(s). Windows applications do not have any concept of RAM, or how much free RAM is available. All they see is virtual memory, everything else is hidden. They don't know whether memory they've allocated is currently stored on disk or in RAM. When memory is accessed, it is moved to RAM if it is not already there. When RAM needs to be freed up, memory is moved to the disk.
Available virtual memory is limited only by the size of the page file(s) plus the size of RAM. In this way, the system can use gigabytes of memory even if the RAM is only a few hundred megabytes. Often, the page file is configured to dynamically grow when needed. In such cases, available virtual memory is only limited by the free space on the partition the page file(s) exists.
Virtual memory is organized in pages. A page is a block of a few kilobytes of memory. The process of moving a page of memory from RAM to the page file is calling 'paging out'. Conversely, the process of moving a page of memory from the page file to RAM is called 'paging in'.
Windows manages virtual memory so that commonly used pages are attempted to be kept in RAM and less commonly used pages are stored in the page file. In relative terms, the overhead of paging memory in and out is quite high. Therefore, it is important that the management of virtual memory be done in an efficient way.
How memory optimizers work:
Memory optimizers force all possible pages in RAM to the page file. Thus, the amount of free RAM is increased, but the amount of virtual memory in use is not affected. When the applications whose memory was paged out access that memory again it must be paged back into RAM, incurring substantial overhead.
The only benefit from these applications is that if you were to load a program immediately after you've paged out all available memory, it might load faster in some cases because pages of RAM are already available and don't need to be paged out in order to make room for the program. One way to look at this scenario is that the cost of freeing RAM is done before the program loads instead of as the program loads. However, this benefit is negligible and is more than paid for later when the RAM that was paged out is paged back in.
The memory that is paged out must be paged back in for you to use the other applications running on your computer. Thus, when you click on a minimized application, for example, it takes longer to restore its window because more of its memory must be paged in. Furthermore, pages that are used by the operating system components or background processes are often paged back in immediately after the memory 'cleanup'.
These memory optimization applications interfere with the ability of Windows to efficiently manage virtual memory. Furthermore, many of them don't even free RAM in a proper way. Often, they do so by simply allocating as much RAM as possible, forcing Windows to page out the memory of all other applications. The correct technique is to use the SetProcessWorkingSetSize API on each running process to force as much virtual memory to be paged out as possible.
These programs are ridiculously easy to write and sell. They usually don't live up to the claims they make. Savy users should beware these applications, and for that matter, any other software that makes outlandish claims.
Common Myths:
There are many misconceptions propogated by the authors of these applications and adopted by users who don't know any better. Here are a few:
| Myth | Truth |
| Memory optimizers increase overall performance | False, as noted above in this article. They often decrease overall performance. Paging out all possible memory just forces it to be reloaded once it is needed again. |
| Programs crash because of lack of physical memory (RAM). | Programs only have access to virtual memory (exists in RAM as well as page file). They don't actually ever directly allocate physical memory. A crash due to the inability to allocate virtual memory is extremely rare. Regardless, these applications do not increase the amount of free virtual memory and therefore have no impact on programs that crash as a result of the inability to allocate memory. |
| Unused DLLs are unloaded | This is simply false. When a program terminates, all DLLs it used are unmapped (as is its entire process space). Upon program crash, these DLLs may not be notified the program is closing, but they will still be deallocated from the crashed program's address space. A shared DLL may still be in use by other programs and be mapped into their process spaces, but that has nothing to do with the issue. When a DLL is no longer mapped into any process space, it ceases to exist. DLLs can not exist by themselves in virtual memory. They must be mapped into some process space. |
| Other unused resources and memory are unloaded. | This is simply false too. Nothing is left in memory when a program crashes and these memory washers have no way of knowing what a currently running program needs and doesn't need. |
Summary:
It is best to leave the management of virtual memory to Windows and not take it into your own hands. Any benefit from these programs is an illusion and temporary. You incur the penalties of paging memory back in sooner or later, even if it appears that the program you run after the cleanup loads faster.
If you decide on using one of these programs because your needs do
actually warrant it, at least find one that pages out memory in a proper way
(SetProcessWorkingSetSize API) instead of allocating gobs of memory to itself. I do not know which of these
applications do it properly and which don't, but the less gimicky they look,
the better they probably are. An application like this written by a
professional at least stands a better chance of performing its tasks in an
optimal way and causing less performance degradation.
Jeremy Collake
Bitsum Technologies
http://www.bitsum.com