(Trying again in plain text and without the 100KiB log file.)

Hi linux-btrfs,

The context of these three questions is that I'm experiencing
occasional hangs for several seconds while btrfs-transacti works, and
very long boot times. General comments welcome. System info at bottom,
end part of dmesg.log attached.

Q1:

I keep a lot of read-only snapshots (> 300 total) of all of my
subvolumes and haven't deleted any so far. Is this in itself a problem
or unanticipated use of btrfs?

Q2:

I have some files that remain heavily fragmented (according to
filefrag) even after I run btrfs fi defragment. I think this happens
because btrfs doesn't want to unlink parts of the files from their
snapshotted copies. Can I tell btrfs to defragment them anyway, and
not worry about wasting space? And can I make the autodefrag mount
option do this?

For example (not all output shown):

# filefrag *
...
system@1973a03e3af1449ba5dd93362953fd5f-0000000000000001-00051f9377f11af6.journal:
553 extents found
...

# btrfs fi defragment -rf .

# filefrag *
...
system@1973a03e3af1449ba5dd93362953fd5f-0000000000000001-00051f9377f11af6.journal:
331 extents found
...


Q3:

What's the best way to tell which files are causing the hangs? My
current method is to make an educated guess (e.g. think of programs
that store large database files) then use filefrag to see if there's
fragmentation. I'm not confident I've found all the sources of bad
performance.

Thanks,
  James


System info:

[root@angel-nixos:~]# uname -a
Linux angel-nixos 3.18.20 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970
x86_64 GNU/Linux

[root@angel-nixos:~]# btrfs --version
btrfs-progs v4.2

[root@angel-nixos:~]# btrfs fi show
Label: 'AngelBtrfs'  uuid: 7f4b4b5d-1ba5-46cc-b782-938e3600a427
        Total devices 2 FS bytes used 1.06TiB
        devid    5 size 2.00TiB used 1.07TiB path /dev/mapper/KfricBtrSec
        devid    6 size 2.00TiB used 1.07TiB path /dev/mapper/SfricBtrSec

btrfs-progs v4.2

[root@angel-nixos:~]# btrfs fi df /
Data, RAID1: total=1.01TiB, used=1.01TiB
System, RAID1: total=32.00MiB, used=192.00KiB
Metadata, RAID1: total=60.00GiB, used=58.65GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

Attachment: end_of_dmesg.log
Description: Binary data

Reply via email to