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 <kchai@redhat.com>
# 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