From: John Mulligan Date: Tue, 1 Nov 2022 14:03:31 +0000 (-0400) Subject: reef: run-make-check: use get_processors in run-make-check script X-Git-Tag: v18.2.5~380^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F58872%2Fhead;p=ceph.git reef: run-make-check: use get_processors in run-make-check script Signed-off-by: John Mulligan (cherry picked from commit 7edc4309f4781362f86fd83fd2d53eba42e5f73f) Conflicts: run-make-check.sh --- diff --git a/run-make-check.sh b/run-make-check.sh index 627430387398..096e3c6c8e1c 100755 --- a/run-make-check.sh +++ b/run-make-check.sh @@ -37,10 +37,14 @@ function run() { # increase the aio-max-nr, which is by default 65536. we could reach this # limit while running seastar tests and bluestore tests. local m=16 - if [ $(nproc) -gt $m ]; then - m=$(nproc) + local procs="$(($(get_processors) * 2))" + if [ "${procs}" -gt $m ]; then + m="${procs}" + fi + local aiomax="$((65536 * procs))" + if [ "$(/sbin/sysctl -n fs.aio-max-nr )" -lt "${aiomax}" ]; then + $DRY_RUN sudo /sbin/sysctl -q -w fs.aio-max-nr="${aiomax}" fi - $DRY_RUN sudo /sbin/sysctl -q -w fs.aio-max-nr=$((65536 * $(nproc))) CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS} if in_jenkins; then