mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daejun Park <daejun7.park@samsung.com>
To: Dave Chinner <dgc@kernel.org>
Cc: Carlos Maiolino <cem@kernel.org>,
	"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>,
	Dave Chinner <david@fromorbit.com>,
	"Darrick J. Wong" <djwong@kernel.org>,
	Amir Goldstein <amir73il@gmail.com>,
	Brian Foster <bfoster@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Daejun Park <daejun7.park@samsung.com>
Subject: RE:(2) [PATCH v2 0/2] xfs: skip redundant fsync cache flushes
Date: Tue, 17 Nov 2026 11:33:45 +0900	[thread overview]
Message-ID: <20261117023345epcms2p5117009330b6c600f68c598d5e08aef5e@epcms2p5> (raw)
In-Reply-To: <avQPb5z4ExBOiEJq@dread>

On Wed, Nov 11, 2026 at 05:47:11PM +1100, Dave Chinner wrote:
> On Wed, Nov 11, 2026 at 12:17:10PM +0900, Daejun Park via B4 Relay wrote:
[...]
> > 16 fio jobs of 4k append + fsync in a QEMU guest: 1111 -> 4498
> > fsyncs/s.

Correction: fio preallocated these files by default, so they were not
appends. Real appends (--fallocate=none) on the same disk give
1311 -> 3416 fsyncs/s.

[...]
> Hence the numbers look promising for low concurrency fsync
> workloads, but I'd really like to know waht happens at the high end
> when log force count rather than per-file fsync latency is the
> performance limiting factor. I suspect that it will improve
> performance by further mitigating the number of log writes and/or
> cache flushes that need to be done, but it really needs to be
> tested....

Thanks. When flushes are expensive, v2 is faster from 128 to 512
clients but writes more log per fsync. When flushes are cheap, v2 sends
60-80% fewer flushes and changes throughput and log writes per fsync
by under 5%.

Setup: dbench 4.00 -t 30 in a QEMU guest (40 GiB) on a 990 PRO
partition, for-next 48326a2382d8 without and with v2, three runs each,
execute phase only.

1) virtio-blk cache=none, volatile write cache on, 8 vCPUs:

clients  MB/s          log writes/fsync  max_latency ms
128      1963 -> 6886  0.10 -> 0.12        433 -> 331
256      3173 -> 6282  0.11 -> 0.38        312 -> 1956
512      4696 -> 5294  0.13 -> 0.37        468 -> 20595
1024     4466 -> 4751  0.28 -> 0.38      11128 -> 28947
2048     3973 -> 4043  0.25 -> 0.38      21153 -> 21225

2) cache=unsafe, so flushes complete without syncing, 16 vCPUs,
agcount=16: throughput -2.5% to +1.9%, log writes per fsync -4.6% to
-0.2%.

Log writes peaked at ~12,000/s (30 KiB each), below 20,000.

The long max_latency is unlink() blocked in the xfs_inodegc_queue()
throttle: from 1024 clients on base and 256 on v2 in setup 1, and from
256 on both in setup 2.

> I'd also like to know how this affects storage that does not require
> cache flushes - in those cases flushes are no-ops, so all this
> tracking and sequencing would likely be pure overhead....

No throughput or CPU overhead measured. Setup 1 with 16 vCPUs and
agcount=16, but the guest sets write_cache to "write through", so no
flushes are sent. Five runs each:

- dbench, 1/8/16/32/512 clients: MB/s changed by -0.8% to +0.8% and
  guest CPU per fsync by -0.5% to +1.4%. A -3.0% at 128 clients
  did not repeat in 15 more runs each (+0.1%).

- fs_mark, 16 threads: create and unlink of 12.8M empty files and
  fsync of 640k 4 KiB files changed time by -0.5% to -0.1% and guest
  CPU by -1.6% to +0.6%. chown -R times (13-108 s) varied too much to
  compare.

Best regards,
Daejun

      parent reply	other threads:[~2026-11-17  2:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  3:17 Daejun Park via B4 Relay
2026-11-11  3:17 ` [PATCH v2 1/2] xfs: number the cache flushes submitted to each buftarg Daejun Park via B4 Relay
2026-11-11 14:22   ` Brian Foster
2026-11-20 18:14   ` Christoph Hellwig
2026-11-11  3:17 ` [PATCH v2 2/2] xfs: skip the fsync flush when a later flush has completed Daejun Park via B4 Relay
2026-11-11 14:22   ` Brian Foster
     [not found]   ` <CGME20261111142234epcas2p48d80bde0c65d09a2fd8bdfdc9bdd2b1f@epcms2p6>
2026-11-12  2:39     ` Daejun Park
2026-11-20 18:17   ` Christoph Hellwig
2026-11-11  6:47 ` [PATCH v2 0/2] xfs: skip redundant fsync cache flushes Dave Chinner
     [not found] ` <CGME20261111064724epcas2p11498de70e50f2fbf4e21d5e7a723e01d@epcms2p5>
2026-11-17  2:33   ` Daejun Park [this message]

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=20261117023345epcms2p5117009330b6c600f68c598d5e08aef5e@epcms2p5 \
    --to=daejun7.park@samsung.com \
    --cc=amir73il@gmail.com \
    --cc=bfoster@redhat.com \
    --cc=cem@kernel.org \
    --cc=david@fromorbit.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 \
    /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

all inboxes | Powered by JetHome®