X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fobdfilter-survey.sh;h=94a5182f620619b742b9060fc8afd8321f10717c;hb=80a818b80373bebd1438a74aeebda102b4885e53;hp=42a6c0f1528c04ff2c09935c8d0272680be85ff9;hpb=664d20fd5a30d2100a52cca0e0b5fa1a1cec8aa4;p=fs%2Flustre-release.git diff --git a/lustre/tests/obdfilter-survey.sh b/lustre/tests/obdfilter-survey.sh index 42a6c0f..94a5182 100644 --- a/lustre/tests/obdfilter-survey.sh +++ b/lustre/tests/obdfilter-survey.sh @@ -50,7 +50,7 @@ get_targets () { for d in $devs; do # if oss is local -- obdfilter-survey needs dev wo/ host target=$d - [[ $oss = `hostname` && "$1" == "netdisk" ]] || target=$nid:$target + [[ $oss = `hostname` && "$1" == "disk" ]] || target=$nid:$target targets="$targets $target" done done @@ -94,7 +94,7 @@ print_jbd () { local varsvc=${facet}_svc local dev=$(ldiskfs_canon "*.${!varsvc}.mntdev" $facet) - # ext4: /proc/fs/jbd2/sda1:8/history + # ext4: /proc/fs/jbd2/sda1:8/history # ext3: /proc/fs/jbd/sdb1/history do_facet $facet cat /proc/fs/jbd*/${dev}*/$file @@ -103,11 +103,14 @@ print_jbd () { check_jbd_values () { local facet=$1 local thrhi=$2 + local rtime=$3 # last two lines from history # $4: run >= 5000 # $8: hndls >= thrhi * 2 - local hist=("$(print_jbd history $facet | tail -3 | head -2)") + # display history of rtime/4 before, in case obd cleanup consumes time + local tlines=$((rtime / 5 / 4 + 1)) + local hist=("$(print_jbd history $facet | tail -$tlines | head -n1)") echo "$hist" local run=($(echo "${hist[*]}" | awk '{print $4}')) local hndls=($(echo "${hist[*]}" | awk '{print $8}')) @@ -125,10 +128,11 @@ check_jbd_values () { check_jbd_values_facets () { local facets=$1 local thrhi=$2 + local rtime=$3 local facet local rc=0 for facet in ${facets//,/ }; do - check_jbd_values $facet $thrhi || rc=$((rc+$?)) + check_jbd_values $facet $thrhi $rtime || rc=$((rc+$?)) done return $rc } @@ -136,14 +140,21 @@ check_jbd_values_facets () { test_1b () { local param_file=$TMP/$tfile-params - do_nodesv $(comma_list $(osts_nodes)) lctl get_param obdfilter.${FSNAME}-*.sync_journal - - save_lustre_params $(comma_list $(osts_nodes)) "obdfilter.${FSNAME}-*.sync_journal" >$param_file - do_nodesv $(comma_list $(osts_nodes)) lctl set_param obdfilter.${FSNAME}-*.sync_journal=0 + do_nodesv $(comma_list $(osts_nodes)) \ + $LCTL get_param obdfilter.${FSNAME}-*.sync_journal + save_lustre_params $(get_facets OST) \ + "obdfilter.${FSNAME}-*.sync_journal" > $param_file + do_nodesv $(comma_list $(osts_nodes)) \ + $LCTL set_param obdfilter.${FSNAME}-*.sync_journal=0 + local stime=$(date +%s) thrlo=4 nobjhi=1 thrhi=4 obdflter_survey_run disk + local etime=$(date +%s) + # run time of obd survey + local rtime=$((etime - stime)) - check_jbd_values_facets $(get_facets OST) 4 || rc=$((rc+$?)) + echo "obd survey finished in $rtime seconds" + check_jbd_values_facets $(get_facets OST) 4 $rtime || rc=$((rc+$?)) restore_lustre_params < $param_file @@ -152,6 +163,12 @@ test_1b () { } run_test 1b "Object Storage Targets survey, async journal" +test_1c () { + nobjlo=1 nobjhi=1 thrlo=32 thrhi=32 rszlo=1024 rszhi=1024 size=8192\ + obdflter_survey_run disk +} +run_test 1c "Object Storage Targets survey, big batch" + test_2a () { obdflter_survey_run netdisk } @@ -160,14 +177,20 @@ run_test 2a "Stripe F/S over the Network" test_2b () { local param_file=$TMP/$tfile-params - do_nodesv $(comma_list $(osts_nodes)) lctl get_param obdfilter.${FSNAME}-*.sync_journal - - save_lustre_params $(comma_list $(osts_nodes)) "obdfilter.${FSNAME}-*.sync_journal" >$param_file - do_nodesv $(comma_list $(osts_nodes)) lctl set_param obdfilter.${FSNAME}-*.sync_journal=0 + do_nodesv $(comma_list $(osts_nodes)) \ + $LCTL get_param obdfilter.${FSNAME}-*.sync_journal + save_lustre_params $(get_facets OST) \ + "obdfilter.${FSNAME}-*.sync_journal" > $param_file + do_nodesv $(comma_list $(osts_nodes)) \ + $LCTL set_param obdfilter.${FSNAME}-*.sync_journal=0 + local stime=$(date +%s) thrlo=4 nobjhi=1 thrhi=4 obdflter_survey_run netdisk + local etime=$(date +%s) + local rtime=$((etime - stime)) - check_jbd_values_facets $(get_facets OST) 4 || rc=$((rc+$?)) + echo "obd survey finished in $rtime seconds" + check_jbd_values_facets $(get_facets OST) 4 $rtime || rc=$((rc+$?)) restore_lustre_params < $param_file @@ -191,7 +214,7 @@ test_3a () { } run_test 3a "Network survey" -complete $(basename $0) $SECONDS +complete $SECONDS cleanup_echo_devs check_and_cleanup_lustre exit_status