Comparing Windows VM Installation Times: HDD vs. NVMe vs. RAM
In this video, we will install Windows on VMs four separate times in four separate ways, then compare the time difference between the various methods.
March 12, 2024
In this video, IT expert Brien Posey demonstrates and benchmarks the process of installing Windows on virtual machines using different storage mediums: traditional spinning disk, NVMe storage, and RAM disk.
The results show significant performance improvements when installing VMs on RAM disks compared to traditional spinning disks. Additionally, Posey explores a scenario where he copies the installation media to a RAM disk before installing Windows, further reducing installation time.
The transcript has been lightly edited for clarity and length.
Transcript:
Brien Posey: Recently, I've written a couple of articles about the idea of running Hyper-V virtual machines on a RAM disk as a way of improving overall performance. In this video, I want to explore the idea a little bit more. I want to show you first and foremost how to create a RAM disk, and then how to create a virtual machine that is hosted on the RAM disk. But at the same time, I also want to show you what types of performance gains you could realistically expect.
My plan for this video is to benchmark the entire process. We're going to install several different virtual machines. I'm going to begin by creating a Windows 10 virtual machine on a spinning disk, an HDD (or hard disk drive). I'm going to start a timer that's going to begin when I power on the virtual machine. I'll stop the timer once we get to the Windows desktop so that we can find out how long it took to create that virtual machine.
Then the next thing that I'm going to do is I'm going to repeat the process – only the second time around, I'm going to create the virtual machine on NVMe storage. That way, we can get a feel for the difference that having solid-state storage makes, as opposed to creating a virtual machine on a spinning hard disk.
From there, I'm going to create a RAM disk. I'm going to repeat the process – only this time, I'm going to create the virtual machine on the RAM disk, instead of creating it on solid-state storage or a hard disk drive.
The last thing that I'm going to do is I'm going to repeat the process where I create a virtual machine on a RAM disk. But the one thing that I'm going to do differently is I'm also going to copy the installation media to a RAM disk.
So, we're going to be installing Windows four separate times in four separate ways, and then comparing the time difference between the various methods.
Now, before I get started, I just want to clarify that, yes, I'm going to be creating Windows 10 virtual machines, as opposed to Windows 11. And the only reason that I'm doing that is just because Windows 10 is a little bit quicker and easier to install. And I'm not doing unintended installations here. So, I'm going for simplicity. And incidentally, because I'm not doing unattended installations, this process isn't entirely scientific, because part of the time difference is going to depend on my reaction time. Even so, I'm going to do my best to install each virtual machine as quickly as I possibly can, using the various methods.
So, with that said, let's go ahead and get started.
Install to Spinning Disk
I'll start the timer when I power on the virtual machine. But first, we need to create a virtual machine.
So, I've got the Hyper-V Manager on screen. I'm going to click New Virtual Machine. I'll click Next. I'm just going to call this virtual machine “VM.” And I'm going to place the virtual machine on a spinning disk. I’ll click Next. I'll make this a Generation 2 virtual machine. I'll click Next. And I'm going to give the virtual machine four gigabytes of memory, so I'll type 4096. I'll click Next. I'm not going to worry about attaching this to the network. I'll click Next. I'm going to create a 20-gigabyte virtual disk, and then I'll click Next. And I'll select the installation media. I'll click Next. And everything looks good here, so I'll click Finish to create the virtual machine.
I'll go ahead and open the virtual machine console. I'll start the virtual machine start the timer and install Windows as fast as I possibly can.
The result: 25 minutes, 40 seconds
Okay, so it looks like the process has been completed. It took about 25 minutes and 40 seconds.
I'm going to go ahead and blow out this virtual machine.
Install to NVMe Storage
I'm going to create another virtual machine using NVMe storage.
Okay, so let's reset the timer. I'm going to create a virtual machine in the same way as I did a moment ago. So, I'll go to New Virtual Machine. I'll click Next. I'll call the virtual machine “VM,” and I'll store the virtual machine on NVMe storage. I'll click Next. I'll make this a Generation 2 virtual machine. Once again, I'm going to assign four gigabytes of memory. I'll click Next, I'm not going to worry about network connectivity. Once again, I'll create a 20-gigabyte virtual hard disk. I'll click Next. I'll use the same installation media as before. I'll click Next and Finish. So, the virtual machine has been created.
I'll click Start and then I'll start the timer.
The result: 6 minutes, 43 seconds
The process has been completed. It took about six minutes and 43 seconds.
With that said, I'm going to go ahead and reset everything.
Install to a RAM Disk
Next, we'll install it to a RAM disk.
Now, Windows doesn't contain any built-in tools for setting up a RAM disk, so I'm using a free tool that I got from the internet called ImDisk. You can see that I've got the RAM disk configuration utility on screen right now. So, I'm going to go ahead and open that up. And here's what the utility looks like.
We need to specify the size of the RAM disk that we're creating. Right now, it's set to 30 gigabytes, I'll go ahead and go with that. The next thing that we have to do is assign a drive letter. It's going to use the R disk, so that's fine, I'll go ahead and use that. I'll set the file system to NTFS. And I'm not going to worry about launching this at Windows startup or creating a temp folder. I'm just going to go ahead and click OK and click Close. You can see a message saying that the new RAM disk is being mounted. So, it's very, very easy to set up a RAM disk.
If you look at File Explorer, you can see our newly created RAM disk right here and right now it is empty.
Let's create a virtual machine on the RAM disk. I'll do this in the same way as I did before. I have a new virtual machine. Next, I'll call the virtual machine “VM.” I'll store the virtual machine on my RAM disk, so I'll make this the hard drive. Let's go ahead and create the VMs folder just in case. I'll click Next. We'll make it a Generation 2 virtual machine. I'll click Next. I'll assign 40 gigabytes of memory. I'll click Next. We won't worry about networking. I'll create a 20-gigabyte virtual hard disk, and we'll use the same installation media as before. I'll click Next and then Finish.
Once again, I'll click Start and then I'll start the timer.
The result: 6 minutes, 1 second
The installation is completed. We did it in six minutes and one second. So, that's the amount of time that it took to install Windows to a RAM disk.
Now I'm going to restart the timer, and I'm going to go ahead and blow out this virtual machine.
Install to RAM Disk With Copy of Installation Media
I'm going to perform one more installation, but I'm going to do things a little bit differently. This time, I'm going to install Windows to a RAM disk, but before I do, I'm also going to copy the installation media to a RAM disk.
Okay, so here I am in File Explorer. I'm going to copy my installation media. I'll copy this to the RAM disk. While this is copying, I'm going to go into my VMs folder just to show you that there's nothing there. I've gone ahead and blown out the previous virtual machine.
Okay, so the Windows installation media has been copied. Let's go ahead and close this out and deploy Windows one more time. So, I'm going to click New Virtual Machine. I’ll click Next. Again, I'll call the virtual machine “VM.” I'm going to deploy this to my RAM disk. So, I'll place it on the hard drive in the VMs folder and click Next. I'll set this to a Generation Two virtual machine. I'm going to assign four gigabytes of memory. I'll click Next. I'm not going to worry about networking. I'll click Next. And I'll create a 20-gigabyte virtual hard disk. I'll click Next.
Then on the installation options screen, I'm going to install the operating system from a bootable image file. But rather than using the ISO file that's stored on the C drive, I'm going to go to the hard drive or my RAM disk. I'm going to select the image file and click Open. So, we're using the image file on the RAM disk. I'll click Next, and then Finish. The virtual machine is created.
Once again, I'll click Start and then I'll start the timer. We'll see how long it takes to install Windows.
The result: 5 minutes, 41 seconds
The process is complete. It looks like it took five minutes and 41 seconds to complete the installation.
Comparing the Results
So, just to reiterate, when we installed Windows on a spinning disk, it took about 25 minutes and 40 seconds. That time was decreased to six minutes and 43 seconds when we installed Windows to NVMe storage. When we installed Windows on a RAM disk, the time dropped again, all the way down to six minutes. And then finally, when we copied the installation media to a RAM disk and installed Windows to a RAM disk, the time dropped again to five minutes and 41 seconds.
Admittedly, this is non-scientific because the results depend on my reaction time. And it's also hardware-specific. If you ran this test on your system, you'd probably get different numbers. Even so, I think the numbers are representational of what you can realistically expect.
So, what does this translate to in terms of percentages? Well, some rough numbers off the top of my head are that when we installed to a RAM disk using RAM disk-mounted installation media, we saw roughly a 460% improvement over the time that it took to install to a spinning disk. We also saw about a 15% improvement over installing Windows to NVMe storage.
Clearly, using a RAM disk does translate to improvements in performance. Now, of course, those improvements come with some risk: If the machine was accidentally turned off, then the RAM disk contents are cleared. At that point, you would have to start over.
So, that's just a quick demo of how you might set up a RAM disk, how to mount a Hyper V virtual machine on a RAM disk, and what types of performance improvements you might expect in various conditions.
About the author
Brien Posey is a bestselling technology author, speaker, and 21x Microsoft MVP. In addition to his ongoing work in IT, Posey has trained as a commercial astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space.
About the Author(s)
You May Also Like