Serverspace Black Friday
JT
December 8 2023
Updated December 8 2023

How To Test Speed of the Disk?

Linux Maintenance Monitoring

Why we use estimate tools?

We utilise stress tools in an attempt to evaluate the behaviour of our systems under high loads. Stress testing provides us with real time data that allows for adjustments to be made if necessary before launching into live services, helping to avoid possible failure points or slow performance times due to increased user volumes. So in order to meet customer expectations and ensure a satisfactory service we use stress test tools.

How to check disk?

One of the main component of the server which also we need to keep in our mind - disk! Absolutely, no one high load test cannot be go with out testing health and speed of disk system.
Unfortunately, in the internet there are many way to check, which drive you in the Spanish shame:

  • science article with described estimated speed of cluster FS with dd utility and enabled file cache;
  • usage bonnie++;
  • usage iozone;
  • usage cp utility with counting time.

All these methods are fundamentally incorrect, in that instruction we will not consider why you don’t use them. But if explain in few words part of the program needed to estimate speed of closing and opening file, some utility estimate linear speed, that isn’t max speed of the disk or real productivity and etc.
For fast checking server we will use sysbench, that method also don’t clean, but allow to estimate rapidly and close to real value!

For that we need to update indexes and upgrade packages, by the command:

apt update && apt upgrade
Update
Screenshot №1 — Update package

Wait till the process will end, now we can download needed package:

apt install sysbench
APT
Screenshot №2 — APT

Sysbench allows us to take measurements with various algorithms, which provide synthetic high load. We will use method with random value, which will be write and read.

We need to prepare data test if the size of the test file is less than the RAM, then when testing solid-state or hard drives, the system can use the RAM cache to store data. This can lead to distortion of the test results, since read and write operations will be performed in RAM, and not on the disk itself. It is recommended to use test files exceeding the amount of RAM to evaluate the actual performance of the disk subsystem.

sysbench fileio --file-total-size=10G prepare
Test data
Screenshot №3 — Test data

Then we finally run our test:

sysbench fileio --file-total-size=10G --file-test-mode=rndrw --time=300 --max-requests=0 run
First test
Screenshot №4 — First test

The significance of thread count becomes apparent when considering tasks that involve the disk subsystem and can be executed simultaneously. Increasing the number of threads has the potential to enhance the efficiency of disk resource utilization, making it a valuable consideration for optimizing performance in scenarios involving parallel tasks

sysbench fileio --file-total-size=10G --file-test-mode=rndrw --time=300 --max-requests=0 --threads=4 run
Second test
Screenshot №5 — Second test

If we don’t want to save temporary giant file with test data then clean that by the command:

sysbench fileio cleanup
Clean up
Screenshot №6 — Clean up

As the result we can use average speed of disk, as we can see our SSD have great result!

 

Stress testing is an indispensable practice for evaluating system behavior under high loads, ensuring optimal performance and preemptively addressing potential issues. While examining various aspects of server performance, it is crucial not to overlook the significance of disk health and speed.

Vote:
5 out of 5
Аverage rating : 5
Rated by: 1
33145 North Miami, FL 2520 Coral Way apt 2-135
+1 302 425-97-76
700 300
ITGLOBAL.COM CORP
700 300
We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.