1. 1

  2. 1

    Unfortunately bad or unpredicatable TRIM performance is still an issue today, as explained by this Facebook engineer:

    Zhou works for Facebook, where discard is enabled, but the results are not great; there is a fair amount of latency observed as the flash translation layer (FTL) shuffles blocks around for wear leveling and/or garbage collection. Facebook runs a periodic fstrim to discard unused blocks; that is something that the Cassandra database recommends for it users. The company also has an internal delete scheduler that slowly deletes files, but the FTL can take an exorbitant amount of time when gigabytes of files are deleted; read and write performance can be affected. It is “kind of insane” that applications need to recognize that they can’t issue a bunch of discards at one time; he wondered if there is a better way forward.