To keep from continually/unnecessarily using swap which greatly degrades system performance. With 512MB RAM, and the programs which I run, I should not be touching my swap.
So, is it possible? I know it is in windows, but I have not been able to find a Linux utility for this procedure.
The Linux kernel knows what it's doing a lot better than you do. Some very clever people have gone to huge amounts of trouble to work out how your hardware is best utilised. Even if you find a way to force the memory handling to do something it doesn't naturally want to do, the kernel will just spend the next few minutes working hard to get things back to how it should be. If your swap is thrashing, you have a problem; it it isn't, you don't. As for not touching swap if you think you have enough memory, that's nonsense. I have 1GB of RAM and my swap partition has some stuff in it. I suspect the kernel has noticed that my login manager isn't doing anything, nor are the 6 virtual terminals which got started at boot time. These processes, and others like them, have probably been swapped out so the physical memory can be used for something useful, like buffers and caching. That's just how it should be. -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003