From: Phil Karn <karn@ka9q.net>
To: Lukas Czerner <lczerner@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: automatically running fstrim
Date: Wed, 25 May 2011 15:36:14 -0700 [thread overview]
Message-ID: <4DDD845E.9090709@ka9q.net> (raw)
In-Reply-To: <alpine.LFD.2.00.1105251335280.4667@dhcp-27-109.brq.redhat.com>
On 5/25/11 4:47 AM, Lukas Czerner wrote:
> unlinked often). Unfortunately xfs does not have this support yet, but
> other filesystems do (ext4,btrfs,...) so if you like you might try one
> of those and mount it with -o discard mount option. What it does is,
> that it will send a TRIM for every range of freed filesystem blocks.
>
> Generally, in its current state it comes with quite big performance
> loss (that's why we have fstrim), but in you case it might be actually
> more convenient than running fstrim all the time. Also it is handled
> automatically and the only think needed is to pass the "-i discard"
> mount option.
I have thought of using ext4 with the discard option on that device for
just this reason. But this OCZ Revo SSD seems to execute TRIM rather
slowly. I just timed it at 7 minutes 38 seconds to trim 46 GB of free
space on a 90 GB SSD. I wouldn't want that to occur in the foreground
while I'm running a program that's generating a lot of garbage blocks.
Intel drives, at least, seem to execute TRIM much faster; I think they
can take more blocks in each operation, and I conjecture that the drive
controller simply adds them to a "to do" list for later erasure in the
background. So there should probably be an option for "real-time" TRIM
on those SSDs that can do it without a performance penalty.
It would be nice if the fitrim ioctl were to issue TRIM commands only
for newly created garbage blocks that haven't already been trimmed. But
I guess that would require some major changes to the file system data
structures. At the least, it would require some special record-keeping
to keep track of this information. The Intel drive shows it's possible
to implement a very speedy TRIM, so maybe it won't be such a bad thing
to just trim the whole free list every time.
Phil
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-05-25 22:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 16:53 automatically running fstrim Phil Karn
2011-05-25 10:06 ` Lukas Czerner
2011-05-25 11:20 ` Phil Karn
2011-05-25 11:47 ` Lukas Czerner
2011-05-25 22:36 ` Phil Karn [this message]
2011-05-26 7:56 ` Lukas Czerner
2011-05-26 9:11 ` Dave Chinner
2011-05-26 9:57 ` Lukas Czerner
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=4DDD845E.9090709@ka9q.net \
--to=karn@ka9q.net \
--cc=lczerner@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.