From 29293649b50b17682f1a7efd87dcb913b9a73e61 Mon Sep 17 00:00:00 2001 From: Elena Gryaznova Date: Thu, 25 May 2017 17:59:28 +0300 Subject: [PATCH] LU-8721 tests: add parallel-scale fio test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch adds parallel-scale fio test. Fio (https://git.kernel.org/pub/scm/linux/kernel/git/axboe/fio.git) is a flexible generator of I/O of various modes: memory mapped, multithreaded, asynchronous read/write I/O, etc. Any fio job file including those created by third party can be supplied via $fio_jobFile.
By default, random 128mb write is performed. Test-Parameters: trivial envdefinitions=ONLY=fio testlist=parallel-scale Seagate-bug-id: MRP-3707 Signed-off-by: Elena Gryaznova Reviewed-by: Vladimir Saveliev Reviewed-by: Alexander Lezhoev Change-Id: I36b471e47e366caae5709f109c28ba57c89f22c7 Reviewed-on: https://review.whamcloud.com/23226 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Vladimir Saveliev Reviewed-by: Oleg Drokin --- lustre/tests/functions.sh | 67 ++++++++++++++++++++++++++++++++++++++++++ lustre/tests/parallel-scale.sh | 5 ++++ 2 files changed, 72 insertions(+) diff --git a/lustre/tests/functions.sh b/lustre/tests/functions.sh index 8800650..db134ce 100644 --- a/lustre/tests/functions.sh +++ b/lustre/tests/functions.sh @@ -1069,3 +1069,70 @@ ior_mdtest_parallel() { [[ $rc1 -ne 0 || $rc2 -ne 0 ]] && return 1 return 0 } + +run_fio() { + FIO=${FIO:=$(which fio 2> /dev/null || true)} + + local clients=${CLIENTS:-$(hostname)} + local fio_jobNum=${fio_jobNum:-4} + local fio_jobFile=${fio_jobFile:-$TMP/fiojobfile.$(date +%s)} + local fio_bs=${fio_bs:-1} + local testdir=$DIR/d0.fio + local file=${testdir}/fio + local runtime=60 + local propagate=false + + [ "$SLOW" = "no" ] || runtime=600 + + [ x$FIO = x ] && + { skip_env "FIO not found" && return; } + + mkdir -p $testdir + + # use fio job file if exists, + # create a simple one if missing + if ! [ -f $fio_jobFile ]; then + cat >> $fio_jobFile <> $fio_jobFile < ${fio_jobFile}" || + error "job file $fio_jobFile is not propagated" + do_nodesv $clients "cat ${fio_jobFile}" + fi + + cmd="$FIO $fio_jobFile" + echo "+ $cmd" + + log "clients: $clients $cmd" + + local rc=0 + do_nodesv $clients "$cmd " + rc=$? + + [ $rc = 0 ] || error "fio failed: $rc" + rm -rf $testdir +} + diff --git a/lustre/tests/parallel-scale.sh b/lustre/tests/parallel-scale.sh index e87e9a7..ec6d2fc 100644 --- a/lustre/tests/parallel-scale.sh +++ b/lustre/tests/parallel-scale.sh @@ -156,6 +156,11 @@ test_fs_test () { } run_test fs_test "fs_test" +test_fio () { + run_fio +} +run_test fio "fio" + [ $(facet_fstype $SINGLEMDS) = zfs -o $(facet_fstype "ost1") = zfs ] && SLOW=$ZFSSLOW -- 1.8.3.1