From: Kefu Chai Date: Fri, 19 Mar 2021 08:18:23 +0000 (+0800) Subject: run-make-check.sh: increase fs.aio-max-nr X-Git-Tag: v17.1.0~2558^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e8fd4b3a1389f4c97483e91a45759ace369aa334;p=ceph.git run-make-check.sh: increase fs.aio-max-nr without this change the seastar based tests fail on host with 48 cores, because the /proc/sys/fs/aio-nr used by the tests is greater than 1048576. if run-make-check.sh is used to launch the test, the default job number is `$(nproc) / 2`, and the peak number of /proc/sys/fs/aio-nr when running ctest was 3190848 when testing on the 48-core host. so we need to increase fs.aio-max-nr accordingly to the available cores on the host. Signed-off-by: Kefu Chai --- diff --git a/run-make-check.sh b/run-make-check.sh index 3a7451c54e7f..12c16f2bca92 100755 --- a/run-make-check.sh +++ b/run-make-check.sh @@ -32,7 +32,11 @@ function run() { # increase the aio-max-nr, which is by default 65536. we could reach this # limit while running seastar tests and bluestore tests. - $DRY_RUN sudo /sbin/sysctl -q -w fs.aio-max-nr=$((65536 * 16)) + local m=16 + if [ $(nproc) -gt $m ]; then + m=$(nproc) + fi + $DRY_RUN sudo /sbin/sysctl -q -w fs.aio-max-nr=$((65536 * $(nproc))) CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS} if ! $DRY_RUN ctest $CHECK_MAKEOPTS --output-on-failure; then