From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Hugo Mills <hugo@carfax.org.uk>, Marat Khalili <mkh@rqc.ru>,
linux-btrfs@vger.kernel.org
Subject: Re: Is autodefrag recommended?
Date: Tue, 5 Sep 2017 07:45:55 -0400 [thread overview]
Message-ID: <533ebd2e-8b95-d875-4cbc-48821b150eac@gmail.com> (raw)
In-Reply-To: <20170904105444.GA23980@carfax.org.uk>
On 2017-09-04 06:54, Hugo Mills wrote:
> On Mon, Sep 04, 2017 at 12:31:54PM +0300, Marat Khalili wrote:
>> Hello list,
>> good time of the day,
>>
>> More than once I see mentioned in this list that autodefrag option
>> solves problems with no apparent drawbacks, but it's not the
>> default. Can you recommend to just switch it on indiscriminately on
>> all installations?
>>
>> I'm currently on kernel 4.4, can switch to 4.10 if necessary (it's
>> Ubuntu that gives us this strange choice, no idea why it's not 4.9).
>> Only spinning rust here, no SSDs.
>
> autodefrag effectively works by taking a small region around every
> write or cluster of writes and making that into a stand-alone extent.
I was under the impression that it had some kind of 'random access'
detection heuristic, and onky triggered if that flagged the write
patterns as 'random'.
>
> This has two consequences:
>
> - You end up duplicating more data than is strictly necessary. This
> is, IIRC, something like 128 KiB for a write.
FWIW< I'm pretty sure you can mitigate this first issue by running a
regular defrag on a semi-regular basis (monthly is what I would probably
suggest).
>
> - There's an I/O overhead for enabling autodefrag, because it's
> increasing the amount of data written.
And this issue may not be as much of an issue. The region being
rewritten gets written out sequentially, so it will increase the amount
of data written, but in most cases probably won't increase IO request
counts to the device by much. If you care mostly about raw bandwidth,
then this could still have an impact, but if you care about IOPS, it
probably won't have much impact unless you're already running the device
at peak capacity.
next prev parent reply other threads:[~2017-09-05 11:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-04 9:31 Is autodefrag recommended? Marat Khalili
2017-09-04 10:23 ` Henk Slager
2017-09-04 10:34 ` Duncan
2017-09-04 11:09 ` Henk Slager
2017-09-04 22:27 ` Duncan
2017-09-04 10:54 ` Hugo Mills
2017-09-05 11:45 ` Austin S. Hemmelgarn [this message]
2017-09-05 12:49 ` Henk Slager
2017-09-05 13:00 ` Austin S. Hemmelgarn
2017-09-05 12:36 ` A L
2017-09-05 14:01 ` Is autodefrag recommended? -- re-duplication??? Marat Khalili
2017-09-05 14:39 ` Hugo Mills
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=533ebd2e-8b95-d875-4cbc-48821b150eac@gmail.com \
--to=ahferroin7@gmail.com \
--cc=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=mkh@rqc.ru \
/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.