Skip to content

Instantly share code, notes, and snippets.

@kehh
Last active May 18, 2018 02:33
Show Gist options
  • Save kehh/813bd592f912d04e701cf148d8799274 to your computer and use it in GitHub Desktop.
Save kehh/813bd592f912d04e701cf148d8799274 to your computer and use it in GitHub Desktop.
Disk read / write speed
#!/bin/bash
# Test read speed
sudo hdparm -Tt /dev/sda
# Results:
# /dev/sda:
# Timing cached reads: 18564 MB in 1.99 seconds = 9311.48 MB/sec
# Timing buffered disk reads: 1418 MB in 3.00 seconds = 472.03 MB/sec
# Test write speed
dd count=1k bs=1M if=/dev/zero of=~/test.img
# Results:
# 1024+0 records in
# 1024+0 records out
# 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.61916 s, 297 MB/s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment