I always hear people saying you need to leave ~20% of the space on your SSD free otherwise you'll suffer major slowdowns. No way I'm buying a 4TB drive and then leaving 800GB free on it, that is ridiculous.
Now obviously I know it's true. I have a Samsung 850 Evo right now that's 87% full, and with a quick CrystalDiskMark test I can see some of the write speeds dropped to about a third of what they are in reviews.
I'm sure that the amount of performance loss varies between drives, which to me would be a big part in deciding what I'd rather buy. AnandTech used to test empty and full drives as part of their testing suite (here, for example), but they don't have any reviews for the more interesting drives that came out in the last couple of years, like 990 Pro, SN850X, or KC3000.
Is there anyone else doing these kinds of benchmarks, for an empty and filled drive? It would be a lot better knowing just how bad filling a drive is instead of throwing 20% of it away (some suggest to keep 50% full at most) as some kind of rule of thumb.
I don't keep up with SSD benchmarks, but the mechanism behind this phenomenon is not anything mysterious. Most consumer SSDs ship with TLC or QLC NAND, which supports either 3 or 4 bits of storage per cell. However, writing the full 3 or 4 bits is slower than just writing one bit in each cell, so the drives use available empty NAND as an SLC write cache while the drive is still not full. So when you write to a relatively empty drive, your data will go into the DRAM cache on the controller (if there is any being used as a write buffer) and then get written into available NAND chips in SLC mode. Later on, the drive will consolidate the data down into QLC/TLC properly, but you get the advantage of a fast write so long as there is enough empty NAND to use SLC caching.
Obviously this falls apart once your drive gets close to full and there are no available empty NAND chips to write to as SLC cache. This is also why the write performance of budget drives tends to drop off worse than higher end drives. The nicer drives have faster NAND and usually have DRAM on the SSD controller to help performance in the worst case. Enterprise drives often sidestep this issue entirely via just using SLC or MLC NAND directly, or by having additional overprovisioning (extra NAND chips).
The DRAM cache on NVMe SSDs isn't used for user data.
https://www.reddit.com/r/zfs/comments/wapr7a/intel_to_wind_down_optane_memory_business_3d/ii6vb3m/