Re: ext4 writeback performance issue in 6.12

From: Matt Fleming
Date: Fri Oct 10 2025 - 08:42:57 EST


On Thu, Oct 09, 2025 at 10:04:10PM -0400, Theodore Ts'o wrote:
>
> OK, so that definitely confirms the theory of what's going on. There
> have been some changes in the latest kernel that *might* address what
> you're seeing. The challenge is that we don't have a easy reproducer
> that doesn't involve using a large file system running a production
> workload. If you can only run this on a production server, it's
> probably not fair to ask you to try running 6.17.1 and see if it shows
> up there.

FWIW we will likely pick up the next LTS so I can get you an answer but
it might take a few months :)

> I do think in the long term, we need to augment thy buddy bitmap in
> fs/ext4/mballoc.c with some data structure which tracks free space in
> units of stripe blocks, so we can do block allocation in a much more
> efficient way for RAID systems. The simplest way would be to add a
> counter of the number of aligned free stripes in the group info
> structure, plus a bit array which indicates which aligned stripes are
> free. This is not just to improve stripe allocation, but also when
> doing sub-stripe allocation, we preferentially try allocating out of
> stripes which are already partially in use.
>
> Out of curiosity, are you using the stride parameter because you're
> using a SSD-based RAID array, or a HDD-based RAID array?

We're using SSD-based RAID 0 with 10 disks.

$ sudo dumpe2fs -h /dev/md127| grep -E "stride|stripe"
dumpe2fs 1.47.0 (5-Feb-2023)
RAID stride: 128
RAID stripe width: 1280