Guest
[Entry]
"Well, Steve, interesting that you should ask that.
I will tell you a little secret: the point at which you needed virtual memory was never. Virtual memory was an insanely incompetent idea created by a bunch of academics who knew zero about practical computing systems, and ANY computer will function vastly better if it can be made to run without VM.
Now, you might ask, if VM is useless and harmful, why do most big modern operating systems use it? The short answer to this question is that the people deciding whether to use VM or not at Microsoft, Apple and IBM were even more stupid and inexperienced than the academics who invented VM and wanted to adopt it based on the same, completely incorrect assumptions that the academics had when they invented it. We could start talking about those assumptions and misconceptions, but unfortunately, if they were easy to understand and describe we would not have the VM problem in the first place.
Getting back to you. Unfortunately, just like the aforementioned tardnoggins at Apple and Microsoft, you have your own misconceptions, namely the idea that you can turn off VM. Of course, you cannot turn it off, that would defeat the whole purpose of screwing you if you could just turn it off. When people do something really stupid, they always make sure it is irreversible. After all, if everybody could just turn off VM, they would, and that would make the bozos who created it look pretty stupid wouldn't it? They prevented this possibility by making it unremovable, kind of like Microsoft made Internet Explorer unremovable.
What you can do is limit the size of the page file, which of course should be set to whatever the minimum is, hopefully 0. Virtual Memory is still there, but at least you can reduce it from very very very slow to just very very slow by asking it to not involve the disk drive in the insanity.
I guess I will briefly discuss why VM is a bad idea for the 1% who actually care, even though it is not what the OP asked.
Out of the box, VM is bad because it indirects memory so it slows down any memory-involved operations by 5x to 10x. If a disk is involved, then the slow down becomes much more pronounced, anywhere from 10x to 100x slower. The net result is that a computer using a VM is generally AT LEAST 10x slower than the same computer which does not use VM. So, that is the bad. Also, it makes the computer more complicated, because now there are two different sets of addresses, hardware addresses and virtual addresses.
The supposed benefits of using a VM are two: (1) it creates a flat memory addressing scheme, and (2) it allows the amount of memory to be increased dynamically by moving rarely used memory to disk. On paper these sound like great advantages, but in the real world they do not come close to compensating for the performance degradation.
(Re 1) Virtually all computer languages using memory managers (C, Java, etc). Therefore, application programmers do not care whether there is a flat memory space or not, because the memory manager takes care of that. As far as the memory managers themselves are concerned, writing a manager which can use a discontinuous set of memory addresses is only marginally more difficult than one which does not. So the advantage of (1) is more or less inconsequential to 99% of programmers.
(Re 2) In real life, VMs that use disks frequently use the disk even though they supposed to ""rarely"" use the disk. Anyone who has watched the disk thrash in the early days (1980s) knows this. Modern Windows computers are so polluted with VMs and OS-related garbage that they thrash continuously, even if no applications are running at all. The advantage that the VM prevents the user from getting an ""out of memory"" error, is a false advantage. I would much rather have my computer run faster and get the occasional out of memory error. It is true that modern computers do not give out of memory errors--they just slow down and become completely unusable so you have to reboot the whole machine. With direct memory access, you just close the offending program and keep going, a much better way of doing things."
|