Build and install KDiskMark on Linux
KDiskMark is an open-source disk benchmarking tool developed by Dmitry Sidorov, written in C++ using the Qt framework, and hosted on GitHub. It features an intuitive, user-friendly interface similar to CrystalDiskMark, but unlike CrystalDiskMark, KDiskMark is available for Linux systems and does not depend on KDE libraries despite being built with Qt.
The tool leverages the FIO (Flexible I/O Tester) library to perform disk read and write performance tests, allowing users to customize parameters such as block size, queue depth, and thread count for both sequential and random operations. This makes it a versatile tool to fine-tune disk performance testing.
In addition, KDiskMark supports saving the benchmarking results in a .txt file, making it convenient for reporting and analysis. Its open-source nature ensures continued improvements and transparency in its development, making it an excellent alternative for Linux users who need reliable disk benchmarking.
KDiskMark (3.1.4): https://github.com/JonMagon/KDiskMark
Flexible I/O Tester (fio-3.33): https://github.com/axboe/fio
--------------------------------------------------------------------------------
* MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]
* KB = 1000 bytes, KiB = 1024 bytes
[Read]
Sequential 1 MiB (Q= 8, T= 1): 3305.756 MB/s [ 3228.3 IOPS] < 2449.52 us>
Sequential 1 MiB (Q= 1, T= 1): 2256.117 MB/s [ 2203.2 IOPS] < 451.99 us>
Random 4 KiB (Q= 32, T= 1): 692.405 MB/s [ 173101.2 IOPS] < 184.28 us>
Random 4 KiB (Q= 1, T= 1): 53.064 MB/s [ 13266.1 IOPS] < 74.57 us>
[Write]
Sequential 1 MiB (Q= 8, T= 1): 2648.847 MB/s [ 2586.8 IOPS] < 2732.37 us>
Sequential 1 MiB (Q= 1, T= 1): 1279.540 MB/s [ 1249.6 IOPS] < 375.25 us>
Random 4 KiB (Q= 32, T= 1): 365.319 MB/s [ 91329.9 IOPS] < 346.49 us>
Random 4 KiB (Q= 1, T= 1): 172.495 MB/s [ 43123.9 IOPS] < 21.43 us>
Profile: Default
Test: 512 MiB (x5) [Measure: 5 sec / Interval: 5 sec]
Date: 2024-10-05 20:15:08
OS: debian 12 [linux 6.1.0-25-amd64]
After this brief introduction about KDiskMark, let's start with the installation.
Installing KDiskMark on Linux
First of all we have to install any dependency that the tool requires to be downloaded and compiled.
sudo apt install build-essential cmake git qtbase5-dev qttools5-dev libpolkit-qt5-1-1 libpolkit-qt5-1-dev extra-cmake-modules fio libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0 libpmemblk1 librados2 librbd1 libaio1 libaio-dev
For this guide we will use the master
branch. Download the repository and its dependencies using the following command.
git clone --recurse-submodules https://github.com/JonMagon/KDiskMark.git
Now get into kdiskmark folder
cd KDiskMark/
Let's create build directory and get into it
mkdir build && cd build
Now we can compile the code using cmake
tool
cmake -D CMAKE_BUILD_TYPE=Release ..
The compilation process should go without errors
-- The CXX compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Installing in the same prefix as Qt, adopting their path scheme.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/toni/Tools/KDiskMark/build
Note:
The installable package will change according to the Linux distribution you are using. DEB
will be used for Debian-based distributions (Debian, Ubuntu, Linux Mint, etc.), RPM
will be used for Red Hat-based distributions (Red Hat Enterprise Linux (RHEL), Fedora, CentOS, openSUSE, Mandriva, Mageia.), NSIS
for Windows (can be used to generate cross-platform installers that work on Wine), STGZ / SH
: Self-extracting or script-based installers for cross-distribution packaging ...
A list can be found here.
Using cpack
module build the installable package. Debian in this case.
cpack -G DEB
This will create a .deb
package that can be installed using dpkg
sudo dpkg -i kdiskmark_3.1.4_amd64.deb
Finally, we have kdiskmark
installed into our system. Run it at root
using the following command:
sudo kdiskmark
If you spot any typos, have questions, or need assistance with the build, feel free to contact me at: antonimercer@lthjournal.com
This guide contains no affiliate links or ads. If you'd like to support this or future projects, you can do so here:
By supporting monthly you will help me create awesome guides and improve current ones.
Technologies used
KDiskMark, Debian 12, Linux