ScriptsMay 26, 2026·3 min read

fio — Flexible I/O Tester for Storage Benchmarking

fio is a configurable I/O workload generator used to benchmark and stress-test storage subsystems with precise control over read/write patterns, block sizes, and concurrency.

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
fio Overview
Direct install command
npx -y tokrepo@latest install 94698b64-5920-11f1-9bc6-00163e2b0d79 --target codex

Run after dry-run confirms the install plan.

Introduction

fio (Flexible I/O Tester) is the industry-standard tool for benchmarking storage devices and filesystems. Written in C, it can simulate virtually any I/O workload pattern by combining configurable block sizes, queue depths, access patterns, and I/O engines. It is used by storage vendors, kernel developers, and DevOps engineers to validate hardware and tune systems.

What fio Does

  • Generates sequential, random, or mixed read/write workloads at any block size
  • Supports dozens of I/O engines including libaio, io_uring, sync, mmap, and RDMA
  • Runs multiple parallel jobs to stress-test concurrency and queue depth scaling
  • Reports IOPS, bandwidth, and latency at configurable percentile levels
  • Accepts job files in INI format for repeatable, shareable benchmark definitions

Architecture Overview

fio spawns one or more worker threads or processes, each executing an I/O loop defined by a job specification. Each job selects an I/O engine (the syscall or library interface), an access pattern (sequential, random, zipf), and parameters like block size and queue depth. A central statistics collector aggregates per-job metrics and emits a summary with IOPS, bandwidth, and latency percentiles.

Self-Hosting & Configuration

  • Install via package manager or compile from source with ./configure && make
  • Define workloads in .fio job files (INI-style) for reproducible benchmarks
  • Use --direct=1 to bypass the page cache and measure raw device performance
  • Select the I/O engine matching your target: io_uring for modern Linux, libaio for legacy
  • Output results as JSON with --output-format=json for automated analysis pipelines

Key Features

  • Supports 30+ I/O engines including io_uring, libaio, POSIX AIO, and Windows IOCP
  • Configurable access patterns: sequential, random, strided, and custom distributions
  • Per-job and group reporting with latency histograms and percentile breakdowns
  • Verification mode writes checksums and reads them back to detect data corruption
  • Job file format allows sharing and version-controlling benchmark definitions

Comparison with Similar Tools

  • sysbench fileio — Simpler file I/O test but far fewer tuning options than fio
  • dd — Basic sequential throughput test, no random I/O or latency reporting
  • bonnie++ — Classic filesystem benchmark with fixed test patterns
  • Iometer — Windows-centric GUI benchmark, less flexible than fio on Linux
  • diskspd — Microsoft's storage benchmarking tool, Windows-focused

FAQ

Q: Should I use direct I/O or buffered I/O for benchmarks? A: Use --direct=1 to measure raw device speed. Buffered I/O benchmarks test the page cache, which is useful for application-level analysis.

Q: What I/O engine should I use on modern Linux? A: io_uring offers the best performance on Linux 5.1+. Fall back to libaio for older kernels.

Q: How do I benchmark NVMe devices? A: Use io_uring or libaio with high iodepth (64-256) and multiple jobs to saturate the device's internal parallelism.

Q: Can fio simulate real application workloads? A: Yes. Record an application's I/O trace with blktrace and replay it with fio's replay_redirect option.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets