xfs
[Top] [All Lists]

Re: Online TRIM/discard performance impact

To: Martin Rusko <martin.rusko@xxxxxxxxx>
Subject: Re: Online TRIM/discard performance impact
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 7 Nov 2011 05:21:21 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <CAMYYbY7=tRU1bmHkeBMesSC1jgXXz7J8-eUFm5VenVam3g1+nA@xxxxxxxxxxxxxx>
References: <CAMYYbY7=tRU1bmHkeBMesSC1jgXXz7J8-eUFm5VenVam3g1+nA@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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.

<Prev in Thread] Current Thread [Next in Thread>