In this post I will show you multiple ways to test read and write performance on your Debian installation. To get accurate results we will go through multiple tests and take some averages.
First things first, lets update our Debian apt package.
Our first test is with my favorite hard drive performance utility, hdparm. Hdparm is a standard package available in just about every single Linux distro.
The following command will actually read the performance from our first partition, which coincidentally resides on our first hard drive.
Running a second test the results are similar, but slightly faster.
The reason we run the test multiple times is to rule out any memory caching to spoil or result accuracy. If you are on a virtual machine there is always a possibility of your first results being skewed.
Our second program comes with every Linux distro I have ever installed. DD lets you take most inputs like random, null, zero and output them to a file. This is extremely fast and as a bonus you can easily control your block size. Since we are outputting data to a hard disk, DD lets us record the amount of time it takes to read or write and give performance results.
First we test write speed. The first test is to clear out the cache buffer.
The second test is the more accurate result.
Now let us test the read speed, which is normally much faster. We can take our previous tempfile and use it as input. First things first, lets clear the cache buffer.
With the cache buffer cleared we should now get a clear picture of our real read speed.
With this VM that is a pretty accurate read speed.
Be sure to clean up your tempfile by deleting it!