From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: autodefrag by default, was: Lots of harddrive chatter
Date: Sun, 21 Jul 2013 22:01:55 +0000 (UTC) [thread overview]
Message-ID: <pan$7e18b$b2c36a61$b1f22c8c$6c61ba6e@cox.net> (raw)
In-Reply-To: 09A15D35-4874-4650-93F1-1E151076C498@colorremedies.com
Chris Murphy posted on Sun, 21 Jul 2013 10:20:48 -0600 as excerpted:
> On Jul 21, 2013, at 4:38 AM, Duncan <1i5t5.duncan@cox.net> wrote:
>>
>> What I'd suggest is to turn on the btrfs autodefrag mount option, and
>> to do it *BEFORE* you start installing stuff on the filesystem.
>
> Is there a good reason why autodefrag is not a default mount option?
Well, there's the obvious, that btrfs is still in development, lacking
such things as the ability to set such options by default using btrfs-
tune, and likely with the question of what should be the defaults still
unresolved for many cases.
Autodefrag can also negatively affect performance especially if it's not
on from the beginning, AND at least at one point earlier in btrfs
evolution (I'm not sure if it's fixed now or not), the performance for
very large and often written into files such as virtual-machine images
and large databases was bad, since it could mean constantly rewriting
entire large files instead of just the smaller changing pieces of them,
thereby being a performance killer for that type of job load.
>> I believe
>> it's a known issue that a number of distro installers (what arch does
>> I'm not sure) tend to fragment their files pretty badly right off the
>> bat if you let them. This would happen if they write data into an
>> existing file, perhaps because they install a package and then
>> customize the config files, or if they don't write whole files at once.
>> And a lot of btrfs installs don't turn on the autodefrag option when
>> they do thet first auto-
>> mount to install stuff.
>
> Some installer teams are understandably reluctant to use non-default
> mount options.
It's worth keeping in mind the bigger picture, tho, that in the case of
btrfs they're using a still in development filesystem (even if it's not
the default, the fact that so few people come here unaware of the wiki or
btrfs status as a development filesystem IMO indicates that installers
aren't including the warnings about making such even non-default choices
that they arguably should be including) where all recommendations are to
be ready for loss of data should it occur, as it's a definitely more
likely possibility than it should be with a stable filesystem. With that
in mind, playing with non-default mount options seems rather trivial by
comparison.
Still, the previously mentioned constantly written large vm/db file use-
case is a big one these days, and with the general purpose installation
often not having dedicated partitions for such things (btrfs subvolumes
don't yet allow per-subvolume setting of such options)...
But for the generally much different use-case of a system volume where
all the system binaries and config is stored, autodefrag makes a lot of
sense to enable by default.
Or installers could simply be better about not writing into existing
files in the installation in the first place, so people could turn it on
right after installation and not have to worry about existing
fragmentation. But... installing to btrfs is really a reasonably new
situation, and I'd guess "best practices" are still evolving just as the
filesystem itself is.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2013-07-21 22:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-20 15:15 Lots of harddrive chatter on after booting with btrfs on root (slow boot) Jason Russell
2013-07-20 15:52 ` George Mitchell
2013-07-20 22:14 ` Lukas Martini
2013-07-20 22:47 ` Gabriel de Perthuis
2013-07-21 10:38 ` Duncan
2013-07-21 16:20 ` autodefrag by default, was: Lots of harddrive chatter Chris Murphy
[not found] ` < pan$3c802$83940fc4$86279b1e$4ddf0e4e@cox.net>
[not found] ` < 09A15D35-4874-4650-93F1-1E151076C498@colorremedies.com>
2013-07-21 22:01 ` Duncan [this message]
2013-07-21 23:44 ` George Mitchell
2013-07-22 3:37 ` Shridhar Daithankar
2013-07-22 3:53 ` George Mitchell
2013-07-22 4:11 ` Shridhar Daithankar
[not found] ` < pan$7e18b$b2c36a61$b1f22c8c$6c61ba6e@cox.net>
[not found] ` <51EC7249.3010005@chinilu.com >
2013-07-22 12:09 ` Duncan
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='pan$7e18b$b2c36a61$b1f22c8c$6c61ba6e@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).