Skip to content

Instantly share code, notes, and snippets.

@fedir
Last active March 15, 2022 20:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fedir/4ea3ac598cf26fe0681d9dd678bef66d to your computer and use it in GitHub Desktop.
Save fedir/4ea3ac598cf26fe0681d9dd678bef66d to your computer and use it in GitHub Desktop.
Disk performance check with dd dsync (synchronized I/O for data)
#!/bin/bash
# Small files (64KB)
dd if=/dev/zero of=./dsync64KB.img bs=64 count=1000 oflag=dsync 2>&1|tee dsync-test-1-64KB.log
# Medium files (8MB)
dd if=/dev/zero of=./dsync8MB.img bs=8k count=1000 oflag=dsync 2>&1|tee dsync-test-2-8MB.log
# Big files (128MB)
dd if=/dev/zero of=./dsync128MB.img bs=128k count=1000 oflag=dsync 2>&1|tee dsync-test-3-128MB.log
for log in dsync*.log; do echo "## $log ##"; cat $log; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment