When it comes to Windows: disable the swap (virtual memory). Windows tries to push as much as it can onto the hard drive to keep as much memory as possible unused . This makes a PC incredibly slow ofcourse. A typical symptom is a slow down when switching from one application to the other.
That is absolutely, completely, 100% false.
Since Windows Vista, Windows does all it can to
prevent unused RAM, since empty RAM is using power and going to waste. So Windows will actually preload things from disk to RAM that it expects will be used soon (based on statistical analysis of your usage patterns). They call this
SuperFetch, and the memory in question "Standby memory". So if you then open something and SuperFetch has put it into the Standby already, it's simply changed from being in Standby to In Use. If it wasn't preloaded into Standby, no harm done. Some of the Standby memory is emptied and used for your application. (It will also keep recently-closed things in Standby, too.)
This is what you see in Resource Monitor, on the Memory tab, under Physical Memory, as the "Standby" memory usage.
You can observe the Standby preloading in action, by opening Resource Monitor
immediately after restarting Windows, and watching the Physical Memory stats while doing absolutely nothing else. It'll begin with a huge Free segment, and any programs that autostart will load and you'll see the In Use segment grow. Then, once the system is idle, you'll see the Standby segment grow and grow as it preloads things until it's consumed nearly all of the Free memory (usually leaving under 100MB!).
But because Standby memory
is fully available for programs to use with no speed penalty, you can consider your available RAM to be the sum of both Standby and Free (which is exactly what the "Available" statistic in Resource Monitor does). It's only once BOTH Standby and Free have run out, and serious swapping begins, that performance suffers.
(Windows XP and earlier did some prefetching, but it was nothing like SuperFetch in Vista and later.)