Quote:
Originally Posted by eeef2
Dilbert, i dont understand- is VM badfor performance? why not turn it all the way up and use as much as you can??
|
In general, virtual memory increases performance.
The idea is that "you can never have too much memory," or "the more memory, the better." So, you pretend to have more memory than you have and you cache the less frequently used memory on disk. Because it's less used, the performance penalty you get for keeping it on disk won't be noticed as much. The memory that is being used all the time stays in RAM. The result is that you have more memory for your applications, increasing overall performance.
This optimisation can appear to break down if you use all of your system's virtual memory with equal and frequent regularity. However, if you think about it, the reality is that this is merely an indication that you have too little memory for your purpose(s) and your use of virtual memory really isn't the issue.
Interestingly enough, not only does your system employ virtual memory but it also uses file caching. This is pretty much the same thing as virtual memory except in reverse. You cache disk files in memory.
So, your operating system will have files cached in memory while you have memory cached on disk. Pretty funny, eh? This might seem ludicrous but it actually makes sense. It's the frequenly used files that stay cached in memory while the infrequently used memory gets cached on disk. In other words, everything that's hardly being used stays on the slow disk drive while everything that's often accessed gets put in fast memory. Can you see why this is good for performance?