On 27/04/2020 17:59, Rich Freeman wrote:
Really though a better solution than any of this is for the filesystem to be more SSD-aware and just only perform writes on entire erase regions at one time. If the drive is told to write blocks 1-32 then it can just blindly erase their contents first because it knows everything there is getting overwritten anyway. Likewise a filesystem could do its own wear-leveling also, especially on something like flash where the cost of fragmentation is not high. I'm not sure how well either zfs or ext4 perform in these roles. Obviously a solution like f2fs designed for flash storage is going to excel here.
The problem here is "how big is an erase region". I've heard comments that it is several megs. Trying to consolidate writes into megabyte blocks is going to be tricky, to say the least, unless you're dealing with video files or hi-res photos - I think the files my camera chucks out are in the 10MB region ... (24MP raw...)
Cheers, Wol