From 8f0b783c933778d17e6dc8d4dcf08397be2e07c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Thu, 19 Jun 2025 17:30:44 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-tests:=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=B6=D0=BA=D0=B0=20=D0=BE=D0=BF=D1=86=D0=B8=D0=B8=20`--?= =?UTF-8?q?numa=20#`=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80=D0=B8=D0=B2=D1=8F?= =?UTF-8?q?=D0=B7=D0=BA=D0=B8=20=D1=81=D1=82=D0=BE=D1=85=D0=B0=D1=81=D1=82?= =?UTF-8?q?=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=BE=D0=B3=D0=BE=20=D1=82=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B0=20=D0=BA=20NUMA-=D1=83=D0=B7=D0=BB=D1=83.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/stochastic.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/test/stochastic.sh b/test/stochastic.sh index d7abcdf5..ee6ba742 100755 --- a/test/stochastic.sh +++ b/test/stochastic.sh @@ -28,6 +28,7 @@ REPORT_DEPTH=no REPEAT=11 ROUNDS=1 SMALL=no +NUMABIND= while [ -n "$1" ] do @@ -51,6 +52,7 @@ do echo "--db-upto-gb NN --''--''--''--''--''--''--''--''-- NN gigabytes" echo "--no-geometry-jitter Disable jitter for geometry upper-size" echo "--pagesize NN Use specified page size (256 is minimal and used by default)" + echo "--numa NODE Bind to the specified NUMA node" echo "--dont-check-ram-size Don't check available RAM" echo "--extra Iterate extra modes/flags" echo "--taillog Dump tail of test log on failure" @@ -209,6 +211,15 @@ do --small) SMALL=yes ;; + --numa) + NUMANODE=$2 + if [[ ! $NUMANODE =~ ^[0-9]+$ ]]; then + echo "Invalid value '$NUMANODE' for --numa option, expect an integer of NUMA-node" + exit -2 + fi + NUMABIND="numactl --membind ${NUMANODE} --cpunodebind ${NUMANODE}" + shift + ;; *) echo "Unknown option '$1'" exit -2 @@ -504,9 +515,9 @@ function probe { else exec {LFD}> >(logger) fi - ${MONITOR} ./mdbx_test ${speculum} --random-writemap=no --ignore-dbfull --repeat=${REPEAT} --pathname=${TESTDB_DIR}/long.db --cleanup-after=no --geometry-jitter=${GEOMETRY_JITTER} "$@" $case >&${LFD} \ - && ${MONITOR} ./mdbx_chk -q ${TESTDB_DIR}/long.db | tee ${TESTDB_DIR}/long-chk.log \ - && ([ ! -e ${TESTDB_DIR}/long.db-copy ] || ${MONITOR} ./mdbx_chk -q ${TESTDB_DIR}/long.db-copy | tee ${TESTDB_DIR}/long-chk-copy.log) \ + ${NUMABIND} ${MONITOR} ./mdbx_test ${speculum} --random-writemap=no --ignore-dbfull --repeat=${REPEAT} --pathname=${TESTDB_DIR}/long.db --cleanup-after=no --geometry-jitter=${GEOMETRY_JITTER} "$@" $case >&${LFD} \ + && ${NUMABIND} ${MONITOR} ./mdbx_chk -q ${TESTDB_DIR}/long.db | tee ${TESTDB_DIR}/long-chk.log \ + && ([ ! -e ${TESTDB_DIR}/long.db-copy ] || ${NUMABIND} ${MONITOR} ./mdbx_chk -q ${TESTDB_DIR}/long.db-copy | tee ${TESTDB_DIR}/long-chk-copy.log) \ || failed if [ ${LFD} -ne 0 ]; then echo "@@@ END-OF-LOG/ITERATION" >&${LFD}