From: Daejun Park <pdaejun@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: daejun7.park@samsung.com, Carlos Maiolino <cem@kernel.org>,
linux-xfs@vger.kernel.org, Dave Chinner <dgc@kernel.org>,
"Darrick J. Wong" <djwong@kernel.org>,
Amir Goldstein <amir73il@gmail.com>,
Brian Foster <bfoster@redhat.com>,
Pankaj Raghav <pankaj.raghav@linux.dev>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] xfs: skip the fsync flush when a later flush has completed
Date: Fri, 4 Dec 2026 16:23:06 +0900 [thread overview]
Message-ID: <20261204072352.4356-1-pdaejun@gmail.com> (raw)
In-Reply-To: <20261130125841.GB27971@lst.de>
On Mon, Nov 30, 2026 at 01:58:41PM +0100, Christoph Hellwig wrote:
> > 32 AGs, 512 clients: 4812 -> 3256, 0.5 -> 21.6 s
[...]
> The 32 AGs, 512 default number looks a bit worrysome. What is the
> file system and log size in this case?
80 GiB with a 64 MiB internal log. The log is the mkfs.xfs 6.6.0
default; I set agcount=32 by hand. With 8 CPUs, mkfs.xfs 7.1.1 gives
this device 4 AGs, or 8 if it is non-rotational. With 8 AGs, the 64 MiB
log and a write back cache, 6 boots per kernel:
clients MB/s base -> v3 v3 vs base, 95% CI max latency (median)
128 1786 -> 6587 +269% [+261, +276] 0.4 -> 0.4 s
256 3090 -> 4650 +51% [+47, +54] 0.3 -> 4.1 s
512 4202 -> 4638 +10% [+7, +14] 0.4 -> 24.9 s
1024 4358 -> 4532 +4% [+0, +8] 10.2 -> 27.1 s
With the default AG count, v3 shows no throughput loss, but the long
latencies remain.
[...]
> And this looks really weird. The changes are fairly minimal, but
> if reproducible something is wrong as we should not slow down
> workloads that do not have a volatile write cache.
Thanks. On a write through device, with 24 runs per kernel instead of 3
over 6 boots, the slowdown did not reproduce:
v3 vs base, 95% CI
4 AGs, 256 clients +0.6% [-1.3, +2.6]
32 AGs, 512 clients 0.0% [-1.1, +1.1]
> Is this just the extra atomics? Can you check if the overhead
> disappears if you only maintain the counters if data or rt device
> cache flushes are needed)?
In the dbench runs above, gating the counters on bdev_write_cache()
showed no gain. With the CPU as the limit, the counters seem to cost
about 2.5% at 8 and 16 jobs: fio 4 KiB overwrites with fdatasync on a
write through null_blk, 6 boots per kernel:
jobs v3 vs base, 95% CI gated vs base
1 -0.4% [-1.2, +0.5] -0.5% [-1.5, +0.6]
8 -2.6% [-5.2, +0.0] 0.0% [-2.0, +2.0]
16 -2.4% [-5.6, +0.8] -0.9% [-2.8, +0.9]
So v4 will keep the counters only for a device with a volatile write
cache.
[...]
> So the default log about is 64MiB?
Yes, up to 128 GiB. For a larger file system, mkfs.xfs 7.1.1 makes the
log 1/2048 of it. On a non-rotational device, many CPUs can make it
larger.
Best regards,
Daejun
next prev parent reply other threads:[~2026-12-04 7:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 8:21 [PATCH v3] xfs: skip the fsync flush when a later flush has completed Daejun Park
2026-11-26 8:21 ` Daejun Park via B4 Relay
2026-11-30 12:58 ` Christoph Hellwig
2026-12-04 7:23 ` Daejun Park [this message]
2026-12-04 8:45 ` Christoph Hellwig
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=20261204072352.4356-1-pdaejun@gmail.com \
--to=pdaejun@gmail.com \
--cc=amir73il@gmail.com \
--cc=bfoster@redhat.com \
--cc=cem@kernel.org \
--cc=daejun7.park@samsung.com \
--cc=dgc@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=pankaj.raghav@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.