Hardware

Check Your (Write) Disk Speed In The Terminal

Today we’re going to discuss one way for you to check your write disk speed in the terminal. That is, we’re going to learn how long it takes you to write data to your disk drives. It’s a very simple set of commands and easy enough for anyone to try. There are other methods, this is just one of them.

After all, I recently did an article that let you check your (read) disk speed in the terminal. I might as well do an article that lets you check your write disk speed in the terminal. The former article was about how fast you can read data from your disk drives. The current article is about how fast you can write data to your disk drives.

There’s not really all that much real world work that this is going to benefit. You’re able to read and write data as fast as you’re able to read and write data. If you want to change that, invest in different hardware. Knowing the read and write rates really doesn’t do you much good – it’s just an interesting bit of information and maybe a reason for you to brag to your friends.

Today we’ll be using the ‘dd’ command. Be sure to be careful with this command because once you set it loose it does exactly what you told it to do. It can and will cause you to reach for your backups… If you don’t know, ‘dd’ defines itself as a tool to convert and copy files. You should read the man page sometime. It’s a rather robust, and potentially complicated, application.

Anyhow…

Check Your (Write) Disk Speed In The Terminal:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

The first thing we’re going to do is make a new directory and move to it.

mkdir test && cd test

Now, let’s start testing. I’m going to assume you have at least 10 GB worth of space (we’ll be using ~5.5 GB, or 5 GiB). If you do not have enough space, don’t run this command until you do have that much free disk space. The command to run the test is:

sudo dd if=/dev/zero of=test.img bs=1G count=5 status=progress

Here’s a test result on a slower, in use SSD, about what I expect most users to have:

5368709120 bytes (5.4 GB, 5.0 GiB) copied, 92 s, 58.1 MB/s
5+0 records in
5+0 records out
5368709120 bytes (5.4 GB, 5.0 GiB) copied, 92.3733 s, 58.1 MB/s

It will show you the progress, as we’ve enabled that in the dd command. It won’t take all that long for the test to complete. Unless your drive was otherwise heavily occupied, there’s little to gain from running the test multiple times.

Anyhow,  how about we cleanup after ourselves? As the file was made with ‘sudo’ so too shall it be removed with ‘sudo’. It will probably even ask you for confirmation.

sudo rm test.img

And delete the directory:

rmdir ~/test

That should have cleaned up our mess, all nice and fancy like. There’s no real reason to keep a 5.4 GB test file hanging around and you already have the test results.

Closure:

There you have it! You now have another article and this one will show you how to check your write disk speeds for your drives. If you want to test other drives, just write the file to those drives by navigating there first in the terminal. ‘Snot all that difficult.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Recent Posts

View Detailed Hardware Information

There are many tools for showing your hardware information and today we'll get to view…

2 days ago

How To: Install Wine In Lubuntu

Today's article isn't going to be complicated or long as we are going to cover…

4 days ago

Update Python Packages (PIP)

We've had a run of Python packages recently and you can tell that I'm a…

6 days ago

Save A Command’s Output To A File (While Showing It In The Terminal)

The title is the best I can come up with to describe this exercise as…

1 week ago

Demystifying journalctl: A Comprehensive Guide to Linux System Logging

It was suggested that I write an article about journalctl, which seemed like a large…

1 week ago

Extract Text From Multiple File Types

Today we will have a fairly simple exercise as we're going to just use a…

2 weeks ago