Skip to content

Instantly share code, notes, and snippets.

@onebytegone
Created December 18, 2021 15:30
Show Gist options
  • Save onebytegone/e0038ce30c55e3f53554867e8d9884b9 to your computer and use it in GitHub Desktop.
Save onebytegone/e0038ce30c55e3f53554867e8d9884b9 to your computer and use it in GitHub Desktop.
Testing Disk Drive Speed Via CLI
cd /tmp
time dd if=/dev/zero bs=2048k of=tstfile count=8192 2>&1 | awk '/sec/ {print $1 / $5 / 1048576, "MB/sec" }'
ls -al tstfile
time dd if=tstfile bs=2048k of=/dev/null count=8192 2>&1 | awk '/sec/ {print $1 / $5 / 1048576, "MB/sec" }'

Note: If the machine has more than 16GB of free RAM, the read speed may be incorrect due to RAM caching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment