Skip to content

Instantly share code, notes, and snippets.

@zoonderkins
Last active November 16, 2018 14:54
Show Gist options
  • Save zoonderkins/fabac79df2056e2e19ecb87fb4752557 to your computer and use it in GitHub Desktop.
Save zoonderkins/fabac79df2056e2e19ecb87fb4752557 to your computer and use it in GitHub Desktop.
Linux common benchmark methods #linux

Disk IO

# Terminal method

hdparm -Tt /dev/sda

time sh -c "dd if=/dev/zero of=ddfile bs=8k count=250000 && sync"; rm ddfile

dd if=/dev/zero of=/tmp/output bs=8k count=10k; rm -f /tmp/output

dd if=/dev/zero of=/tmp/output conv=fdatasync bs=384k count=1k; rm -f /tmp/output

# Write speed
dd if=/dev/zero of=./largefile bs=1M count=1024
# Read speed
dd if=./largefile of=/dev/null bs=4k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment