← Back to context

Comment by wolfi1

2 years ago

maybe the malware detection program adds to the performance as well

NTFS is really horrible handling many small files. When compiling/watching node modules (easily 10-100k files), we've seen a 10x size difference internally (same hardware, just different OSes). At some point that meant a compile time difference of 10-30 sec vs 6-10 min. Not fun.

  • NTFS is perfectly fine at handling small files and performs on-par with other modern file systems.

    The issue is Defender in sync mode/other AV/other file system filters.

    DevDrive as noted by default uses an async scanning technique as well as ReFS. ReFS will suffer the exact same performance issues with Defender (or other AV/other file system filters) doing its thing when running in sync mode, which it does by default for ReFS-formatted drives in Windows Server.

    https://news.ycombinator.com/item?id=26737521

    > Except for CloseHandle(). These calls were often taking 1-10+ milliseconds to complete.

    > While I didn't realize it at the time, the cause for this was/is Windows Defender. Windows Defender (and other anti-virus / scanning software) typically work on Windows by installing what's called a filesystem filter driver.

    This doesn't take away from your point that _it is slow_, but the reasons are not due to the file system in use.

    • >The issue is Defender in sync mode/other AV/other file system filters.

      I've had folders take a full minute to open on an SSD.

      It got to the point where I went to open the folder, it started loading. I needed the file quickly, so I searched for it online, found it, and opened it before windows finished loading that folder for me.

      After exempting that folder from Windows Defender the folder loads instantly. For the life of me I cannot understand why Defender blocks Explorer.

      2 replies →

    • Technically, they're because of the filesystem in use: it's providing the APIs these garbage-ware utilize... which causes the performance issues ( ◠ ‿ ・ ) —

      5 replies →

    • I don't know if async, AV, NTFS, or what, but some years ago we could demonstrate reliably that running a "big" maven compile on a lot of .java files was faster in Linux than Windows.

      The kicker... Linux was running inside a VirtualBox VM inside the very same Windows host.

      This could also be some variance in the `javac` command between OS's, granted.

  • > NTFS is really horrible handling many small files.

    To pile onto NTFS, it's performance is so notoriously bad that there are developer teams working on Windows projects that configure their build farm to do cross builds from Linux to Windows just to avoid the performance penalty.

    • As an anecdote, we had a really long build time for our pipeline (going back prob 15 years).

      I argued for a Linux laptop, and the boss said, "OK, prove it. Here's two equivalent laptops, time it.".

      Turns out there was zero difference, or negligible (Windows won), between compilation times. That has always annoyed me.

      22 replies →

  • That may be due to a combination of Malware detection + most unix programs not really written to take advantage of the features NTFS has to offer

    This is a great talk on the topic https://youtu.be/qbKGw8MQ0i8?si=rh6WJ3DV0jDZLddn

    • It's more a case of Linux programs not being written to work around the performance issues of Windows filesystems + layers above them. NTFS doesn't offer magical featurs that fix the performance.

Their "windows dev drive" setup addresses this. I haven't tested it myself but I saw a couple of inexpertly executed tests showing significant performance gains. I honestly have no idea if my compile times are quicker.