From: Li Zefan <lizf@cn.fujitsu.com>
To: Chester <somethingsome2000@gmail.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: defrag makes fragmentation worse
Date: Tue, 11 Oct 2011 14:19:44 +0800 [thread overview]
Message-ID: <4E93E000.1000700@cn.fujitsu.com> (raw)
In-Reply-To: <CAAE6i0gReLmmqvi3HXAAzjR6jgTScuqRwmdnUsEk0bY9yaCPHQ@mail.gmail.com>
Chester wrote:
> Kernel 3.1-rc8
> btrfs-progs-0.19
> mount options: noatime,autodefrag (space_cache is enabled)
> There are snapshots present on the filesystem.
>
> When I do a btrfs fi defrag on a file, the file becomes much more
> fragmented. The end result can be a file with 20k times more fragments
> than before. Initially I thought the extents were just smaller but
> were next to each other, so I checked with both 'filefrag' as well as
> 'filefrag -v'. Both reported the same number. I don't know if this has
> anything to do with having snapshots at all because files that haven't
> been snapshotted yet are affected by this. Disk space isn't an issue
> since my 1TB disk isn't even halfway filled, and moving the file
> around actually gives me fairly contiguous files.
Was any process doing heavy I/O work while you were defragging the file?
Could you try to remount the fs without autodefrag, and defrag
the file again? Firstly let's see if autodefrag makes things worse.
next prev parent reply other threads:[~2011-10-11 6:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-08 22:17 defrag makes fragmentation worse Chester
2011-10-11 6:19 ` Li Zefan [this message]
2011-10-11 20:47 ` Chester
[not found] ` <CAAE6i0j=7ZoYnXsmNdWewmszSpaq4HLcy+M7--3s2hiy2p4TBA@mail.gmail.com>
2011-10-12 2:37 ` Li Zefan
2011-10-12 4:14 ` Chester
2011-10-12 15:14 ` Chris Mason
-- strict thread matches above, loose matches on Subject: below --
2011-06-09 22:48 Johannes Hirte
2011-06-09 23:53 ` David Sterba
2011-06-23 0:12 ` Johannes Hirte
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=4E93E000.1000700@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=somethingsome2000@gmail.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