diff mbox series

[1/5] check-parallel: adjust concurrency according to CPU count

Message ID 20250115060258.3951185-2-david@fromorbit.com (mailing list archive)
State New
Headers show
Series : CLI and feature improvements for check-parallel | expand

Commit Message

Dave Chinner Jan. 15, 2025, 5:51 a.m. UTC
From: Dave Chinner <dchinner@redhat.com>

COncurrency is currently hard coded at 64 worker threads. THis is
too many for small CPU count machines; the idea is to create a
sustained load of roughly one test per CPU as they are mostly single
threaded/single process tests. The number "64" was chosen because
I've been developing this functionality on a 64p VM.

Rather than hard coding the concurrency, probe the number of CPUs
available and create that many running contexts.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 check-parallel | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/check-parallel b/check-parallel
index c85437252..d34c73f66 100755
--- a/check-parallel
+++ b/check-parallel
@@ -13,7 +13,7 @@  export SRC_DIR="tests"
 basedir=$1
 shift
 check_args="$*"
-runners=64
+runners=$(getconf _NPROCESSORS_CONF)
 runner_list=()
 runtimes=()