Created
November 11, 2012 11:10
-
-
Save theirishpenguin/4054602 to your computer and use it in GitHub Desktop.
Simple benchmark for your SSD. Takes into account alignment of your disks
This file contains hidden or 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 | |
# Based on the dd test script at https://wiki.archlinux.org/index.php/SSD_Benchmarking | |
# Disclaimer: Use at your own risk. This program comes with no warranty. | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 # in order for the drop_caches command to work | |
exit 1 | |
fi | |
for i in 1 2 3 4 5 | |
do | |
echo "ITERATION $i" | |
echo "------------" | |
echo "" | |
echo 'WRITE SPEED' | |
dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc | |
echo 3 > /proc/sys/vm/drop_caches | |
echo "" | |
echo 'READ SPEED' | |
dd if=tempfile of=/dev/null bs=1M count=1024 | |
echo "" | |
echo 'BUFFER CACHE READ SPEED' | |
dd if=tempfile of=/dev/null bs=1M count=1024 | |
echo "" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment