---
title: "Copy-on-Write performance and debugging"
description: "Testing Dev Drive with copy-on-write (block clone) linking across large internal Microsoft repos showed build-time reductions up to 43%, with many repos gaining 10% or more."
url: "https://swe.quest/articles/copy-on-write-performance-and-debugging-d6fa950b2bebd0f3"
canonical: "https://devblogs.microsoft.com/engineering-at-microsoft/copy-on-write-performance-and-debugging/"
source: "Engineering@Microsoft"
published: "2024-05-14"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["build-systems","storage-systems","performance","dotnet","developer-productivity"]
---

# Copy-on-Write performance and debugging

A post on [Engineering@Microsoft](https://swe.quest/sources/ms-engineering.md), published 2024-05-14, 5 min read, Case study. Original: [https://devblogs.microsoft.com/engineering-at-microsoft/copy-on-write-performance-and-debugging/](https://devblogs.microsoft.com/engineering-at-microsoft/copy-on-write-performance-and-debugging/)

## Summary

Testing Dev Drive with copy-on-write (block clone) linking across large internal Microsoft repos showed build-time reductions up to 43%, with many repos gaining 10% or more. C# repos with deep project-to-project dependencies and builds that copy files into microservice layouts benefited most, while C++-heavy repos and builds ending in long linear dependency chains gained little. Practical tips cover spotting CoW links with fsutil queryExtentsAndRefCounts, allowing ProcMon and Xperf filter drivers on Dev Drive, and using refsutil leak to clean up orphaned references that hit ReFS's 8176-clone-per-block limit. CoW becomes automatic in Windows 11 24H2 and Server 2025; until then, add the CopyOnWrite SDK to MSBuild repos.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Storage systems](https://swe.quest/tags/storage-systems.md) (Infrastructure)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [.NET](https://swe.quest/tags/dotnet.md) (Languages)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)

## Prerequisites

- MSBuild
- Windows file systems ([easy posts on Storage systems](https://swe.quest/tags/storage-systems.md?difficulty=easy))

## Keywords

Dev Drive, ReFS, MSBuild, Microsoft.Build.CopyOnWrite, fsutil, refsutil, ProcMon, Windows 11 24H2

## Related posts

- [Large-scale distributed builds with Microsoft Build Accelerator](https://swe.quest/articles/large-scale-distributed-builds-with-microsoft-build-accelerator-9baa9a7436e8437c.md): Engineering@Microsoft · 2021-08-18 · Easy · 4 min read · Build systems, Developer productivity, Caching
  Microsoft's BuildXL distributes and caches builds for its largest codebases.
- [The pursuit of an autonomic scale and efficiency system for Microsoft 365: Making it as easy as breathing](https://swe.quest/articles/the-pursuit-of-an-autonomic-scale-and-efficiency-system-for-microsoft-365-a4e4d24fa169c68b.md): Engineering@Microsoft · 2022-03-29 · Easy · 6 min read · Performance engineering, Observability, Developer productivity, Static analysis, .NET
  Microsoft 365's Cloud Profiling and Reporting Pipeline continuously profiles 1000+ services, capturing CPU, allocations, rooted and duplicated memory, exceptions, IO, GC pause stacks and blocking latency.
- [Improving machine learning iteration speed with faster application build and packaging](https://swe.quest/articles/improving-machine-learning-iteration-speed-with-faster-application-build-and-76fe5935fe0be272.md): Meta Engineering · 2024-01-29 · Medium · 5 min read · Build systems, Developer productivity, ML platforms, Storage systems, Python
  Meta cut ML engineers' build and packaging overhead by double-digit percentages by tackling build non-determinism, pruning dependencies, and replacing monolithic XAR executables with an incremental Content Addressable Filesystem (CAF).
- [Speeding up C++ build times](https://swe.quest/articles/speeding-up-c-build-times-74d542dbb5ae649d.md): Figma · 2024-04-25 · Medium · 8 min read · Build systems, C & C++, Developer productivity, Static analysis, CI/CD
  Figma halved C++ build times by attacking the volume of preprocessed bytes sent to the compiler, which had grown far faster than the codebase.
- [Improve Git monorepo performance with a file system monitor](https://swe.quest/articles/improve-git-monorepo-performance-with-a-file-system-monitor-1e7445f19bf20b0e.md): GitHub Engineering · 2022-06-29 · Medium · 22 min read · Version control, Performance engineering, Developer tools
  Git 2.37.0 adds a builtin file system monitor daemon (\`git fsmonitor--daemon\`) for macOS and Windows, enabled by setting \`core.fsmonitor\` to true.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
