Skip to content

Commit 3679c87

Browse files
committed
zeam-cmd: default --rayon-threads 12 for aggregators
Apply twelve rayon workers whenever isAggregator is true unless ZEAM_RAYON_THREADS_AGGREGATOR overrides it.
1 parent 50ad22e commit 3679c87

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

client-cmds/zeam-cmd.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ esac
9494
# Zig-workers) but underuses CPU on CPU-rich aggregators where the produce-path
9595
# FFI is the per-slot bottleneck.
9696
#
97-
# Two knobs so non-aggregators stay on the default:
98-
# - export ZEAM_RAYON_THREADS_AGGREGATOR=12 # aggregator-only override
99-
# - export ZEAM_RAYON_THREADS=12 # uniform override for both roles
100-
# The aggregator-specific value wins for aggregators when both are set.
97+
# Aggregators default to 12 rayon threads; non-aggregators stay on zeam's
98+
# auto-split unless overridden:
99+
# - ZEAM_RAYON_THREADS_AGGREGATOR # aggregator override (default 12)
100+
# - ZEAM_RAYON_THREADS # uniform override for both roles
101+
# For aggregators, ZEAM_RAYON_THREADS_AGGREGATOR wins when set; otherwise 12.
101102
#
102103
# Sizing guidance for a 16-vCPU host: 12 is the recommended starting point
103104
# (cpu_count - 4 reserved system threads: libxev/libp2p/api/metrics). Do not
@@ -108,8 +109,8 @@ esac
108109
# Older images do not recognise `--rayon-threads` and will fail to start. Leave
109110
# both env vars unset to suppress the flag entirely for pre-#903 images.
110111
rayon_threads_flag=""
111-
if [ "$isAggregator" == "true" ] && [ -n "${ZEAM_RAYON_THREADS_AGGREGATOR:-}" ]; then
112-
rayon_threads_flag="--rayon-threads $ZEAM_RAYON_THREADS_AGGREGATOR"
112+
if [ "$isAggregator" == "true" ]; then
113+
rayon_threads_flag="--rayon-threads ${ZEAM_RAYON_THREADS_AGGREGATOR:-12}"
113114
elif [ -n "${ZEAM_RAYON_THREADS:-}" ]; then
114115
rayon_threads_flag="--rayon-threads $ZEAM_RAYON_THREADS"
115116
fi

0 commit comments

Comments
 (0)