One more thing. A Windoz user cannot turn off the page file to defrag & then restart it?
Not trying to be a wisenhiemer but there is a toggle to turn the pagefile off. Does Windoz still maintain a pagefiel even if it is turned off?
Yeah, I seem to remember people doing that, too - simply setting the pagefile to 0, then setting it to the size you want. When Windows recreates the pagefile, it is all contiguous, assuming you have a large chunk of contiguous free space on your drive when you do it. I think that's what Michael was just saying, about defragging the whole drive when doing this...?
As another note, though, turning the pagefile off and leaving it off can cause dramatic performance decreases. This is one of the ways people get themselves into trouble. Particularly with things like Digital Audio Workstations (e.g., home or professional audio recording, using products like Sonar), people get this idea that if they turn off the pagefile, it will keep Windows from hitting their drive for swapping. Since the dreaded "dropouts" (i.e., gaps in recording audio) can be caused by Windows suddenly deciding to do a bunch of paging, a lot of people get this idea that turning off the pagefile will be a good thing.
This is invariably not true. This is because memory allocation is an expensive operation for the OS. It is faster and easier for the OS to swap pages between RAM and the pagefile than it is to allocate more memory for a process.
So what a lot of applications do is allocate the maximum amount of memory they intend to use. They may not use a lot of this memory, so these "empty pages" just sit there taking up RAM. However, since these pages don't get actively used, the OS will swap them out to the pagefile as soon as RAM starts running low. Once these "empty pages" are in the pagefile, they do not take up any active system resources. They merely take up space in the pagefile, and since the pagefile is usually such a small percentage of overall disk space, this is something that we usually do not care about at all.
This is why a lot of people get hung up on the amount of RAM that Task Manager says is being taken up by each process, and why they start looking for utilities that "free up unused memory". However, all these utilities do is eat up extra CPU cycles, without doing anything effective. Windows has already swapped all this unused space out the swapfile, so it's not actively using any RAM to start with. The utility that claims to "free up unused memory" really serves no purpose at all, and hopefully you did not spend any money on it.
But now, let's take a look at what happens when you have the pagefile turned off. All of a sudden, Windows can no longer swap out these "unused pages". Now they REALLY DO start taking up RAM for no purpose. Before long, you'll find yourself running out of memory, and your system will grind to a halt (or crash). All because applications initially allocate the maximum amount of memory they think they might need, so they can avoid the expensive process of allocating more memory. That's what happens in Windows when the pagefile is turned off.
And it might also be worth noting that it actually is not possible to "turn off" the pagefile. You can set its size to zero, but that's not the same as turning it off.
There are actually a number of different states for memory in Windows. There's memory that is actively in-use. Then there's memory that is holding applications that were run recently, and are still resident, in case the user wants to run them again. Then there's pages that are in-use, but have been swapped out to disk, and are ready to be freed up for something else to use. Then there's memory that has started to be prepared for another process (Windows goes through, and "zeros out" the entire range, so the new process starts with a "blank slate"). Then there's memory that is all prepared, and ready to be used by another process - the only true "free" memory.
Windows goes through a rather elaborate dance, in order to try to balance all of this, and hit resources in a way so that the user gets the best "perceived performance". Turning off the pagefile interrupts this delicate dance, and prevents Windows from using a key resource in this dance. It doesn't make the dance go any faster - Windows still does the entire dance, even if the size of the pagefile is 0 - it just can't offload those unused pages of memory to the pagefile, to free up more of the all-important RAM. So by turning off the pagefile, we severely cripple the memory management capabilities of Windows, without getting any real benefits anywhere.