mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Profiling for perf tests
Stack profiling is quite useful and Linux ZFS test suite does not current collect that data. Linux perf is a common tool for this purpose though the perf record data file can be quite large. With this change, Linux ZFS perf tests capture perf record data if perf is installed on the system and PERF_DO_PROFILING environment variable is set. Reviewed by: John Wren Kennedy <jwk404@gmail.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Tony Nguyen <tony.nguyen@delphix.com> External-issue: LX-971 Closes #7549
This commit is contained in:
parent
a430cef9cd
commit
ba863d0be4
@ -84,6 +84,7 @@ export SYSTEM_FILES='arp
|
||||
openssl
|
||||
parted
|
||||
pax
|
||||
perf
|
||||
pgrep
|
||||
ping
|
||||
pkill
|
||||
|
@ -85,9 +85,12 @@ log_must fio $FIO_SCRIPTS/mkfiles.fio
|
||||
lun_list=$(pool_to_lun_list $PERFPOOL)
|
||||
log_note "Collecting backend IO stats with lun list $lun_list"
|
||||
if is_linux; then
|
||||
export collect_scripts=("zpool iostat -lpvyL $PERFPOOL 1" "zpool.iostat"
|
||||
"vmstat 1" "vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1"
|
||||
"iostat")
|
||||
typeset perf_record_cmd="perf record -F 99 -a -g -q \
|
||||
-o /dev/stdout -- sleep ${PERF_RUNTIME}"
|
||||
|
||||
export collect_scripts=("zpool iostat -lpvyL $PERFPOOL 1" "zpool.iostat"
|
||||
"vmstat 1" "vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1"
|
||||
"iostat" "$perf_record_cmd" "perf")
|
||||
else
|
||||
export collect_scripts=("$PERF_SCRIPTS/io.d $PERFPOOL $lun_list 1" "io"
|
||||
"vmstat 1" "vmstat" "mpstat 1" "mpstat" "iostat -xcnz 1" "iostat")
|
||||
|
@ -85,9 +85,12 @@ log_must fio $FIO_SCRIPTS/mkfiles.fio
|
||||
lun_list=$(pool_to_lun_list $PERFPOOL)
|
||||
log_note "Collecting backend IO stats with lun list $lun_list"
|
||||
if is_linux; then
|
||||
typeset perf_record_cmd="perf record -F 99 -a -g -q \
|
||||
-o /dev/stdout -- sleep ${PERF_RUNTIME}"
|
||||
|
||||
export collect_scripts=("zpool iostat -lpvyL $PERFPOOL 1" "zpool.iostat"
|
||||
"vmstat 1" "vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1"
|
||||
"iostat")
|
||||
"iostat" "$perf_record_cmd" "perf")
|
||||
else
|
||||
export collect_scripts=("$PERF_SCRIPTS/io.d $PERFPOOL $lun_list 1" "io"
|
||||
"vmstat 1" "vmstat" "mpstat 1" "mpstat" "iostat -xcnz 1" "iostat")
|
||||
|
@ -77,9 +77,12 @@ fi
|
||||
lun_list=$(pool_to_lun_list $PERFPOOL)
|
||||
log_note "Collecting backend IO stats with lun list $lun_list"
|
||||
if is_linux; then
|
||||
typeset perf_record_cmd="perf record -F 99 -a -g -q \
|
||||
-o /dev/stdout -- sleep ${PERF_RUNTIME}"
|
||||
|
||||
export collect_scripts=("zpool iostat -lpvyL $PERFPOOL 1" "zpool.iostat"
|
||||
"vmstat 1" "vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1"
|
||||
"iostat")
|
||||
"iostat" "$perf_record_cmd" "perf")
|
||||
else
|
||||
export collect_scripts=("$PERF_SCRIPTS/io.d $PERFPOOL $lun_list 1" "io"
|
||||
"vmstat 1" "vmstat" "mpstat 1" "mpstat" "iostat -xcnz 1" "iostat")
|
||||
|
@ -85,9 +85,13 @@ log_must fio $FIO_SCRIPTS/mkfiles.fio
|
||||
lun_list=$(pool_to_lun_list $PERFPOOL)
|
||||
log_note "Collecting backend IO stats with lun list $lun_list"
|
||||
if is_linux; then
|
||||
typeset perf_record_cmd="perf record -F 99 -a -g -q \
|
||||
-o /dev/stdout -- sleep ${PERF_RUNTIME}"
|
||||
|
||||
export collect_scripts=("zpool iostat -lpvyL $PERFPOOL 1" "zpool.iostat"
|
||||
"$PERF_SCRIPTS/prefetch_io.sh $PERFPOOL 1" "prefetch" "vmstat 1"
|
||||
"vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1" "iostat")
|
||||
"vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1" "iostat"
|
||||
"$perf_record_cmd" "perf")
|
||||
else
|
||||
export collect_scripts=("$PERF_SCRIPTS/io.d $PERFPOOL $lun_list 1" "io"
|
||||
"$PERF_SCRIPTS/prefetch_io.d $PERFPOOL 1" "prefetch" "vmstat 1" "vmstat"
|
||||
|
@ -75,9 +75,13 @@ log_must fio $FIO_SCRIPTS/mkfiles.fio
|
||||
lun_list=$(pool_to_lun_list $PERFPOOL)
|
||||
log_note "Collecting backend IO stats with lun list $lun_list"
|
||||
if is_linux; then
|
||||
typeset perf_record_cmd="perf record -F 99 -a -g -q \
|
||||
-o /dev/stdout -- sleep ${PERF_RUNTIME}"
|
||||
|
||||
export collect_scripts=("zpool iostat -lpvyL $PERFPOOL 1" "zpool.iostat"
|
||||
"$PERF_SCRIPTS/prefetch_io.sh $PERFPOOL 1" "prefetch" "vmstat 1"
|
||||
"vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1" "iostat")
|
||||
"vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1" "iostat"
|
||||
"$perf_record_cmd" "perf")
|
||||
else
|
||||
export collect_scripts=("$PERF_SCRIPTS/io.d $PERFPOOL $lun_list 1" "io"
|
||||
"$PERF_SCRIPTS/prefetch_io.d $PERFPOOL 1" "prefetch" "vmstat 1" "vmstat"
|
||||
|
@ -91,9 +91,13 @@ export TESTFS=$PERFPOOL/$TESTCLONE
|
||||
lun_list=$(pool_to_lun_list $PERFPOOL)
|
||||
log_note "Collecting backend IO stats with lun list $lun_list"
|
||||
if is_linux; then
|
||||
typeset perf_record_cmd="perf record -F 99 -a -g -q \
|
||||
-o /dev/stdout -- sleep ${PERF_RUNTIME}"
|
||||
|
||||
export collect_scripts=("zpool iostat -lpvyL $PERFPOOL 1" "zpool.iostat"
|
||||
"$PERF_SCRIPTS/prefetch_io.sh $PERFPOOL 1" "prefetch" "vmstat 1"
|
||||
"vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1" "iostat")
|
||||
"vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1" "iostat"
|
||||
"$perf_record_cmd" "perf")
|
||||
else
|
||||
export collect_scripts=("$PERF_SCRIPTS/io.d $PERFPOOL $lun_list 1" "io"
|
||||
"$PERF_SCRIPTS/prefetch_io.d $PERFPOOL 1" "prefetch" "vmstat 1" "vmstat"
|
||||
|
@ -77,9 +77,13 @@ log_must fio $FIO_SCRIPTS/mkfiles.fio
|
||||
lun_list=$(pool_to_lun_list $PERFPOOL)
|
||||
log_note "Collecting backend IO stats with lun list $lun_list"
|
||||
if is_linux; then
|
||||
typeset perf_record_cmd="perf record -F 99 -a -g -q \
|
||||
-o /dev/stdout -- sleep ${PERF_RUNTIME}"
|
||||
|
||||
export collect_scripts=("zpool iostat -lpvyL $PERFPOOL 1" "zpool.iostat"
|
||||
"$PERF_SCRIPTS/prefetch_io.sh $PERFPOOL 1" "prefetch" "vmstat 1"
|
||||
"vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1" "iostat")
|
||||
"vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1" "iostat"
|
||||
"$perf_record_cmd" "perf")
|
||||
else
|
||||
export collect_scripts=("kstat zfs:0 1" "kstat" "vmstat -T d 1" "vmstat"
|
||||
"mpstat -T d 1" "mpstat" "iostat -T d -xcnz 1" "iostat"
|
||||
|
@ -77,9 +77,12 @@ fi
|
||||
lun_list=$(pool_to_lun_list $PERFPOOL)
|
||||
log_note "Collecting backend IO stats with lun list $lun_list"
|
||||
if is_linux; then
|
||||
typeset perf_record_cmd="perf record -F 99 -a -g -q \
|
||||
-o /dev/stdout -- sleep ${PERF_RUNTIME}"
|
||||
|
||||
export collect_scripts=("zpool iostat -lpvyL $PERFPOOL 1" "zpool.iostat"
|
||||
"vmstat 1" "vmstat" "mpstat -P ALL 1" "mpstat" "iostat -dxyz 1"
|
||||
"iostat")
|
||||
"iostat" "$perf_record_cmd" "perf")
|
||||
else
|
||||
export collect_scripts=("$PERF_SCRIPTS/io.d $PERFPOOL $lun_list 1" "io"
|
||||
"vmstat 1" "vmstat" "mpstat 1" "mpstat" "iostat -xcnz 1" "iostat")
|
||||
|
Loading…
Reference in New Issue
Block a user