I have a system with 10 NVMe disks á 15 TB in an MD RAID10 with LVM and xfs filesystem.
With RHCK kernel, i can run fstrim on a 15 TB filesystem in 3 minutes. With UEK kernel, it takes more than 4 minutes for 10 MB!
In lsblk --discard, I can see that with RHCK kernel, column "DISC-MAX" is set to 2T for block device, partition, md device, and lv device, whereas in UEK kernel, it is set to 64k for RAID device and LV device.
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
nvme0n1 0 512B 2T 0
└─nvme0n1p1 0 512B 2T 0
└─md125 0 512B 64K 0
├─vg_nvmedata-lv_test 0 512B 64K 0
Any idea to get RHCK performance with UEK kernel for fstrim?
UEK: 5.4.17-2136.304.4.1.el8uek.x86_64
RHCK: 4.18.0-348.12.2.el8_5.x86_64