Posted On August 24, 2021

Linux: Testing Disk Speed

kimconnect 0 comments
blog.KimConnect.com >> Linux >> Linux: Testing Disk Speed

Below is an exercise in comparing 2 different media: external USB drive vs a SD card

# Perform the WRITE test on USB Disk
outputFile=/media/data/test.img
blocksize=1G
numberOfBlocks=1
dd if=/dev/zero of=$outputFile bs=$blocksize count=$numberOfBlocks oflag=dsync
rm $outputFile

# Perform the WRITE test on SD Card
outputFile=/media/kim/2849-2EAD/test.img
blocksize=1G
numberOfBlocks=1
dd if=/dev/zero of=$outputFile bs=$blocksize count=$numberOfBlocks oflag=dsync
rm $outputFile

# Read test must be performed subsequent to clearing the data being stored in RAM by switching the disk1 vs disk2 test files...

# Perform READ test on USB Disk
outputFile=/media/data/test.img
blocksize=1G
numberOfBlocks=1
echo 3 | sudo tee /proc/sys/vm/drop_caches
dd if=$outputFile of=/dev/null bs=$blocksize count=$numberOfBlocks

# Perform the READ test on SD Card
outputFile=/media/kim/2849-2EAD/test.img
blocksize=1G
numberOfBlocks=1
echo 3 | sudo tee /proc/sys/vm/drop_caches
dd if=$outputFile of=/dev/null bs=$blocksize count=$numberOfBlocks

Results:

# USB External Drive Write Speed
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 30.8095 s, 34.9 MB/s

# USB External Drive Read Speed
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 26.5893 s, 40.4 MB/s

# SD Card Write Speed
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 167.147 s, 6.4 MB/s

# SD Card Read Speed
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 68.2176 s, 15.7 MB/s

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

How to Install Asterisk on Ubuntu

su[enter root password]cd /tempwget apt-get install build-essential wget libssl-dev libncurses5-dev libnewt-dev libxml2-dev linux-headers-$(uname -r) libsqlite3-dev…

Step by Step Kubernetes Application Hosting: Persistent Storage, Pod Creation, Deployment Plan, Service Clustering, and Ingress Routing

Overview Update: we have a new article which goes directly into a production-style setup of…

Baseline Server Image

OS: CentOS 7 Minimal Obtain ISO from https://www.centos.org/download/ Create Bootable USB On a CentOS 6.5, Ubuntu…