From: Dave Chinner <david@fromorbit.com>
To: Greg Freemyer <greg.freemyer@gmail.com>
Cc: "xfs-masters@oss.sgi.com" <xfs-masters@oss.sgi.com>,
"xfs@oss.sgi.com" <xfs@oss.sgi.com>,
Stefan Priebe <s.priebe@profihost.ag>
Subject: Re: [xfs-masters] how to use fstrim?
Date: Thu, 1 Aug 2013 10:08:45 +1000 [thread overview]
Message-ID: <20130801000845.GG7118@dastard> (raw)
In-Reply-To: <CAGpXXZ+no_YcepmwMopFDYO_6PR6jOop9UpY_mAcaPbLA6CYkg@mail.gmail.com>
On Wed, Jul 31, 2013 at 09:26:35AM -0400, Greg Freemyer wrote:
> On Fri, Jul 26, 2013 at 9:50 PM, Dave Chinner <david@fromorbit.com> wrote:
> > IOWs, the behaviour of fstrim on XFS is entirely dependent on the
> > speed of the block layer and hardware implementations of discards.
>
> And on a lot of SSDs, trim seems to act like a cache flush so it can
> hit performance hard.
That's because TRIM on SATA3 is an unqueued command. It basically
causes the pipeline to be emptied before it can be issued, and no
further IO can be issued until it completes. SATA3.1 is supposed to
add a queued TRIM command, but it might be some time before we see
that appearing in hardware...
> It should be scheduled for off-peak times
> afaik. It's not critical to run hourly or even daily. If you can
> schedule it once a week when other i/o is light that should be enough
> for most workloads.
I run it once every couple of months on my SSDs, if ever. Most
modern SSDs have background defragmentation so if they are left idle
for a couple of hours they clean themselves up pretty well without
needing TRIM...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2013-08-01 0:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-26 18:17 how to use fstrim? Stefan Priebe
2013-07-26 21:37 ` Eric Sandeen
2013-07-27 1:50 ` [xfs-masters] " Dave Chinner
2013-07-30 19:37 ` Stefan Priebe
2013-07-30 22:34 ` Dave Chinner
2013-07-31 13:26 ` Greg Freemyer
2013-08-01 0:08 ` Dave Chinner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130801000845.GG7118@dastard \
--to=david@fromorbit.com \
--cc=greg.freemyer@gmail.com \
--cc=s.priebe@profihost.ag \
--cc=xfs-masters@oss.sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox