Comparing Windows VM Installation Times: HDD vs. NVMe vs. RAM

In this video, we will install Windows on VMs in four ways and then compare the time differences between the methods.

Brien Posey

March 12, 2024

15 Min View
ITPro Today

In this video, IT expert Brien Posey benchmarks Windows installations 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: I recently wrote articles about running Hyper-V virtual machines on a RAM disk to improve 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 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 will create a Windows 10 virtual machine on a spinning disk, an HDD (or hard disk drive). I will start a timer 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.

Related:Tips for Deploying Enterprise NAS Storage

Next, I will create the virtual machine on NVMe storage. That way, we can get a feel for the difference that solid-state storage makes vs. creating a virtual machine on a spinning hard disk.

From there, I will create a RAM disk and the virtual machine on the RAM disk.

The last thing I will do is repeat the process of creating a virtual machine on a RAM disk. The one thing that I will do differently is copy the installation media to a RAM disk.

So, we will install Windows four times in four ways and then compare the time difference between the methods.

Before I begin, I want to clarify that I will create Windows 10 virtual machines, not Windows 11. I'm doing this because Windows 10 is quicker and easier to install. I'm not doing unintended installations here. I'm going for simplicity. 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. Regardless, I will do my best to install each virtual machine quickly.

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.

Related:Tracking Down Lost Disk Space: A PowerShell Solution

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 will 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 will create a 20-gigabyte virtual disk, and then I'll click Next. I'll select the installation media. I'll click Next. Everything looks good here, so I'll click Finish to create the virtual machine.

I'll open the virtual machine console, start the virtual machine, start the timer, and install Windows as fast as I can.

The result: 25 minutes, 40 seconds

Okay, so it looks like the process has finished. 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 will create a virtual machine as I did a moment ago. So, I'll go to "New Virtual Machine." I'll click Next. I'll call it “VM” and store it 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.

Related:Executing a Zero-Downtime Storage Hardware Refresh

I'll click Start and then start the timer.

The result: 6 minutes, 43 seconds

The process has finished. 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.

Windows doesn't contain any built-in tools for setting up a RAM disk. I'm using a free tool called ImDisk. You can see that I've got the RAM disk configuration utility on screen right now. I'm going to open that up.

We need to specify the size of the RAM disk we're creating. It's 30 gigabytes right now, and I'll use that. The next thing that we have to do is assign a drive letter. It will use the R disk. I'll go ahead and use that. I'll set the file system to NTFS. And won't 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 the new RAM disk is being mounted. So, it's very easy to set up a RAM disk.

If you look at File Explorer, you can see our newly created RAM disk. The disk 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. 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 start the timer.

The result: 6 minutes, 1 second

The installation has finished. We did it in six minutes and one second.

I will restart the timer and blow out this virtual machine.

Install to RAM Disk With Copy of Installation Media

I will perform one more installation, but I will do things a little differently. I will install Windows to a RAM disk, but before I do, I will also copy the installation media to a RAM disk.

Okay, so here I am in File Explorer. I'm going to copy my installation media to the RAM disk. While this is copying, I will go into my VMs folder to show you 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.

On the installation options screen, I'm going to install the operating system from a bootable image file. Rather than using the ISO file stored on the C drive, I will 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 start the timer. We'll see how long it takes to install Windows.

The result: 5 minutes, 41 seconds

The process has finished. It took five minutes and 41 seconds.

Comparing the Results

So, to reiterate, when we installed Windows on a spinning disk, it took about 25 minutes and 40 seconds. That time 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. 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. 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 represent 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 it took to install to a spinning disk. We also saw about a 15% improvement over installing Windows to NVMe storage.

Using a RAM disk does translate to improvements in performance. Of course, those improvements come with some risk: If the machine accidentally turned off, the RAM disk contents clear. 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.

Read more about:

Technical Explainer

About the Author

Brien Posey

Brien Posey is a bestselling technology author, a speaker, and a 20X Microsoft MVP. In addition to his ongoing work in IT, Posey has spent the last several years training as a commercial astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space.

https://brienposey.com/

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like