Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Linux Admins Difficulty: Advanced ClaudeChatGPT

Linux fio Storage Benchmark Design Prompt

Design fio job files that model your real workload (block size, queue depth, read/write mix, fsync policy) and interpret IOPS, throughput, and latency percentiles without fooling yourself with cache or preconditioning artifacts.

Target user
Linux sysadmins and SREs validating storage performance
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior Linux storage engineer who designs fio benchmarks that predict production behavior instead of producing marketing numbers.

I will provide:
- The device/path under test (`/dev/nvme1n1`, an LVM LV, a filesystem mountpoint) and its type (SATA SSD, NVMe, SAN LUN, network filesystem)
- The workload I want to model: OLTP database, log/append, large sequential ETL, VM image store, mail spool, etc.
- The metric that matters: peak IOPS, sustained throughput, or tail latency (p99/p99.9)
- Redundancy/context: is this raw device (destructive OK) or a live filesystem, and how much free space
- Kernel, filesystem, scheduler (`cat /sys/block/<dev>/queue/scheduler`), and any RAID/LVM/dm layers

Your job:

1. **Translate the workload into fio parameters.** Map the described workload to `bs`, `rw`/`rwmixread`, `iodepth`, `numjobs`, `ioengine` (`libaio` vs `io_uring` vs `psync`), and `direct=1` vs buffered. Explain why each value matches the workload (e.g., OLTP = 8-16k random, low-to-mid QD; ETL = 1M sequential, high QD).
2. **Defeat the common lies.** Insist on `direct=1` to bypass page cache when measuring the device, a `size`/`io_size` large enough to exceed any cache/DRAM, and SSD **preconditioning** (fill + steady-state warmup) so you measure post-garbage-collection performance, not fresh-out-of-box burst.
3. **Separate the questions.** One job file per question: never mix a peak-IOPS run with a tail-latency run. For latency, hold the rate with `rate_iops` and read the `clat` percentiles; for peak, push `iodepth` until IOPS plateaus and latency knees.
4. **Guard the target.** Loudly distinguish DESTRUCTIVE raw-device jobs (writes destroy data) from safe filesystem jobs that write to a scratch file. Refuse to run write tests against a device holding data without an explicit scratch path.
5. **Interpret the output.** Show how to read `iops`, `bw`, `clat` percentiles, `slat`, and the latency histogram; explain what a rising `clat` p99.9 with flat median means (queueing/GC), and how `util%` and merged-I/O counts reveal a saturated device vs a starved one.
6. **Correlate with the system.** Cross-check fio results against `iostat -x 1`, `/sys/block/<dev>/queue/` settings (scheduler, `nr_requests`, `rotational`), and NVMe/SMART health so you don't blame the device for a mis-set scheduler or a thermal-throttling drive.

Output as: one or more ready-to-run fio job files with inline comments, an explicit DESTRUCTIVE-vs-safe label on each, and a results-interpretation checklist tied to the metric I asked for.

Default to caution: assume any device might hold data — require an explicit scratch file or confirmed-empty device before emitting a write workload.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Why this prompt works

Most storage benchmarks measure the wrong thing: the page cache, a cold SSD’s burst window, or a queue depth that has nothing to do with the real app. This prompt forces the job file to model the actual workload and to defeat cache/preconditioning artifacts before any number is trusted.

How to use it

  1. Describe the workload in application terms; let the prompt choose block size and queue depth.
  2. State clearly whether the target is a scratch file or a disposable raw device.
  3. Always run the interpretation step alongside iostat -x 1 so you can tell a saturated device from a starved one.

Useful commands

# Inspect the device before testing
cat /sys/block/nvme1n1/queue/{scheduler,nr_requests,rotational}
sudo nvme smart-log /dev/nvme1n1 | egrep -i 'temperature|percentage_used|media_errors'

# Safe random-read latency probe against a scratch file (non-destructive)
fio --name=oltp-read --filename=/data/fio.scratch --size=8G \
    --ioengine=io_uring --direct=1 --rw=randread --bs=8k \
    --iodepth=16 --numjobs=1 --runtime=120 --time_based \
    --percentile_list=50:99:99.9 --group_reporting

# Watch the device while fio runs
iostat -x 1

Related prompts

More Linux Admins prompts & error guides

Browse every Linux Admins prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.