[Ocfs2-test-devel] [PATCH 3/9] Multiple run: make blocksize and clustersize as parameters
Eric Ren
zren at suse.com
Fri Jun 17 02:12:58 PDT 2016
It takes too long to get the result of a round testing. This
can shorten a lot time by eliminating 2-layer loops with blocksize
and clustersize. Now blocksize defaults to 4096, while clustersize
to 32768 if not specified.
Signed-off-by: Eric Ren <zren at suse.com>
---
programs/inline-data/multi-inline-run.sh | 41 ++++++-----
programs/python_common/multiple_run.sh | 91 ++++++++++++------------
programs/reflink_tests/multi_reflink_test_run.sh | 27 +++----
programs/xattr_tests/xattr-multi-run.sh | 36 +++++-----
4 files changed, 104 insertions(+), 91 deletions(-)
diff --git a/programs/inline-data/multi-inline-run.sh b/programs/inline-data/multi-inline-run.sh
index 30e2e6a..5440368 100755
--- a/programs/inline-data/multi-inline-run.sh
+++ b/programs/inline-data/multi-inline-run.sh
@@ -126,12 +126,14 @@ exit_or_not()
################################################################################
f_usage()
{
- echo "usage: `basename ${0}` [-r MPI_ranks] <-f MPI_hosts> [-a access_method] [-o output] <-d <device>> <mountpoint path>"
+ echo "usage: `basename ${0}` [-r MPI_ranks] <-f MPI_hosts> [-a access_method] [-o output] <-d <device>> <-b blocksize> -c <clustersize> <mountpoint path>"
echo " -r size of MPI rank"
echo " -a access method for process propagation,should be ssh or rsh,set ssh as a default method when omited."
echo " -f MPI hosts list,separated by comma,e.g -f node1.us.oracle.com,node2.us.oracle.com."
echo " -o output directory for the logs"
echo " -d device name used for ocfs2 volume"
+ echo " -b block size"
+ echo " -c cluster size"
echo " <mountpoint path> path of mountpoint where the ocfs2 volume will be mounted on."
exit 1;
@@ -144,13 +146,15 @@ f_getoptions()
exit 1
fi
- while getopts "o:hd:r:a:f:" options; do
+ while getopts "o:hd:r:a:f:b:c:" options; do
case $options in
a ) MPI_ACCESS_METHOD="$OPTARG";;
r ) MPI_RANKS="$OPTARG";;
f ) MPI_HOSTS="$OPTARG";;
o ) LOG_OUT_DIR="$OPTARG";;
d ) OCFS2_DEVICE="$OPTARG";;
+ b ) BLOCKSIZE="$OPTARG";;
+ c ) CLUSTERSIZE="$OPTARG";;
h ) f_usage
exit 1;;
* ) f_usage
@@ -202,6 +206,11 @@ f_setup()
if [ -z "$MPI_HOSTS" ];then
f_usage
fi
+
+ if [ -z "${BLOCKSIZE}" -o -z "${CLUSTERSIZE}" ];then
+ echo "Please specify block size and cluster size"
+ f_usage
+ fi
}
f_do_mkfs_and_mount()
@@ -327,22 +336,16 @@ trap ' : ' SIGTERM
f_setup $*
-for BLOCKSIZE in 512 1024 4096
-do
- for CLUSTERSIZE in 4096 32768 1048576
- do
- echo "++++++++++Multiple node inline-data test with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++" |tee -a ${RUN_LOG_FILE}
- echo "++++++++++Multiple node inline-data test with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++">>${DATA_LOG_FILE}
- echo "++++++++++Multiple node inline-data test with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++">>${DIRS_LOG_FILE}
- echo "======================================================================================="
- f_do_mkfs_and_mount
- f_run_data_test
- f_run_dirs_test
- f_do_umount
- echo "======================================================================================="
- echo -e "\n\n\n">>${DATA_LOG_FILE}
- echo -e "\n\n\n">>${DIRS_LOG_FILE}
- done
-done
+echo "++++++++++Multiple node inline-data test with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++" |tee -a ${RUN_LOG_FILE}
+echo "++++++++++Multiple node inline-data test with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++">>${DATA_LOG_FILE}
+echo "++++++++++Multiple node inline-data test with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++">>${DIRS_LOG_FILE}
+echo "======================================================================================="
+f_do_mkfs_and_mount
+f_run_data_test
+f_run_dirs_test
+f_do_umount
+echo "======================================================================================="
+echo -e "\n\n\n">>${DATA_LOG_FILE}
+echo -e "\n\n\n">>${DIRS_LOG_FILE}
f_cleanup
diff --git a/programs/python_common/multiple_run.sh b/programs/python_common/multiple_run.sh
index dd9603f..1d4aa7b 100755
--- a/programs/python_common/multiple_run.sh
+++ b/programs/python_common/multiple_run.sh
@@ -71,10 +71,12 @@ set -o pipefail
################################################################################
f_usage()
{
- echo "usage: `basename ${0}` <-k kerneltarball> <-n nodes> [-i nic] \
+ echo "usage: `basename ${0}` <-k kerneltarball> [-b blocksize] [-c clustersize] <-n nodes> [-i nic] \
[-a access_method] [-o logdir] <-d device> [-t testcases] <mountpoint path>"
echo " -k kerneltarball should be path of tarball for kernel src."
echo " -n nodelist,should be comma separated."
+ echo " -b blocksize."
+ echo " -c clustersize."
echo " -o output directory for the logs"
echo " -i network interface name to be used for MPI messaging."
echo " -a access method for mpi execution,should be ssh or rsh"
@@ -96,13 +98,15 @@ f_getoptions()
exit 1
fi
- while getopts "n:d:i:a:o:k:t:h:" options; do
+ while getopts "n:d:i:a:o:b:c:k:t:h:" options; do
case $options in
n ) NODE_LIST="$OPTARG";;
d ) DEVICE="$OPTARG";;
i ) INTERFACE="$OPTARG";;
a ) ACCESS_METHOD="$OPTARG";;
o ) LOG_DIR="$OPTARG";;
+ b ) BLOCKSIZE="$OPTARG";;
+ c ) CLUSTERSIZE="$OPTARG";;
k ) KERNELSRC="$OPTARG";;
t ) TESTCASES="$OPTARG";;
h ) f_usage
@@ -124,6 +128,9 @@ f_setup()
f_getoptions $*
+ BLOCKSIZE=${BLOCKSIZE:-4096}
+ CLUSTERSIZE=${CLUSTERSIZE:-32768}
+
if [ -z "${MOUNT_POINT}" ];then
f_usage
fi
@@ -358,7 +365,7 @@ run_xattr_test()
LogRunMsg "xattr-test"
${BINDIR}/xattr-multi-run.sh -r 4 -f ${NODE_LIST} -a ssh -o ${logdir} \
--d ${DEVICE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1
+-d ${DEVICE} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1
LogRC $?
}
@@ -368,7 +375,7 @@ run_inline_test()
LogRunMsg "inline-test"
${BINDIR}/multi-inline-run.sh -r 2 -f ${NODE_LIST} -a ssh -o ${logdir} \
--d ${DEVICE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1
+-d ${DEVICE} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1
LogRC $?
}
@@ -490,46 +497,42 @@ for tc in `${ECHO} ${TESTCASES} | ${SED} "s:,: :g"`; do
run_reflink_test
fi
- for BLOCKSIZE in 512 1024 4096;do
- for CLUSTERSIZE in 4096 32768 1048576;do
- ${ECHO} "Tests with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"" | \
- ${TEE_BIN} -a ${LOGFILE}
- if [ "$tc"X = "write_append_truncate"X -o "$tc"X = "all"X ]; then
- START=$(date +%s)
- run_write_append_truncate_test
- fi
-
- if [ "$tc"X = "multi_mmap"X -o "$tc"X = "all"X ]; then
- START=$(date +%s)
- run_multi_mmap_test
- fi
-
- if [ "$tc"X = "create_racer"X -o "$tc"X = "all"X ]; then
- START=$(date +%s)
- run_create_racer_test
- fi
-
- if [ "$tc"X = "flock_unit"X -o "$tc"X = "all"X ]; then
- START=$(date +%s)
- run_flock_unit_test
- fi
-
- if [ "$tc"X = "cross_delete"X -o "$tc"X = "all"X ]; then
- START=$(date +%s)
- run_cross_delete_test
- fi
-
- if [ "$tc"X = "open_delete"X -o "$tc"X = "all"X ]; then
- START=$(date +%s)
- run_open_delete_test
- fi
-
- if [ "$tc"X = "lvb_torture"X -o "$tc"X = "all"X ]; then
- START=$(date +%s)
- run_lvb_torture_test
- fi
- done
- done
+ ${ECHO} "Tests with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"" | \
+ ${TEE_BIN} -a ${LOGFILE}
+ if [ "$tc"X = "write_append_truncate"X -o "$tc"X = "all"X ]; then
+ START=$(date +%s)
+ run_write_append_truncate_test
+ fi
+
+ if [ "$tc"X = "multi_mmap"X -o "$tc"X = "all"X ]; then
+ START=$(date +%s)
+ run_multi_mmap_test
+ fi
+
+ if [ "$tc"X = "create_racer"X -o "$tc"X = "all"X ]; then
+ START=$(date +%s)
+ run_create_racer_test
+ fi
+
+ if [ "$tc"X = "flock_unit"X -o "$tc"X = "all"X ]; then
+ START=$(date +%s)
+ run_flock_unit_test
+ fi
+
+ if [ "$tc"X = "cross_delete"X -o "$tc"X = "all"X ]; then
+ START=$(date +%s)
+ run_cross_delete_test
+ fi
+
+ if [ "$tc"X = "open_delete"X -o "$tc"X = "all"X ]; then
+ START=$(date +%s)
+ run_open_delete_test
+ fi
+
+ if [ "$tc"X = "lvb_torture"X -o "$tc"X = "all"X ]; then
+ START=$(date +%s)
+ run_lvb_torture_test
+ fi
done
END=$(date +%s)
diff --git a/programs/reflink_tests/multi_reflink_test_run.sh b/programs/reflink_tests/multi_reflink_test_run.sh
index 682ea71..2ea14a9 100755
--- a/programs/reflink_tests/multi_reflink_test_run.sh
+++ b/programs/reflink_tests/multi_reflink_test_run.sh
@@ -90,12 +90,14 @@ set -o pipefail
function f_usage()
{
echo "usage: `basename ${0}` [-r MPI_Ranks] <-f MPI_Hosts> \
-[-a access method] [-o logdir] <-d <device>> [-W] [-A] <mountpoint path>"
+[-a access method] [-o logdir] <-d <device>> <-b block size> <-c cluster size> [-W] [-A] <mountpoint path>"
echo " -r size of MPI rank"
echo " -a access method for mpi execution,should be ssh or rsh"
echo " -f MPI hosts list,separated by comma"
echo " -o output directory for the logs"
echo " -d specify the device"
+ echo " -b block size"
+ echo " -c cluster size"
echo " -i Network Interface name to be used for MPI messaging."
echo " -W enable data=writeback mode"
echo " -A enable asynchronous io testing mode"
@@ -110,7 +112,7 @@ function f_getoptions()
exit 1
fi
- while getopts "o:d:i:r:f:WAha:" options; do
+ while getopts "o:d:i:r:f:WAha:b:c:" options; do
case $options in
r ) MPI_RANKS="$OPTARG";;
f ) MPI_HOSTS="$OPTARG";;
@@ -118,6 +120,8 @@ function f_getoptions()
d ) DEVICE="$OPTARG";;
a ) MPI_ACCESS_METHOD="$OPTARG";;
i ) INTERFACE="$OPTARG";;
+ b ) BLOCKSIZE="$OPTARG";;
+ c ) CLUSTERSIZE="$OPTARG";;
W ) MOUNT_OPTS="data=writeback";;
A ) AIO_OPT=" -A ";;
h ) f_usage
@@ -168,13 +172,18 @@ ${MOUNT_POINT}`"
rm -f /tmp/$$
fi
+ if [ -z ${BLOCKSIZE} -o -z ${CLUSTERSIZE} ];then
+ echo "Please specify block size and cluster size"
+ f_usage
+ fi
+
if [ ! -z "${INTERFACE}" ]; then
${IFCONFIG_BIN} ${INTERFACE} >/dev/null 2>&1 || {
echo "Invalid NIC";
f_usage;
}
MPI_BTL_IF_ARG="-mca btl_tcp_if_include ${INTERFACE}"
- fi;
+ fi
MPI_RANKS=${MPI_RANKS:-$DEFAULT_RANKS}
LOG_DIR=${LOG_DIR:-$DEFAULT_LOG_DIR}
@@ -378,17 +387,11 @@ start: `date`=====================\n"
f_LogMsg ${LOG_FILE} "=====================Multi-nodes refcount tests \
start: `date`====================="
-#for BLOCKSIZE in 512 1024 2048 4096;do
-# for CLUSTERSIZE in 4096 32768 1048576;do
-for BLOCKSIZE in 4096;do
- for CLUSTERSIZE in 1048576;do
- f_LogRunMsg ${RUN_LOG_FILE} "<- Running test with ${BLOCKSIZE} \
+f_LogRunMsg ${RUN_LOG_FILE} "<- Running test with ${BLOCKSIZE} \
bs and ${CLUSTERSIZE} cs ->\n"
- f_LogMsg ${LOG_FILE} "<- Running test with ${BLOCKSIZE} \
+f_LogMsg ${LOG_FILE} "<- Running test with ${BLOCKSIZE} \
bs and ${CLUSTERSIZE} cs ->"
- f_runtest
- done
-done
+f_runtest
f_cleanup
diff --git a/programs/xattr_tests/xattr-multi-run.sh b/programs/xattr_tests/xattr-multi-run.sh
index 7905102..d38bba4 100755
--- a/programs/xattr_tests/xattr-multi-run.sh
+++ b/programs/xattr_tests/xattr-multi-run.sh
@@ -145,13 +145,15 @@ exit_or_not()
################################################################################
f_usage()
{
- echo "usage: `basename ${0}` [-r MPI_Ranks] <-f MPI_Hosts> [-a access method] [-o output] [-i interface] <-d <device>> <mountpoint path>"
+ echo "usage: `basename ${0}` [-r MPI_Ranks] <-f MPI_Hosts> [-a access method] [-o output] [-i interface] <-d <device>> <-b blocksize> <-c clustersize> <mountpoint path>"
echo " -r size of MPI rank"
echo " -a access method for process propagation,should be ssh or rsh,set ssh as a default method when omited."
echo " -f MPI hosts list,separated by comma,e.g -f node1.us.oracle.com,node2.us.oracle.com."
echo " -o output directory for the logs"
echo " -i Network Interface name to be used for MPI messaging."
echo " -d specify the device which has been formated as an ocfs2 volume."
+ echo " -b block size."
+ echo " -c cluster size."
echo " <mountpoint path> path of mountpoint where the ocfs2 volume will be mounted on."
exit 1;
@@ -163,7 +165,7 @@ f_getoptions()
exit 1
fi
- while getopts "o:d:r:f:a:h:i:" options; do
+ while getopts "o:d:r:f:a:h:i:b:c:" options; do
case $options in
r ) MPI_RANKS="$OPTARG";;
f ) MPI_HOSTS="$OPTARG";;
@@ -171,6 +173,8 @@ f_getoptions()
d ) OCFS2_DEVICE="$OPTARG";;
a ) MPI_ACCESS_METHOD="$OPTARG";;
i ) INTERFACE="$OPTARG";;
+ b ) BLOCKSIZE="$OPTARG";;
+ c ) CLUSTERSIZE="$OPTARG";;
h ) f_usage
exit 1;;
* ) f_usage
@@ -234,6 +238,11 @@ f_setup()
f_usage
fi
+ if [ -z "${BLOCKSIZE}" -o -z "${CLUSTERSIZE}" ];then
+ echo "Please specify block size and cluster size";
+ f_usage
+ fi
+
# Use number of testing nodes as the default slot number.
if [ -z "${SLOTS}" ];then
echo $MPI_HOSTS|sed -e 's/,/\n/g' >/tmp/$$
@@ -471,20 +480,15 @@ START_TIME=${SECONDS}
echo "=====================Multiple nodes xattr testing starts: `date`=====================" |tee -a ${RUN_LOG_FILE}
echo "=====================Multiple nodes xattr testing starts: `date`=====================" >> ${LOG_FILE}
-for BLOCKSIZE in 512 4096
-do
- for CLUSTERSIZE in 4096 1048576
- do
- echo "++++++++++xattr tests with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++" |tee -a ${RUN_LOG_FILE}
- echo "++++++++++xattr tests with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++">>${LOG_FILE}
- echo "======================================================================================="
- f_do_mkfs_and_mount
- f_runtest
- f_do_umount
- echo "======================================================================================="
- echo -e "\n\n\n">>${LOG_FILE}
- done
-done
+echo "++++++++++xattr tests with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++" |tee -a ${RUN_LOG_FILE}
+echo "++++++++++xattr tests with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++">>${LOG_FILE}
+echo "======================================================================================="
+f_do_mkfs_and_mount
+f_runtest
+f_do_umount
+echo "======================================================================================="
+echo -e "\n\n\n">>${LOG_FILE}
+
f_cleanup
END_TIME=${SECONDS}
--
2.6.6
More information about the Ocfs2-test-devel
mailing list