How to Evaluate Storage Performance on Linux: Benchmarking with Open Tools

In Last time We talked about open-source tools for evaluating CPU and memory performance. Today, we discuss benchmarks for file systems and storage systems on Linux — Interbench, Fio, Hdparm, S, and Bonnie.

How to Evaluate Storage Performance on Linux: Benchmarking with Open Tools
Photo - Daniele Levis Pelusi - Unsplash

Fio

Fio (which stands for Flexible I/O Tester) generates data I/O streams from the disk to evaluate the performance of the Linux file system. The utility can also be run on Windows — it requires installing the command line interface. Cygwin. A setup guide is available in the fio repository on GitHub.

The author of fio is Jens Axboe (Jens Axboe), ) responsible for the IO subsystem in Linux and the developer of the utility blktrace for tracing I/O operations. He created fio because he got tired of manually writing programs for specific load testing.

The utility will calculate IOPS and throughput of the system, as well as allow assessing the depth of the I/O operation queue. The utility works with special files (with the .fio extension), which contain the settings and test conditions. There are several test options, for example, there are random writes, reads, and rewrites. Here is an example the content of a file for the first case:

[global]
	name=fio-rand-read
	filename=fio-rand-read
	rw=randread
	bs=4K
	direct=0
	numjobs=1
	time_based=1
	runtime=900

Today, fio is used by large companies — the utility is employed in openSUSE, Nutanix and IBM.

Hdparm

The utility was written by Canadian developer Mark Lord back in 2005. It is still maintained by the author and is included in many popular distributions. The main purpose of hdparm is to configure drive parameters. However, the tool in can be used to conduct simple benchmarks, such as measuring read speed. For this, you need to write the command in the console:

$ sudo hdparm -t /dev/sdb

The system will generate a response like this:

Timing buffered disk reads: 242 MB in 3.01 seconds = 80.30 MB/sec

Regarding drive configuration, hdparm allows changing cache size, modifying sleep and power settings, as well as securely erasing data on SSDs. However, as warn specialists from ArchLinux advise, careless changes to system parameters can make data on the disk inaccessible and even damage the drive. Before working with hdparm, it is better to familiarize yourself with the guide — just type the command man hdparm in the console.

S

This is a set of benchmarks for assessing the performance of input/output systems. The utility was created by a team of developers from the AlgoDev group, which includes employees of the Italian University of Modena and Reggio Emilia..

All benchmarks are bash scripts, evaluating the performance of data storage systems — throughput, latency, scheduler performance. For example, the benchmark throughput-sync.sh 'bombards' the storage system with read or write requests (in this case, the already mentioned utility fio is used). Here is the code of this script..

Another script, comm_startup_lat.sh, measures the latency of reading data from the disk with a 'cold cache' (when it has no needed data). The code can also be found in the repository..

How to Evaluate Storage Performance on Linux: Benchmarking with Open Tools
Photo - Agê Barros - Unsplash

Bonnie

A utility for assessing file system performance, developed in 1989. Its author is engineer Tim Bray. With Bonnie he aimed to optimize the operation of computing systems involved in the project New Oxford English Dictionary at the University of Waterloo.

Bonnie a check of the login and password against a database of compromised accounts, issuing a warning if issues are detected (the check is performed using a hash prefix on the user’s side). The check covers a database of over 4 billion compromised accounts that have appeared in data leaks. A warning is also issued when attempting to use trivial passwords such as 'abc123'. A specific setting has been implemented to manage the enabling of Password Checkup in the 'Sync and Google Services' section. random reading and writing of data to the disk. Afterward, the utility displays parameters such as the number of bytes processed per CPU second, as well as the CPU load percentage. The source code of the benchmark can be found on Google Code..

Based on Bonnie, another suite of tools for hard disk testing is built — Bonnie++ (written in C++, instead of C). It features additional benchmark tools. For example, zcav to assess the performance of different HDD zones. Bonnie++ is also suitable for testing mail servers and database servers.

Interbench

The utility was developed by Con Kolivas, an Australian anesthesiologist known for his contributions to Linux kernel development and work on thefair CPU scheduler.Interbench helps configure the parameters of I/O and file system schedulers.

Interbench simulates the behavior of the CPU scheduler during the execution of interactive tasks. These interactive tasks can include working with sound and video, launching computer games, or simply dragging a dialog window in the operating system.

The source code, examples, and configuration recommendations can be found in the official GitHub repository..

What we write about in our blogs:

How to Evaluate Storage Performance on Linux: Benchmarking with Open Tools Benchmarks for Linux servers: 5 open tools

How to Evaluate Storage Performance on Linux: Benchmarking with Open Tools File backup: how to prepare for data loss
How to Evaluate Storage Performance on Linux: Benchmarking with Open Tools How to migrate a system hard drive to a virtual machine?
How to Evaluate Storage Performance on Linux: Benchmarking with Open Tools Training environment for admins: how the cloud can help

How to Evaluate Storage Performance on Linux: Benchmarking with Open Tools Gadget inspections at the border: how to act to avoid losing confidential data?
How to Evaluate Storage Performance on Linux: Benchmarking with Open Tools Snapshots: why are 'pictures' needed?

Source: habr.com

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster