public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Stefan Priebe <s.priebe@profihost.ag>
Cc: "xfs-masters@oss.sgi.com" <xfs-masters@oss.sgi.com>,
	"xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [xfs-masters] how to use fstrim?
Date: Wed, 31 Jul 2013 08:34:50 +1000	[thread overview]
Message-ID: <20130730223450.GL13468@dastard> (raw)
In-Reply-To: <51F815EB.9040000@profihost.ag>

On Tue, Jul 30, 2013 at 09:37:15PM +0200, Stefan Priebe wrote:
> Am 27.07.2013 03:50, schrieb Dave Chinner:
> >On Fri, Jul 26, 2013 at 08:17:21PM +0200, Stefan Priebe wrote:
> >>Hi,
> >>
> >>what is the right way to use fstrim on top of XFS? just doing fstrim
> >>-v -m 4194304 /
> >>
> >>results sometimes (might depend on disk i/o) to hanging tasks and
> >>stack traces - fstrim needs > 5 min in these cases.
> >
> >It does indeed depend on disk IO. XFS walks all the free space and
> >issues discards on it, so runtime is always O(freespace). And while
> >it is walking an AG discarding the free space, it will hold the AG
> >locked so that free space doesn't change. This can hang other
> >operations for the length of time it takes to discard all the free
> >space in the AG.
> > IOWs, the behaviour of fstrim on XFS is entirely dependent on the
> > speed of the block layer and hardware implementations of discards.
> 
> Yes OK i understand that but is there any way to prevent getting the
> whole server crash when I/O is too much?

Sorry, what crash are you talking about? IO being slow because you
ran fstrim isn't a crash....

> For example splitting whole disk or even AGs into subparts? Or set a
> timeout for the fstrim command?

You can split fstrim up into smaller sections yourself by using the
range parameters.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-07-30 22:35 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 [this message]
2013-07-31 13:26   ` Greg Freemyer
2013-08-01  0:08     ` Dave Chinner

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=20130730223450.GL13468@dastard \
    --to=david@fromorbit.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