On Wed, Jan 7, 2015 at 1:10 PM, Josef Bacik <jba...@fb.com> wrote:
> On 01/07/2015 12:43 PM, Lennart Poettering wrote:
>>
>> Heya!
>>
>> Currently, systemd-journald's disk access patterns (appending to the
>> end of files, then updating a few pointers in the front) result in
>> awfully fragmented journal files on btrfs, which has a pretty
>> negative effect on performance when accessing them.
>>
>
> I've been wondering if mount -o autodefrag would deal with this problem but
> I haven't had the chance to look into it.

I've been using autodefrag and haven't run into journal corruptions
that I can attribute to btrfs since the last one was fixed over a year
ago. Chris Mason has suggested preference to use of autodefrag for
this use case rather than xattr +C. But I don't know the time frame
for autodefrag by default, it's come up a couple times but it's not
the default yet.

I've found autodefrag journals are less than 200 fragments, and
average between 50-150 fragments. Without it, this spirals into
thousands quite quickly. Searches don't seem slower when journal files
are made of a few extents vs ~ 100, but beyond several hundred let
alone several thousand it becomes noticeable.

A somewhat minor negative of +C: In case of RAID 1 or higher and
silent data corruption, there will be no Btrfs detection due to lack
of checksum and therefore no correction. In the case a drive reports a
read error then it's corrected, same as with md or lvm raid1+.


-- 
Chris Murphy
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to