linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* btrfs fi defrag -r -t 32M? What is actually happening?
@ 2016-07-26 23:03 Nicholas D Steeves
  2016-07-27  1:10 ` Duncan
  0 siblings, 1 reply; 8+ messages in thread
From: Nicholas D Steeves @ 2016-07-26 23:03 UTC (permalink / raw)
  To: Btrfs BTRFS

Hi,

I've been using btrfs fi defrag with out the "-r -t 32M" option for
regular maintenance.  I just learned, in
Documentation/btrfs-convert.asciidoc, that there is a recommendation
to run with "-t 32M" after a conversion from ext2/3/4.  I then
cross-referenced this with btrfs-filesystem(8), and found that:

    Extents bigger than value given by -t will be skipped, otherwise
    this value is used as a target extent size, but is only advisory
    and may not be reached if the free space is too fragmented. Use 0
    to take the kernel default, which is 256kB but may change in the
    future.

I understand the default behaviour of target extent size of 256kB to
mean only defragment small files and metadata.  Or does this mean that
the default behaviour is to defragment extent tree metadata >256kB,
and then defragment the (larger than 256kB) data from many extents
into a single extent?  I was surprised to read this!

What's really happening with this default behaviour?  Should everyone
be using -t with a much larger value to actually defragment their
databases?

Thanks,
Nicholas

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-29  3:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-26 23:03 btrfs fi defrag -r -t 32M? What is actually happening? Nicholas D Steeves
2016-07-27  1:10 ` Duncan
2016-07-27 17:19   ` btrfs fi defrag does not defrag files >256kB? Nicholas D Steeves
2016-07-28  5:14     ` Duncan
2016-07-28 10:55     ` David Sterba
2016-07-28 17:25       ` Duncan
2016-07-28 17:53       ` Nicholas D Steeves
2016-07-29  3:56         ` Duncan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).