ZFS performance suite should use JSON fio output

Making the default FIO output format be JSON thus easier to post process
performance results. To get previous 'normal' output format,
PERF_FIO_FORMAT can be set prior to invoking zfs-tests.sh. For example:

'PERF_FIO_FORMAT=normal ./zfs-tests.sh -T perf -r ./runfiles/perf.run'

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Nguyen <tony.nguyen@delphix.com>
Closes #9847
This commit is contained in:
Tony Nguyen 2020-01-16 10:16:16 -07:00 committed by Brian Behlendorf
parent 1bb5f5e2b4
commit 1b64627e73

View File

@ -23,6 +23,9 @@
export PERF_RUNTIME_WEEKLY=$((30 * 60)) export PERF_RUNTIME_WEEKLY=$((30 * 60))
export PERF_RUNTIME_NIGHTLY=$((10 * 60)) export PERF_RUNTIME_NIGHTLY=$((10 * 60))
# Default to JSON for fio output
export PERF_FIO_FORMAT=${PERF_FIO_FORMAT:-'json'}
# Default fs creation options # Default fs creation options
export PERF_FS_OPTS=${PERF_FS_OPTS:-'-o recsize=8k -o compress=lz4' \ export PERF_FS_OPTS=${PERF_FS_OPTS:-'-o recsize=8k -o compress=lz4' \
' -o checksum=sha256 -o redundant_metadata=most'} ' -o checksum=sha256 -o redundant_metadata=most'}
@ -139,11 +142,13 @@ function do_fio_run_impl
# Start the load # Start the load
if [[ $NFS -eq 1 ]]; then if [[ $NFS -eq 1 ]]; then
log_must ssh -t $NFS_USER@$NFS_CLIENT " log_must ssh -t $NFS_USER@$NFS_CLIENT "
fio --output /tmp/fio.out /tmp/test.fio fio --output-format=${PERF_FIO_FORMAT} \
--output /tmp/fio.out /tmp/test.fio
" "
log_must scp $NFS_USER@$NFS_CLIENT:/tmp/fio.out $outfile log_must scp $NFS_USER@$NFS_CLIENT:/tmp/fio.out $outfile
else else
log_must fio --output $outfile $FIO_SCRIPTS/$script log_must fio --output-format=${PERF_FIO_FORMAT} \
--output $outfile $FIO_SCRIPTS/$script
fi fi
} }