Ever since the dawn of time, my Windows installation has been pretty unusable. Any kind of substantial disk load would bring the system almost to a complete halt. I never thought much of it, as my SSD was kinda old.
Using Windows just to play sim racing games and any game with an anticheat petty enough to not let Linux users play, it has never been a super high priority to fix it.
A couple of years ago, I upgraded my Linux drive to an NVMe and, with my now "old" Linux drive being bigger than my Windows', thought it was the perfect time to finally troubleshoot the weird freezes I kept having.
New drive, fresh install aaaand holy shit it still freezes.
Truth be told, the title is kind of clickbait-y. Did I actually have this issue for 2 years? Yes.
Could I have done something about it sooner? Absolutely.
With that said, this Sunday I finally had enough, so I started digging.
Troubleshooting time
The first benchmark was already quite worrying (I used CrystalDiskMark btw)
Sequential single-thread write and random writes speeds were awful.
One common fix is to disable and re-enable caching on the disk, so I did that.
And..
Incredible! Sequentials are now normal, but it seems like the price we had to pay for that was sacrificing the souls of the random write speeds.
Another very funny finding was that Windows claimed to have been running disk defrag regularly. Except that when I ran it manually from Powershell, I got this:
Post Defragmentation Report:
VERBOSE:
Volume Information:
VERBOSE: Volume size = 1.81 TB
VERBOSE: Cluster size = 4 KB
VERBOSE: Used space = 835.93 GB
VERBOSE: Free space = 1.00 TB
VERBOSE:
Retrim:
VERBOSE: Backed allocations = 1863
VERBOSE: Allocations trimmed = 10526
VERBOSE: Total space trimmed = 1.00 TB
No big deal, just defragged half the damn disk. Anyway, while that was a pleasant discovery, it still wasn't the culprit of my issue.
After a few back and forths with Claude, where even he got confused by the weird behavior, suggested that Windows Defender could be crippling the writing speeds, as it could be scanning each and every one.
"There's no way an internal Windows tool would mess me up like that", I naively thought.
Epiphany
Run Set-MpPreference -DisableRealtimeMonitoring $true..
Check benchmark..
Welp, fuck me I guess.
Ignoring sequential writes, which plummeted AGAIN, the randoms were now fixed.
So, what's the moral of this story?
Never blame yourself, your hardware, or software, when the solution is often right in front of you:
Blame MicroSlop.