Skip to content

Instantly share code, notes, and snippets.

@rye
Created June 21, 2017 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rye/77c3bb3fe175a4f98bec297d8604dd71 to your computer and use it in GitHub Desktop.
Save rye/77c3bb3fe175a4f98bec297d8604dd71 to your computer and use it in GitHub Desktop.
#!/bin/bash
for i in raid{5,6,10};
do
echo ">>> Benchmarking $i..."
sudo bonnie++ -c 1 -d /$i -s 524288 -n 1024 -m $i -u root -bf 2>&1 | sudo tee $i.out
echo ">>> Done!"
echo ">>> Cleaning up... (sync; echo 3 > /proc/sys/vm/drop_caches)"
sudo sync
sudo su -c "echo 3 > /proc/sys/vm/drop_caches"
echo ">>> Done! All cleaned up."
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment