The raw NTFS filesystem itself is fast. However Windows adds a bunch of system level services that can slow it down considerably. Some of these can be configured at a “Path” level and some can only be configured at a “Volume” level (e.g. C:, D:). Always make sure:
- The most common item is Virus scanning which can slow down system writes and reads by 100-500%. Not so bad when reading a Word document but a killer with any build system. Windows Defender (and most other virus scanning software) allows you to add path level exclusions if you are an administrator.
- Windows search indexes the contents of many files on the file system for use in Windows search (and Cortana in Windows 10). You can control the search paths in “Indexing Options” and excluding your working directory. Note a build is constantly creating and modifying files that it is trying to reindex otherwise.
At the volume level there are several performance tweaks that can be done if you are NOT on the system volume. For performance critical servers and workstations I made sure there is a separate volume for the build where the following is configured:
- Disable 8.3 filename support (this causes multiple extra read/writes every time a file is created or the name is changed, the performance impact grows non-linearly with the number of items in a directory)
- Disable last access time stamp updates (which prevents a write to the Master File Table on every access).
- If you are not on an SSD make sure that the disk is defragmented frequently as builds can cause massive fragmentation quickly.
- If your builds have have lots of small files on the volume my may also want to boost the default Master File Table (MFT) size from the default 12.5% of volume to something larger. Files under 512 bytes are stored directly in the MFT and a excess numbers of small files can cause fragmentation of this table as it is dynamically grown, however this is only an issue if your use pattern causes this.
- Finally some tools (and or IT departments) add file system watchers that you may want to disable. For example some GUI source code management tools add plugins to the Windows Explorer that can massively slow down the file system (I’ve seen 10X slowdowns), and my IT department once thought it would be great to put an intrusion detection system on our build servers and workstations that was painfully slow (took us six months to get permission to bypass that one.)
There are other optimizations that I generally don’t recommend such as modifying the default cluster size (generally only useful when streaming very large files such as when you are doing video editing), you can also move your paging file to a separate physical device, if you have one, to prevent conflicts with your builds.
Hope this helps.