From: Miroslav Cimerman <mc@raidlab.org>
To: antosha20xx@gmail.com
Cc: linux-raid@vger.kernel.org
Subject: Re: xor_gen() md-raid6 performance improvement
Date: Tue, 10 Nov 2026 14:37:56 +0100 [thread overview]
Message-ID: <20261110133756.63676-1-mc@raidlab.org> (raw)
In-Reply-To: <CAAiJnjr6fxY1LKmrYbradXPoxW+cS28uLo6VxYkwLxXsTcY4gg@mail.gmail.com>
Hi Anton,
thanks for sharing the numbers. I recently submitted a raid6 patch that
makes read-modify-writes faster, at least on the Intel machines I have.
If you have time, could you please test it on your Zen 5 box?
https://lore.kernel.org/all/20261109030805.25709-1-mc@raidlab.org/
It changes xor_syndrome(), which md uses for small read-modify-writes.
Your 2 MiB sequential test does not use it, as full-stripe writes
compute P and Q with gen_syndrome(). Random 4 KiB writes do use it,
i.e. --rw=randwrite --bs=4k:
echo 2 > /sys/block/md111/md/rmw_level
fio --name=test --rw=randwrite --bs=4k --filename=/dev/md111 \
--direct=1 --numjobs=1 --iodepth=64 --exitall --group_reporting \
--ioengine=io_uring --size=100g --runtime=60 --time_based=1
rmw_level=2 is needed on a 4+2 array: a read-modify-write and
a reconstruct-write both need 3 reads there, and by default md picks
reconstruct-write on a tie (1 is the default).
One job at QD64 should be enough. md's single raid6 thread should be
the limit. If the md111_raid6 thread is not near 100% in "top -H", try
--numjobs=4 --iodepth=32.
If md111 has the new lockless bitmap and was created without
--assume-clean, md uses reconstruct-writes in regions not written since
the array was created. Adding --size=100g to fio keeps the writes in
the start of the array, which your sequential tests have probably
already written.
Also please make sure that no resync is in progress.
My numbers were measured without a write-intent bitmap, so the
difference may be smaller with one.
Please make sure that both runs, with and without the patch, use
avx512x4:
dmesg | grep 'raid6: using algorithm' | tail -1
The kernel picks the implementation by gen_syndrome() speed when
raid6_pq is loaded, and the patch only changes the x4 versions (x1 and
x2 already use normal stores). If another one is picked, reloading
raid6_pq with md111 stopped runs the benchmark again, or I can send a
two-line test-only change that forces avx512x4.
Either way, sharing your numbers would help, and a reply with Tested-by
to the patch if it works for you would be very appreciated.
Thanks,
Miroslav
next prev parent reply other threads:[~2026-11-10 13:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 18:37 xor_gen() md-raid6 performance improvement Anton Gavriliuk
2026-11-06 21:17 ` Dragan Milivojević
2026-11-10 13:37 ` Miroslav Cimerman [this message]
2026-11-10 17:07 ` Anton Gavriliuk
2026-11-10 17:12 ` Anton Gavriliuk
2026-11-10 18:57 ` Miroslav Cimerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261110133756.63676-1-mc@raidlab.org \
--to=mc@raidlab.org \
--cc=antosha20xx@gmail.com \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox