Re: Feature requests: online backup - defrag - change RAID level

Remi Gauvin
2019-09-12T03:30:48Z

[-- Attachment #1.1: Type: text/plain, Size: 1979 bytes --]

On 2019-09-11 11:05 p.m., webmaster@zedlx.com wrote:

>
> Close, but essentially: yes. I'm implying that snapshots induce future
> fragmentation. The mere act of snapshoting won't create fragments
> immediately, but if there are any future writes to previously snapshoted
> files, those writes are likely to cause fragmentation. I think that this
> is not hard to figure out, but if you wish, I can elaborate further.

You'll have too, because the only way snapshots contribute to future
fragmentation is if you use NoCow attribute, (an entirely different
kettle of fish there.)

>
> The real question is: does it really matter? Looking at the typical home
> user, most of his files rarely change, they are rarely written to. More
> likely, most new writes will go to new files. So, maybe the "home user"
> is not the best study-case for defragmentation. He has to be at least
> some kind of power-user, or content-creator to experience any
> significant fragmentation.

Torrent Downloaders should make an *excellent* case study, and not uncommon.

>
> Btrfs defrag works just fine until you get some serious fragmentation.
> At that point, if you happen to have some snapshots, you better delete
> them before running defrag. Because, if you do run defrag on snapshoted
> and heavily fragmented filesystem, you are going to run out of disk
> space really fast.
>

Agreed that if you have large files subject to fragmentation, (a special
use case for which BTRFS is arguably not the best fit, at least, in
terms of performance,) you need to take special care with
fragmentation.. ie,, defrag before snapshotting when possible.

>
> Didn't someone say, earlier in this discussion, that the defrag is
> important for btrfs. I would guess that it is. On many OSes defrag is
> run automatically. All older filesystems have a pretty good defrag.

This statement makes me wonder if you really belong on a Linux
Development list.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]