Copy-on-Write Performance and Debugging
The article discusses Copy-on-Write (CoW) linking in Dev Drive for Windows systems, enhancing performance during repo builds. CoW benefits C# projects, with upcoming Windows updates enabling CoW by default for faster builds.
Read original articleThe article discusses the performance and debugging aspects of Copy-on-Write (CoW) linking in the context of Dev Drive and Windows operating systems. Dev Drive, introduced in Windows 11 and soon to be part of Windows Server 2025, utilizes CoW linking to enhance performance during repo builds. The analysis reveals varying performance improvements across different types of codebases, with C# projects benefiting significantly from CoW linking. The article also provides insights on identifying CoW links using fsutil commands and offers guidance on using tools like ProcMon and Microsoft Performance Recorder with Dev Drive. Additionally, it addresses potential issues like managing leaked CoW references and outlines steps to fix them. The upcoming 24H2 Windows release will have CoW enabled by default for Dev Drive, promising faster builds, especially for C# projects. The article recommends integrating the CopyOnWrite SDK into MSBuild repos and creating a Dev Drive partition for improved build performance.
Related
Is 2024 the year of Windows on the Desktop?
In 2024, the author reviews Windows 11, highlighting challenges like limited hardware support, lack of installation control, manual driver search, slow updates, and UI lag. They compare favorably to Linux distributions.
Arm64EC – Build and port apps for native performance on Arm
Arm64EC is a new ABI for Windows 11 on Arm devices, offering native performance benefits and compatibility with x64 code. Developers can enhance app performance by transitioning incrementally and rebuilding dependencies. Specific tools help identify Arm64EC binaries and guide the transition process for Win32 apps.
Software Engineering Practices (2022)
Gergely Orosz sparked a Twitter discussion on software engineering practices. Simon Willison elaborated on key practices in a blog post, emphasizing documentation, test data creation, database migrations, templates, code formatting, environment setup automation, and preview environments. Willison highlights the productivity and quality benefits of investing in these practices and recommends tools like Docker, Gitpod, and Codespaces for implementation.
Optimizing the Roc parser/compiler with data-oriented design
The blog post explores optimizing a parser/compiler with data-oriented design (DoD), comparing Array of Structs and Struct of Arrays for improved performance through memory efficiency and cache utilization. Restructuring data in the Roc compiler showcases enhanced efficiency and performance gains.
Windows File Explorer will be more powerful with version control and 7z
Microsoft updates File Explorer with Git integration for version control, native support for 7-zip and TAR compression formats. Aimed at enhancing project management and file organization for users, announced at Microsoft Build.
https://devblogs.microsoft.com/engineering-at-microsoft/dev-...
"Copy-on-write (CoW) linking, also known as block cloning in the Windows API documentation, avoids fully copying a file by creating a metadata reference to the original data on-disk. CoW links are like hardlinks but are safe to write to, as the filesystem lazily copies the original data into the link as needed when opened for append or random-access write. With a CoW link you save disk space and time since the link consists of a small amount of metadata and they write fast."
It seems there is a MacOS implementation: https://github.com/dotnet/runtime/pull/79243
But it seems that this is .Net specific and not something that would speed up other build systems? It is confusing if this can apply to other build technologies other than .NET. Can it speed up TypeScript/JavaScript builds? Can it speed up Rust builds? Also what are the speed ups on these other platforms like MacOS and Linux?
Is this something that all build systems and all OSes would benefit from?
I guess this blog post for me raises more questions than it answers.
ReFS, with block de-duplication and LZ4 compression has reduced the per-workspace footprint to around 10% of what it was previously. Decreased build times by around 5% and decreased archive, stage and package times by about 80% by deploying MSBuild SDK CopyOnWrite. I also moved the DDC onto the VHDX where the project resides which has further reduced the footprint of the project.
Windows 11 canary channel (still in canary I think) has a modified Win32 that supports CoW FileCopyEx. You can get similar gains by other means on Win10 and Win11 by using ReFS CoW aware utilities.
Have used XFS, BTRFS, APFS and others extensively over the years, so I am glad that Windows is finally getting in on the action.
That's not exactly confidence inspiring.
Windows having CoW makes my far fetched dream a possibility.
I tried that Dev Drive thing and I havent seen perf improvement when building C++ code, sadly.
Related
Is 2024 the year of Windows on the Desktop?
In 2024, the author reviews Windows 11, highlighting challenges like limited hardware support, lack of installation control, manual driver search, slow updates, and UI lag. They compare favorably to Linux distributions.
Arm64EC – Build and port apps for native performance on Arm
Arm64EC is a new ABI for Windows 11 on Arm devices, offering native performance benefits and compatibility with x64 code. Developers can enhance app performance by transitioning incrementally and rebuilding dependencies. Specific tools help identify Arm64EC binaries and guide the transition process for Win32 apps.
Software Engineering Practices (2022)
Gergely Orosz sparked a Twitter discussion on software engineering practices. Simon Willison elaborated on key practices in a blog post, emphasizing documentation, test data creation, database migrations, templates, code formatting, environment setup automation, and preview environments. Willison highlights the productivity and quality benefits of investing in these practices and recommends tools like Docker, Gitpod, and Codespaces for implementation.
Optimizing the Roc parser/compiler with data-oriented design
The blog post explores optimizing a parser/compiler with data-oriented design (DoD), comparing Array of Structs and Struct of Arrays for improved performance through memory efficiency and cache utilization. Restructuring data in the Roc compiler showcases enhanced efficiency and performance gains.
Windows File Explorer will be more powerful with version control and 7z
Microsoft updates File Explorer with Git integration for version control, native support for 7-zip and TAR compression formats. Aimed at enhancing project management and file organization for users, announced at Microsoft Build.