Dev Drive and Copy-on-Write for Developer Performance

Try out the new Windows Insider release for double-digit build performance wins with a small amount of effort.

Erik Mavrinac
6 min readintermediate
--
View Original

Overview

The article discusses Dev Drive, a new feature in Windows designed to enhance developer performance by utilizing the ReFS filesystem and Copy-on-Write (CoW) technology. It highlights significant performance improvements observed during internal testing, including a 28% faster build time when using Dev Drive with specific configurations.

What You'll Learn

1

How to implement Dev Drive for improved build performance

2

Why Copy-on-Write technology enhances disk usage efficiency

3

How to configure package caches for optimal performance with Dev Drive

Key Questions Answered

What performance improvements can developers expect from using Dev Drive?
Developers can expect a 14% faster full build when transitioning from NTFS to Dev Drive, and an additional 14% improvement when utilizing the Microsoft.Build.CopyOnWrite package, totaling a 28% performance increase.
How does Copy-on-Write technology work in Dev Drive?
Copy-on-Write (CoW) technology allows for file linking without full duplication, creating metadata references to original data. This method saves disk space and speeds up write operations as data is only copied when necessary.
What are the best practices for using CoW with Dev Drive?
All files intended for CoW linking must reside within the same Dev Drive volume, including package caches. This ensures optimal performance and functionality when using CoW technology in development workflows.
What future developments are planned for Dev Drive?
Dev Drive and its performance enhancements will be included in the next major Windows Server version and will also be integrated into Azure Pipelines and GitHub Actions for improved build efficiency.

Key Statistics & Figures

Performance improvement from NTFS to Dev Drive
14%
This improvement was observed during internal testing with a large codebase.
Total performance improvement with Microsoft.Build.CopyOnWrite
28%
This total includes the initial 14% improvement plus an additional 14% from the CoW package.
Performance improvement for NTFS in upcoming Windows release
9%
This improvement is noted when building with the same repository compared to the previous version.

Technologies & Tools

Filesystem
Dev Drive
Enhances developer performance by utilizing the ReFS filesystem.
Filesystem Technology
Copy-on-write
Enables efficient file linking and reduces disk usage.
Build Tool
Msbuild
Used for building C# projects and integrating with Dev Drive.

Key Actionable Insights

1
To maximize build performance, transition your development environment to use Dev Drive and configure it to store package caches.
This setup can lead to significant performance gains, as evidenced by the 28% faster build times observed in testing, making it crucial for developers working with large codebases.
2
Utilize Copy-on-Write technology to reduce disk usage and improve write speeds during builds.
By avoiding full file copies and leveraging metadata references, developers can streamline their workflows and enhance overall efficiency.
3
Ensure that all files intended for CoW linking are located within the same Dev Drive volume.
This practice is essential for achieving the expected performance benefits and avoiding potential issues with file accessibility during builds.

Common Pitfalls

1
Failing to exclude the repo directory from real-time antivirus scanning can lead to slower build performance.
This common configuration issue can hinder the benefits of using Dev Drive, as antivirus scanning can significantly impact build times.