On Sat, Nov 05, 2011 at 09:07:05PM +0100, Martin Rusko wrote:
> SSD drive in question is one of the latest with SF-2281 chipset. I
> expected, that TRIM function will just schedule sectors for garbage
> collection, which happens some time later (during which drive can be
> potentially slower). Trying the same tests with ext4 filesystem, it
> got following numbers.
That's unfortunately not how it works - the TRIM command always drains
the whole queue of outstanding requests, and thus has a fairly severe
impact on performance. We could reduce it a bit by using vectored
trims like Windows does, but the Linux blocklayer doesn't have the
infrastructure for that yet.
Your workload will remove a lot of inode clusters on XFS, while ext4
never deletes inodes. Using the ikeep mount option for XFS (can't be
set during remount) should speed the performance with discard for
your workload up a lot. I would still recommand to do a periodic
fstrim run instead, though.