Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btrfs filesystem show takes a long time #148

Open
kdave opened this issue Sep 14, 2018 · 3 comments
Open

btrfs filesystem show takes a long time #148

kdave opened this issue Sep 14, 2018 · 3 comments
Labels
bug

Comments

@kdave
Copy link
Owner

@kdave kdave commented Sep 14, 2018

the command btrfs fi show takes too much time:

time btrfs fi show              
Label: none  uuid: 513dc574-e8bc-4336-b181-00d1e9782c1c
Total devices 2 FS bytes used 2.34GiB
devid    1 size 927.79GiB used 4.03GiB path /dev/sdv2
devid    2 size 927.79GiB used 4.03GiB path /dev/sdar2

real    12m59.763s
user    0m0.008s
sys     0m0.044s
time btrfs fi show
Label: none  uuid: 513dc574-e8bc-4336-b181-00d1e9782c1c
Total devices 2 FS bytes used 2.34GiB
devid    1 size 927.79GiB used 4.03GiB path /dev/sdv2
devid    2 size 927.79GiB used 4.03GiB path /dev/sdar2

real    6m22.498s
user    0m0.012s
sys     0m0.024s
time btrfs fi show
Label: none  uuid: 513dc574-e8bc-4336-b181-00d1e9782c1c
Total devices 2 FS bytes used 2.34GiB
devid    1 size 927.79GiB used 4.03GiB path /dev/sdv2
devid    2 size 927.79GiB used 4.03GiB path /dev/sdar2

real    6m19.796s
user    0m0.012s
sys     0m0.024s

Maybe its related to that I've some harddisk in my system:

ls /dev/disk/by-path/ |grep -v part |wc -l
44

This is also a known Debian Bug #891717

-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-5-amd64 (SMP w/20 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages btrfs-progs depends on:

ii  e2fslibs    1.43.4-2
ii  libblkid1   2.29.2-1
ii  libc6       2.24-11+deb9u1
ii  libcomerr2  1.43.4-2
ii  liblzo2-2   2.08-1.2+b2
ii  libuuid1    2.29.2-1
ii  zlib1g      1:1.2.8.dfsg-5
@kdave kdave added the bug label Sep 14, 2018
@1n5aN1aC
Copy link

@1n5aN1aC 1n5aN1aC commented Sep 14, 2018

I'd like to add that I also have this 'issue' but in my case, it finds and prints all my btrfs filesystems nearly instantly. Only after that does it sit there waiting for 30+ seconds before finally returning.

btrfs fi show /mnt/data returns nearly instantly.

@colttt
Copy link

@colttt colttt commented Jan 17, 2019

a new update:

time strace -ir -o btrfs_out_2.log btrfs fi show
Label: none  uuid: 24be286b-ece6-4481-aa48-af255e96e5bd
        Total devices 2 FS bytes used 1.21GiB
        devid    1 size 219.84GiB used 5.03GiB path /dev/sdb2
        devid    2 size 219.84GiB used 5.03GiB path /dev/sde2


real    0m32.085s
user    0m0.248s
sys     0m1.416s

and the strace output:
btrfs_out_2.log

@colttt
Copy link

@colttt colttt commented Jan 18, 2019

ok an other update, it happens also with kernel 4.19 and btrfs-tools 4.17

time strace -ir -o btrfs_out_4.19_2.log btrfs fi show
Label: none  uuid: 24be286b-ece6-4481-aa48-af255e96e5bd
        Total devices 2 FS bytes used 1.79GiB
        devid    1 size 219.84GiB used 4.03GiB path /dev/sdb2
        devid    2 size 219.84GiB used 4.03GiB path /dev/sde2


real    0m34.065s
user    0m0.356s
sys     0m1.717s

sometimes it works within 3-4s, I can't see a pattern.

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.6 (stretch)
Release:        9.6
Codename:       stretch
###
uname -a
Linux tani 4.19.0-0.bpo.1-amd64 #1 SMP Debian 4.19.12-1~bpo9+1 (2018-12-30) x86_64 GNU/Linux
###
ii  btrfs-progs                         4.17-1~bpo9+1+b1               amd64        Checksumming Copy on Write Filesystem utilities

and here the strace output
btrfs_out_4.19_2.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.