Skip to content

Commit fa7350d

Browse files
ELaresclaude
andauthored
ci(bench): add IRONCACHE_SHARDS probe knob to the head-to-head
Add an optional `ironcache_shards` workflow input (and the matching IRONCACHE_SHARDS env override in headtohead.sh) that DECOUPLES IronCache's shard (= runtime-thread) count from the pinned core count. Blank keeps the thread-per-core norm (one shard per pinned core). This isolates thread-oversubscription effects: e.g. run 1 shard vs 2 shards on the SAME 2 pinned cores and compare raw qps. The qps_per_core denominator stays the pinned core count, so a probe reads RAW qps across shard counts. Diagnostic only; no change to the default behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Zeke <ezequiel.lares@outlook.com>
1 parent 1bb1d12 commit fa7350d

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/headtohead.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ on:
3939
description: "Measured closed-loop pass duration (seconds)."
4040
type: string
4141
default: "8"
42+
ironcache_shards:
43+
description: "Override IronCache shard (= runtime-thread) count; blank = one per pinned core. Probes thread-oversubscription (e.g. 1 shard on 2 pinned cores)."
44+
type: string
45+
default: ""
4246

4347
permissions:
4448
contents: read
@@ -100,6 +104,7 @@ jobs:
100104
KEYSPACE: ${{ inputs.keycount }}
101105
DURATION_SECS: ${{ inputs.duration_secs }}
102106
WARMUP_SECS: "3"
107+
IRONCACHE_SHARDS: ${{ inputs.ironcache_shards }}
103108
run: |
104109
set -euo pipefail
105110
# The harness resolves the competitor (valkey-server, else redis-server),

scripts/bench/headtohead.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,16 @@ measure_server() {
474474

475475
# (b) Boot it, pinned, persistence OFF + eviction OFF for the measurement.
476476
if [[ "${kind}" == "ironcache" ]]; then
477-
echo "[h2h] starting ${name} on ${HOST}:${PORT} (shards=${SERVER_CORE_COUNT}, maxmemory=${MAXMEMORY})..."
477+
# IRONCACHE_SHARDS lets a probe DECOUPLE the shard (= runtime-thread) count from the
478+
# pinned core count, to isolate thread-oversubscription effects (e.g. 1 shard vs 2
479+
# shards on the SAME 2 pinned cores). Defaults to one shard per pinned core (the
480+
# thread-per-core norm). The qps_per_core denominator stays SERVER_CORE_COUNT (cores),
481+
# so a probe compares RAW qps across shard counts.
482+
local ic_shards="${IRONCACHE_SHARDS:-${SERVER_CORE_COUNT}}"
483+
echo "[h2h] starting ${name} on ${HOST}:${PORT} (shards=${ic_shards} over ${SERVER_CORE_COUNT} pinned cores, maxmemory=${MAXMEMORY})..."
478484
IRONCACHE_MAXMEMORY="${MAXMEMORY}" \
479485
${SERVER_PREFIX[@]+"${SERVER_PREFIX[@]}"} "${IRONCACHE_BIN}" \
480-
--port "${PORT}" --shards "${SERVER_CORE_COUNT}" server \
486+
--port "${PORT}" --shards "${ic_shards}" server \
481487
>"${SERVER_LOG}" 2>&1 &
482488
SERVER_PID=$!
483489
else

0 commit comments

Comments
 (0)