9

I wonder how or if any one tried to create a RAM DISK, and then put the 2GB (or sometimes 1.2GB) .vhd file into it, and then run the virtual PC using this image.

It should be running super fast, as the hard disk is now simulated by RAM... I never tried but saw that there is tmpfs on Linux. So with VirtualBox, it should be doable... How about on Windows or on a Mac, anybody tried before and saw how fast it is?

P.S. it was for the historical reason that the hard drive was not SSD in 2009 and it can take a lot of time accessing the physical spinning hard disk, with 1 file mapping to some virtual structure of a hard drive. I think the "state of the virtual PC" can all be in the physical RAM of the computer, so it is not a problem. Now that we have SSD, it is like a RAM Disk that pretends to be a hard drive, so it should be quite fast).

nonopolarity
  • 9,516
  • 25
  • 116
  • 172

2 Answers2

6

It's debatable.

Performance will indeed increase considerably. But if you have enough RAM to create a RAM Disk capable of storing a whole image, know that both VirtualBox, VMWare and VirtualPC are capable of caching your images as data is accessed. So while the RAM Disk doesn't necessarily become redundant, its performance increase over a cacheable image will not be that great.

It's also a risk. A power outage or any other situation where your PC is accidentally turned off will destroy you image (or any changes you made to it since you last load it).

Finally, it will make starting up and closing down the VM session slower as the whole image needs to be read from disk into memory and later saved back to disk.

A Dwarf
  • 18,981
  • 2
  • 44
  • 66
  • right, it is more for experiment... and the RAM it eats up is huge... 2GB for the RAM DISK, 512MB for the Virtual PC to consume, and the original OS... so seems like it needs at least 4GB on the physical machine. – nonopolarity Nov 04 '09 at 04:15
  • 4gb is nothing these days ;) – Journeyman Geek Apr 11 '11 at 00:14
  • @JourneymanGeek except the above comment is now 4 years old :) – Mustafa May 07 '13 at 23:45
  • I have 16 gb in my current computer. What I said 4 years ago is even more true now – Journeyman Geek May 09 '13 at 00:48
  • @JourneymanGeek What about now? (I have an io bound problem: compiling loads of code which takes an hour and where the code rarely changes. Would be great to have the whole vm in a ramdisk.) –  Oct 16 '17 at 12:55
2

harddisk speed is the biggest bottleneck nowadays, there are other bottleneck also (e.g. drivers delay, OS architecture design for mechanical drive etc).

deddebme
  • 3,754
  • 4
  • 28
  • 28