4 # Buffered random write performance test.
6 #-----------------------------------------------------------------------
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #-----------------------------------------------------------------------
26 seqres=$RESULT_DIR/$seq
27 echo "QA output created by $seq"
33 status=1 # failure is the default!
34 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
36 # get standard environment, filters and checks
41 # real QA test starts here
45 _require_block_device $SCRATCH_DEV
50 _size=$((16 * $LOAD_FACTOR))
51 cat >$fio_config <<EOF
53 directory=${SCRATCH_MNT}
62 _require_fio $fio_config
66 # We are going to write at least 16gib, make sure our scratch fs is large enough
67 # to fit and not deal with any enospc overhead.
68 _size=$(($_size * 4 * 1024 * 1024))
69 _scratch_mkfs >> $seqres.full 2>&1
71 _require_fs_space $SCRATCH_MNT $_size
73 cat $fio_config >> $seqres.full
74 $FIO_PROG --output-format=json --output=$fio_results $fio_config
77 cat $fio_results >> $seqres.full
78 _fio_results_compare $seq $fio_results
79 echo "Silence is golden"