Benchmark ZFS Performance with Bonnie++


Bonnie++ hard disk drive hdd benchmark

When it comes to measuring the performance of a computer or storage device, benchmarks are an essential tool. Bonnie++ is a popular benchmarking tool for measuring disk performance on Unix-based systems. It is widely used by system administrators and developers to test the speed and reliability of storage devices. In this blog post, we will explore what Bonnie++ is and how it can be used to benchmark disk performance.

What is Bonnie++?

Bonnie++ is a benchmarking tool that measures the disk performance of Unix-based systems. It was created as a replacement for the original Bonnie benchmark. Bonnie++ is an open-source tool that is freely available under the GPL license.

Bonnie++ works by writing and reading files of various sizes and types to a storage device, measuring the speed at which the operations are performed. The tool can also be used to test the reliability of the storage device by detecting errors or failures during the benchmarking process.

How to use Bonnie++ for disk benchmarking

Using Bonnie++ to benchmark disk performance is a relatively straightforward process. Here’s a step-by-step guide:

  1. Install Bonnie++ on your Unix-based system. On most Linux distributions, this can be done using the package manager. For example, on Ubuntu or Debian, you can use the following command:
sudo apt-get install bonnie++
  1. Determine the device or file system that you want to benchmark. This could be a physical disk, a partition, or a file system.
  2. Run Bonnie++ with the desired options. The following command is an example of how to run Bonnie++ to benchmark a file system:
bonnie++ -u root -s 32G -d /tank/bonnie -f -b -n 0
  • -d specifies the path to the file system or device to be tested.
  • -r specifies the block size for writing and reading files.
  • -s specifies the size of the files to be written and read.
  • -x specifies the number of times to repeat the test.
  • -f fast mode control, skips per-char IO tests if no parameter.
  • -b no write buffering.
  • -n number of files for file creation test (if 0, then this test will be skipped).
  1. Bonnie++ may take several minutes to complete the benchmarking process, depending on the size of the files and the speed of the device. While the Bonnie++ benchmark is running, you can use other tools to analyze performance active benchmarking. Tools you can use include vmstat, iostat, htop, etc.
iostat -xnz 1
vfsstat 1
  1. Analyze the results. Bonnie++ generates a report that includes various statistics, such as throughput, latency, and CPU usage. The report can be used to compare the performance of different storage devices or to identify potential performance bottlenecks.


Bonnie++ is a powerful benchmarking tool that can be used to measure the performance and reliability of storage devices on Unix-based systems. By writing and reading files of various sizes and types, Bonnie++ can provide valuable insights into the speed and efficiency of the storage device.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.