#!/bin/bash
# cluster name (all node names are this followed by the node number)
-cluster=nid000
+cluster=mdev
# client node numbers (individual numbers or inclusive ranges)
-clients=(1-64)
+clients=(7-8)
# numbers of clients to survey
clients_lo=1
-clients_hi=64
-clients_iterator="*=2"
+clients_hi=2
+clients_iterator="+=1"
# numbers of tasks per client to survey
tasks_per_client_lo=1
-tasks_per_client_hi=1
+tasks_per_client_hi=8
tasks_per_client_iterator="*=2"
# record sizes to survey
rsize_hi=1M
rsize_iterator="*=2"
-# This line contains all of the possible tests.
-# IMPORTANT:::if you want to remount, put it in your tests array
-# in the order you want to remount to clear the cache. For ex:
-# tests=(write rewrite remount read reread rewrite_again) has a
-# remount between the rewrite and remount tests
-tests=(write read)
+## which tests to run (first must be write)
+# clear_cache) not really a test; just uncache everything
+# *write*) write
+# *) read
+#tests=(write rewrite read reread rewrite_again)
+tests=(write rewrite clear_cache read reread)
# total # bytes written/read by any client node
-min_per_client_size=1G
-min_total_size=1G
+min_per_client_size=4G
+min_total_size=8G
# should each task do I/O to its own file?
file_per_task=1
# the binaries
-IOR="/spin/home/henken/IOR-2.8.4/src/C/IOR"
+IOR=/usr/local/sbin/IOR
llmount=llmount
-
-#Command to run IOR (pdsh,mpirun,yod)
-runior="yod"
-#Path to binary for program specified in runior
-pathtobin="$(which yod)"
-#location of machines file for mpirun, this file
-#will be built from the cluster and client ranges
-#above
-machines=machines
+pdsh=pdsh
# the result file prefix (date/time + hostname makes unique)
-rslt=/spin/home/henken/ior_survey/ior_survey_`date +%F@%R`_`uname -n`
-#rslt=/home/larry/ior_survey
+rslt=/tmp/ior_survey_`date +%F@%R`_`uname -n`
# where lustre is mounted on the clients
-lustre=/lustre/fs1/nic/
+lustre=/mnt/lustre
# basename of the test file(s)
testfile=${lustre}/ior_survey_testfile
-
-# how to unmount and remount the F/S on a client (to clear the cache)
-# change this depending on lustre config (network type, MDS etc)
-unmount="umount $lustre"
-remount="llmount pegasus:/mds1/client $lustre"
-
# pdsh args required to instantiate all instances of IOR in parallel
# the chosen module must support '-n <procs-per-node>'
# -R<module>, -f<fanout> etc
echo $minusn "$*"
}
-mpi_client_file() {
- echo -n > $machines
- local base=`base_range $1`
- echo $base
- local chunk=`count_range $1`
- echo $chunk
- local high=$((base+chunk-1))
- echo $high
- for ((nmpi=$base; nmpi<=$high; nmpi++)); do
- echo $cluster$nmpi >> $machines
- done
-}
-
-parse_cmdline() {
- case $runior in
- 'mpirun')
- #echo "this"
- $pathtobin -np $((ntask*nclnt)) -machinefile $machines >> $tmpf 2>1 \
- "${cmdline[@]}";;
- 'pdsh')
- $pathtobin -S -b $pdsh_mpiargs -w "$test_clients" -n $ntask \
- >> $tmpf 2>&1 "${cmdline[@]}";;
- 'yod')
- $pathtobin -np $((ntask*nclnt)) >> $tmpf 2>&1 "${cmdline[@]}";;
- esac
-}
-
-if [ $runior = "mpirun" ]; then
- mpi_client_file ${clients[@]}
-fi
-
# convert params to actual numbers
min_per_client_size=`parse_number $min_per_client_size`
min_total_size=`parse_number $min_total_size`
for ((nclnt=clients_lo; nclnt<=clients_hi; nclnt$clients_iterator)); do
test_clients="${cluster}`n2noderange $nclnt ${clients[@]}`"
-
+
per_client_size=$((min_total_size/nclnt))
if ((per_client_size < min_per_client_size)); then
per_client_size=$min_per_client_size
tmpf=${workf}_tmp
echo -n > $tmpf
- if [ "$test" = "remount" ]; then
- echo "=> $remount" >> $tmpf
- if [ "$runior" = "pdsh" ]; then
- $pdsh -S -b -w "$test_clients" >> $tmpf 2>&1 \
- "$unmount"
- $pdsh -S -b -w "$test_clients" >> $tmpf 2>&1 \
- "$remount"
- else
- $unmount
- $remount
- fi
+ if [ "$test" = "clear_cache" ]; then
+ clear_cache='for LRU in /proc/fs/lustre/ldlm/namespaces/*/lru_size; do; echo clear > $LRU; done'
+ echo "=> $clear_cache" >> $tmpf
+ $pdsh -S -b -w "$test_clients" >> $tmpf 2>&1 \
+ "$clear_cache"
status=$?
echo "Completion Status: $status" >> $tmpf
# check lustre is mounted everywhere it's needed
cmd="(mount -t lustre; mount -t lustre_lite) | grep $lustre"
echo "=> Mount Check: $cmd" >> $tmpf
- if [ "$runior" = "pdsh" ]; then
- $pdsh -S -b -w "$test_clients" >> $tmpf 2>&1 \
- "$cmd"
- fi
+ $pdsh -S -b -w "$test_clients" >> $tmpf 2>&1 \
+ "$cmd"
status=$?
echo "Completion Status: $status" >> $tmpf
if ((status)); then
esac
echo "=> ${cmdline[@]}" >> $tmpf
-
- parse_cmdline
+
+ $pdsh -S -b $pdsh_mpiargs -w "$test_clients" -n $ntask >> $tmpf 2>&1 \
+ "${cmdline[@]}"
status=$?
echo "Completion Status: $status" >> $tmpf