But if the file system needs extra writes anyway for CoW, and the SSD needs its own CoW, then wouldn’t that end up being exponential writes? Or is there some mechanism which mitigates that?
It’s interesting, however, if you mkfs.ext4 without -E ssd, or through some weirdness in your driver chain the filsystem doesn’t know it can discard, then everything everywhere sucks for everyone, a cow fs is worse because no blocks are ever overwritten till the end, and the block map becomes a disaster while performance goes down the drain.
Nowadays this rarely happens outside of very broken USB mass storage chips.
The CoW nature of Btrfs means it’s often slower than ext4 for common tasks, right? It also means more writes to your SSDs.
I’ve stuck to ext4 so far, as someone who doesn’t really have a need for snapshotting.
Edit: I’m not an expert on file systems in the least, so do chime in if these assumptions are incorrect.
Meh, ssds are basically cow by nature anyway, you have to erase large blocks, you can’t just rewrite into them.
But if the file system needs extra writes anyway for CoW, and the SSD needs its own CoW, then wouldn’t that end up being exponential writes? Or is there some mechanism which mitigates that?
The fs does cow then releases the old block if appropriate.
The ssd has a tracking map for all blocks, it’s cow relies on a block being overwritten to free the old block.
Basically it works out the same either way.
Thanks
It’s interesting, however, if you mkfs.ext4 without -E ssd, or through some weirdness in your driver chain the filsystem doesn’t know it can discard, then everything everywhere sucks for everyone, a cow fs is worse because no blocks are ever overwritten till the end, and the block map becomes a disaster while performance goes down the drain.
Nowadays this rarely happens outside of very broken USB mass storage chips.
This is why we used to have the fstrim command.