Skip to content

ZFSBench is a high-performance benchmarking tool designed to test the capabilities of ZFS datasets. It supports concurrent I/O operations, customizable configurations, and provides detailed performance metrics, including IOPS, throughput, and latency.

License

Notifications You must be signed in to change notification settings

vimanuelt/zfsbench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZFSBench

ZFSBench is a high-performance benchmarking tool designed to test the capabilities of ZFS datasets. It supports concurrent I/O operations, customizable configurations, and provides detailed performance metrics, including IOPS, throughput, and latency. ZFSBench is useful for testing ZFS configurations under various workloads to ensure optimal performance and reliability.

Features

  • Concurrent I/O Testing: Simulate multi-threaded read and write operations.
  • Configurable Workloads: Set block size, data size, sync frequency, and more.
  • Advanced ZFS Controls: Optionally disable ARC caching and compression.
  • Detailed Reporting: IOPS, throughput, and latency percentiles.
  • Logging: Generates a log file for each run with comprehensive metrics.
  • Optional gstat Monitoring: Gather additional disk activity data.

Table of Contents

Installation

Prerequisites

  • Go: Version 1.17 or later
  • ZFS: Ensure ZFS is installed and configured on the system
  • Sufficient Disk Space: Available space on the target ZFS dataset

Building the Tool

Clone the repository and build the application:

git clone <repo-url>
cd zfsbench
go build -o zfsbench src/main.go

Usage

To start a benchmark, specify the ZFS dataset you want to test. Replace <zfs-dataset> with your dataset (e.g., zroot/home).

sudo ./zfsbench -dataset=<zfs-dataset>

For detailed instructions on configuring and running benchmarks, see USAGE.md.

Configuration Options

ZFSBench offers a range of command-line options to customize the benchmark. Here are some of the primary options:

Option Description Default
-dataset (Required) Target ZFS dataset for benchmarking.
-blocksize Block size (in bytes) for I/O operations. 4096
-datasize Total data size (in bytes) to write per benchmark iteration. 128MB
-syncfreq Frequency (in blocks) for syncing data during writes. 10000
-goroutines Number of concurrent threads. 4
-runs Number of iterations for the benchmark. 5
-nocache Disable ZFS ARC caching for the duration of the test. false
-nocompress Disable ZFS compression on the dataset. false
-gstat Use gstat for additional disk metrics. false
-randomio Perform random I/O operations. false

For a complete list of options and examples, refer to USAGE.md.

Example Commands

Basic Benchmark

sudo ./zfsbench -dataset=zroot/home

Random I/O with 8 Threads, Sync Every 5000 Blocks, and Cache Disabled

sudo ./zfsbench -dataset=zroot/home -goroutines=8 -syncfreq=5000 -randomio -nocache

Custom Block Size and Data Size with Compression Disabled

sudo ./zfsbench -dataset=zroot/home -blocksize=16384 -datasize=1073741824 -nocompress

For more examples, see USAGE.md.

Output

The results from each run are displayed on the console and saved in a log file in the format zfsbench_<timestamp>.log. Logs include:

  • Write Performance: Average time for write operations.
  • Read Performance: Average time for read operations.
  • IOPS: Input/Output operations per second.
  • Throughput: Data transfer rate in MB/sec.

Sample Output

Average Write Performance: 4.57s
Average Read Performance: 198ms
Average IOPS: 379,260
Average Throughput: 370.37 MB/sec
Comprehensive Report:
    Write Duration: 4.57s
    Read Duration: 198ms
    Average IOPS: 379,260
    Average Throughput: 370.37 MB/sec

About

ZFSBench is a high-performance benchmarking tool designed to test the capabilities of ZFS datasets. It supports concurrent I/O operations, customizable configurations, and provides detailed performance metrics, including IOPS, throughput, and latency.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages