Created
March 6, 2019 06:04
-
-
Save adam900710/ca47b9a8d4b8db7168b261b6fba71ff1 to your computer and use it in GitHub Desktop.
Performance test with btrfs perf interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dev=/dev/test/test | |
mnt=/mnt/btrfs | |
trace_result="/home/adam/trace" | |
_fail() | |
{ | |
echo "!!! FAILED: $@ !!!" | |
exit 1 | |
} | |
start_trace() | |
{ | |
while true; do | |
sleep 1 | |
cat /sys/fs/btrfs/1b4e28ba-2fa1-11d2-883f-b9a761bde3fb/profiler >> $trace_result | |
done | |
} | |
umount $dev &> /dev/null | |
umount $mnt &> /dev/null | |
rm $trace_result | |
wipefs -fa $dev | |
mkfs.btrfs -f $dev -U 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb | |
mount $dev $mnt -o enospc_debug | |
start_trace & | |
trace_pid=$! | |
/home/adam/xfstests-dev/ltp/fsstress -d $mnt -w -n 10000000 -p 4 & | |
sleep 120 | |
killall -KILL fsstress | |
kill $trace_pid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment