Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Virtual Memory still relevant in today's world of inexpensive RAM? [closed]

Virtual memory was introduced to help run more programs with limited memory. But in todays environment of inexpensive RAM, is it still relevant?

Since there will be no disk access if it is disabled and all the programs will be memory resident, will it not improve the performance and program response times?

Is there any essential requirement for virtual memory in windows apart from running more programs as stated above? Something windows internal not known to us.

like image 971
Navneet Avatar asked Feb 05 '09 07:02

Navneet


3 Answers

Some pedantry: virtual memory is not just the pagefile. The term encompasses a whole range of techniques that give the program the illusion that it has one single contiguous address space, some of which is the program's code, some of which is data, and some of which are DLLs or memory-mapped files.

So to your lead-in question: yes, virtual memory is required. It's what makes modern OS's work.

like image 57
kdgregory Avatar answered Nov 10 '22 13:11

kdgregory


Don't disable virtual memory. 2GB is not nearly enough to even consider this. Regardless, you should always keep virtual memory on even if you do have enough since it will only ever be used when you actually need it. Much better to be safe than sorry since NOT having it active means you simply hit a wall, while having it active means your computer starts swapping to the hard drive but continues to run.

like image 39
Soviut Avatar answered Nov 10 '22 13:11

Soviut


Yes, because it's the basis of all on-demand paging that occurs in a modern operating system, not just Windows.

Windows will always use all of your memory, if not for applications then for caching whatever you read from your hard drive. Because if that memory is not used, then you're throwing your investment in memory away. Basically, Windows uses your RAM as a big fat cache to your hard drives. And this happens all the time, as the relevant pages are only brought into main memory when you address the content of that page.

like image 28
Dave Van den Eynde Avatar answered Nov 10 '22 13:11

Dave Van den Eynde