mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bhithashri385 <bojanalahithashri@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: tj@kernel.org
Subject: Re: workqueue: introduce cache_shard_size
Date: Wed, 22 Apr 2026 14:49:09 -0400	[thread overview]
Message-ID: <20260422184913.25652-1-bojanalahithashri@gmail.com> (raw)
In-Reply-To: <283d252c7356bdc7640f48ef716051cb@kernel.org>

Hi,

I did a quick sanity check of cache_shard_size on a dual-socket system:

* 2x28C/56T (112 CPUs total), x86_64
* single local NVMe (XFS)
* upstream kernel with this change

Workload:

fio, 4k buffered writes with fsync=1
numjobs = 56 / 112 / 168

Compared:
workqueue.cache_shard_size=1 vs 8

Results (IOPS / BW):

jobs=56:
shard=1: ~265k IOPS, ~1035 MiB/s
shard=8: ~276k IOPS, ~1078 MiB/s

jobs=112:
shard=1: ~248k IOPS, ~968 MiB/s
shard=8: ~241k IOPS, ~941 MiB/s

jobs=168:
shard=1: ~234k IOPS, ~912 MiB/s
shard=8: ~233k IOPS, ~909 MiB/s

fsync latency (avg):

jobs=56:
shard=1: ~33 us
shard=8: ~28 us

jobs=112:
shard=1: ~53 us
shard=8: ~47 us

jobs=168:
shard=1: ~279 us
shard=8: ~256 us

Observations:

* Small improvement (~4%) at moderate concurrency (56 jobs).
* Differences mostly disappear at higher concurrency; both configs
  converge once the device is saturated (~93–96% util).
* fsync latency is consistently a bit lower with sharding.

Interpretation:

This workload appears to become device-bound quickly, so the benefit
from reduced workqueue contention is limited. The small gain at
moderate load and lower fsync latency suggest sharding is helping
somewhat before hitting the storage bottleneck.

I haven't tried multi-device or more metadata-heavy workloads yet,
which may stress workqueues more directly.

Thanks,
Hithashree


      parent reply	other threads:[~2026-04-22 18:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13 17:29 [GIT PULL] workqueue changes for v7.1 Tejun Heo
2026-04-15 18:13 ` pr-tracker-bot
2026-04-22 18:49 ` Bhithashri385 [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=20260422184913.25652-1-bojanalahithashri@gmail.com \
    --to=bojanalahithashri@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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®