FS#61399 - [linux-lts] btrfs mount with 4.19 3x slower than 4.14

Attached to Project: Arch Linux
Opened by desbma (desbma) - Monday, 14 January 2019, 12:23 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 28 December 2019, 12:59 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

I have a /data BTRFS partition that is very slow to mount with kernel linux-lts-4.19.14-1: about ~18s.

The partition is mounted on boot by systemd, but it is reproducible by uounting and then mounting it again.

Reverting back to linux-lts-4.14.90-1 it mounts in ~6s (which I already consider slow).

The only mount options I have in fstab are: noatime,flushoncommit

The partition is of ~4TB and about 90% full. It is backed by a LUKS block device, but my other LUKS partitions with ext4 above mount in an instant.
dmesg does not show any warning or error.

I tried:
* running a balance with: sudo btrfs balance start -dusage=50 -musage=50 /data
* removing the flushoncommit mount option

None of that made the mount faster.

Any idea?
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Saturday, 28 December 2019, 12:59 GMT
Reason for closing:  Upstream
Comment by desbma (desbma) - Sunday, 03 February 2019, 00:52 GMT
I managed to go back to 4.14 mount speed by disabling blk_mq with boot parameter 'scsi_mod.use_blk_mq=0'
Comment by Andreas Radke (AndyRTR) - Tuesday, 10 December 2019, 13:28 GMT
Is this still an issue?
Comment by desbma (desbma) - Friday, 27 December 2019, 23:18 GMT
I just tried to boot without 'scsi_mod.use_blk_mq=0' on the 4.19.91-1-lts kernel, and 'systemd-analyze plot' tells me the mount operation takes ~11s instead of 6.

So it's still al lot slower but it has improved...
Comment by Andreas Radke (AndyRTR) - Saturday, 28 December 2019, 12:59 GMT
You may want to contact btfs upstream kernel maintainers to inform them about the slowness. It's not a packaging issue it seems-

Loading...