Microsoft published a set of interesting tools at Build 2023 to aid software development. One of the most interesting announcement was a new Windows 11 feature called Dev Drive. Dev Drive is a new form of storage volume available to improve performance on key software development workloads. Dev Drive is built on ReFS filesystem, that is targeted file system optimization over the good old NTFS. This means that to use the Dev Drive (or to create one), you need to create whole new partition, or use the virtual hard disk (VHD).
Setup Dev Drive into New Partition
I decided to skip the VHD option and go with the new partition. As I just bought a new Samsung Pro 990 and I had empty space left at my old Gigabyte GSM2NE3100TNTD. I think shrinking existing partitions and putting 100GB for Dev Drive is not a bad sacrifice if you don’t have a extra hard drive lying around. I don’t have experience from the VHD option, so in this post we will focus on this new partition way.
To be able to create Dev Drive you need to have a Windows 11 version 23466 or newer. As of today (27.5.2023) this version is available at Dev channel preview builds.
There are two ways to create the Dev Drive: Through Dev Home Windows Store app, or directly from Storage settings. I recommend the later, because I had some issues while trying to do the drive from Dev Home app. Open System > Storage > Disk & volumes settings and if you have new enough Windows version you should be able to see “Create Dev Drive” button. Click it and create drive into empty disk space. The space needs to be unallocated, so if all your drives are formatted into NTFS’s, you need to shrink existing the disk and leave the space as unallocated.
After creating the Dev Drive it should appear into Devices and drives section like normal drive. I encountered an issue when I first created the Dev Drive, that it wasn’t formatted as ReFS drive. Dev Drive should format it automatically and you should not need to do it manually. To fix the issue I just recreated the drive and then it worked.
Properties of the drive shows, that it is ReFS file system drive and 160GB space ended up with 156GB of usable space.
The Performance
Well how fast the drive is it then and is it really worth the hassle? To get some idea of the performance I did a quick test with one of midrange solution that I’m currently working on. The Solution has 56 C# projects and around 200-300k LoC. I consider it as a midrange solution, because it is under 1mil LoC. I copied the solution into my new Dev Drive and did six times rebuild solution run. Then I did the same in the old drive and compared the results. My old development folder is in faster M2 SSD drive, that is also running the Windows. Specs for old development folder drive is 7450 MB/s read speed and 6900 MB/s write speed. The Dev Drive uses hard disk that has 2500 MB/s read speed and 2100 MB/s write speed. So in theory the speed difference is around ~3x. By just comparing these numbers the old drive should be faster. I don’t know how much Windows add the overhead on disk, but I suspect that it does some actions behind the scenes that affects negatively into build times. Not much, but maybe a bit.
For old NTFS drive the build time was around 85 seconds and actually the build time was really consistent. It started bit higher (around 88), but then it was constantly around 85 seconds.
For the new ReFS Dev Drive build time kept decreasing until it hit the floor around 55 seconds. Measurements were lot more inconsistence and ranged between 72 and 55 seconds. I don’t know why the build times had so much variation, but still it was around 25% faster, than the old drive (which is running on faster disk too).
Based on these measurements I would say, that the Dev Drive really speeds up the build times and is worth going for. My example solution has lots of Nuget packages and they are also stored into Dev Drive. I didn’t move the Nuget cache into Dev Drive yet, but I think that would also speed up the build times bit. I have such a powerful computer that I didn’t notice any improvement on typing / text editing, but for slower computers I think Dev Drive will provide some improvements.
Summary
Dev Drive definitely speeds up the build time and that leads into faster software development. I got approx 25% improvement into build times simply by copying my source code folders into dev drive. Feature is still in preview, but I think it is worth waiting for and you should start using it if you are working with mid- to large solutions that has over 1 min rebuild time. For smaller projects I think it does not bring that much on the table. I have to say that I like this kind of simple improvements that makes me a bit faster on my work. Good job Microsoft.
Pingback: Windows Dev Drive - Geliştirilmiş performansa sahip geliştiriciler için ayrılmış bir depolama boyutu
Comments are closed.