Skip to content

Commit

Permalink
run-make-check.sh: increase fs.aio-max-nr
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tchaikov committed Mar 19, 2021
1 parent da7a6fa commit e8fd4b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion run-make-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8fd4b3

Please sign in to comment.