Skip to content

Instantly share code, notes, and snippets.

@jamiew
Created December 6, 2019 14:32
Show Gist options
  • Save jamiew/564eefb090367fd0f36876e431ca7791 to your computer and use it in GitHub Desktop.
Save jamiew/564eefb090367fd0f36876e431ca7791 to your computer and use it in GitHub Desktop.
# on debian-based linux
# run as root so drop_caches works
for i in /home/jamie /mnt/duo /mnt/data3; do
echo $i
echo "writes: "
dd if=/dev/zero of=$i/tempfile bs=1M count=1024 conv=fdatasync,notrunc status=progress 2>&1 | grep copied
echo "dropping caches..."
echo 3 > /proc/sys/vm/drop_caches
echo "reads: "
dd if=$i/tempfile of=/dev/null bs=1M count=1024 status=progress 2>&1 | grep copied;
echo "buffered reads: "
dd if=$i/tempfile of=/dev/null bs=1M count=1024 status=progress 2>&1 | grep copied
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment