Re: Is autodefrag recommended?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux