# The [thread] section controls worker count and loadavg throttling.
# thread-min, thread-max, and loadavg-target accept size-style expressions
-# (the same grammar as state.hash.size) with the ${NPROC} (logical CPU count)
-# and ${THREAD_FACTOR} (the thread-factor value below) substitutions, e.g.
-# "${NPROC} * 2" or "min(8, ${NPROC})".
+# (same grammar as state.hash.size) with ${NPROC} and ${THREAD_FACTOR}
+# substitutions. See docs/config-file.md for examples.
[thread]
thread-min = 0
# Maximum number of threads to run. Expression; ${NPROC} and
- # ${THREAD_FACTOR} allowed. The value means exactly what it evaluates
- # to; to cap a CPU-relative count, write the min() yourself. The
- # legacy -c option overrides this with an exact integer count
- # (oversubscription allowed; thread-factor then has no effect).
+ # ${THREAD_FACTOR} allowed. Means exactly what it evaluates to;
+ # legacy -c overrides with an exact integer count.
+ # See docs/config-file.md for capping and oversubscription notes.
thread-max = max(1, ceil(${NPROC} * ${THREAD_FACTOR}))
# Ratio of bees threads to CPU threads (legacy -C option), exposed to