惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
DataBreaches.Net
B
Blog RSS Feed
博客园_首页
The GitHub Blog
The GitHub Blog
I
InfoQ
L
LangChain Blog
G
Google Developers Blog
M
MIT News - Artificial intelligence
美团技术团队
腾讯CDC
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 叶小钗

OneUptime Blog

How to Monitor Azure App Services (PaaS) with OpenTelemetry Grafana Stack vs OneUptime: DIY Observability or Unified Platform? Your AI Workloads Are About to Blow Up Your Observability Bill The Great Observability Consolidation Is Here How to Write Custom Object Classes for Ceph How to Write Custom Ceph Manager Modules How to Write a ceph.conf Configuration File How to Use Rook-Ceph with OpenShift How to Use Rook-Ceph with Longhorn for Comparison How to Configure Volume Snapshot Class for RBD in Rook How to Configure VolumeReplicationClass Scheduling Intervals in Rook How to Set Up Volume Replication with Rook-Ceph How to Create Volume Group Snapshots with Rook CSI How to Visualize Ceph Network Performance in Grafana How to Enable Virtual Host-Style Bucket Access in Rook How to View Runtime Configuration via Admin Socket How to View Quota Settings and Update Stats in Ceph RGW How to View PG Scaling Recommendations with autoscale-status How to View PG Distribution via Admin Socket How to View Performance Metrics in the Ceph Dashboard How to View OSD Performance Counters in Ceph How to View Connection Status via Admin Socket How to View Ceph Cluster Summary Dashboard via CLI How to Version Control Rook-Ceph Configuration How to Version Control Ceph Infrastructure with Terraform How to Verify Kubernetes Node Requirements for Rook-Ceph Deployment How to Verify Health Before and After Rook Upgrades How to Verify Data Integrity with Deep Scrubbing How to Verify Complete Rook-Ceph Cleanup How to Verify Backup Integrity from Ceph Snapshots
How to Use fio for Ceph Block Storage Benchmarking
Nawaz Dhandala · 2026-03-31 · via OneUptime Blog

Why Use fio for Ceph RBD

fio (Flexible I/O Tester) is the industry standard for storage benchmarking. Its native rbd ioengine bypasses the OS block layer and talks directly to Ceph's librbd library, giving pure Ceph performance numbers unaffected by kernel I/O schedulers or page cache effects.

Installing fio with RBD Support

# RHEL/Rocky - includes librbd engine
dnf install -y fio

# Ubuntu/Debian
apt install -y fio

# Verify RBD engine is available
fio --enghelp | grep rbd
fio --ioengine=rbd --help 2>&1 | head -5

If the rbd engine is missing, compile fio from source with librbd:

dnf install -y librados-devel librbd-devel
git clone https://github.com/axboe/fio
cd fio && ./configure && make -j4 && make install

Creating a Test Image

Always test on a dedicated image to avoid impacting production data:

# Create test pool and image
ceph osd pool create fio-test-pool 64 64
rbd create fio-test-pool/fio-image --size 20G

# Verify image exists
rbd info fio-test-pool/fio-image

Common fio Benchmark Profiles

Sequential Write Throughput

fio --name=seq-write \
    --ioengine=rbd \
    --pool=fio-test-pool \
    --rbdname=fio-image \
    --rw=write \
    --bs=1M \
    --numjobs=4 \
    --iodepth=16 \
    --runtime=60 \
    --time_based=1 \
    --group_reporting

Sequential Read Throughput

fio --name=seq-read \
    --ioengine=rbd \
    --pool=fio-test-pool \
    --rbdname=fio-image \
    --rw=read \
    --bs=1M \
    --numjobs=4 \
    --iodepth=16 \
    --runtime=60 \
    --time_based=1 \
    --group_reporting

Random Read IOPS

fio --name=rand-read \
    --ioengine=rbd \
    --pool=fio-test-pool \
    --rbdname=fio-image \
    --rw=randread \
    --bs=4k \
    --numjobs=8 \
    --iodepth=128 \
    --runtime=60 \
    --time_based=1 \
    --group_reporting

Random Write IOPS

fio --name=rand-write \
    --ioengine=rbd \
    --pool=fio-test-pool \
    --rbdname=fio-image \
    --rw=randwrite \
    --bs=4k \
    --numjobs=8 \
    --iodepth=128 \
    --runtime=60 \
    --time_based=1 \
    --group_reporting

Using fio Job Files

Create a reusable job file for consistent benchmarking:

[global]
ioengine=rbd
clientname=admin
pool=fio-test-pool
rbdname=fio-image
time_based=1
runtime=60
group_reporting=1
iodepth=128

[seq-write]
rw=write
bs=1M
numjobs=4
iodepth=16

[rand-read-iops]
rw=randread
bs=4k
numjobs=8

[rand-write-iops]
rw=randwrite
bs=4k
numjobs=8

Run all jobs:

fio ceph-rbd-benchmark.fio

Capturing Latency Percentiles

fio can collect latency percentiles for tail latency analysis:

fio --name=lat-profile \
    --ioengine=rbd \
    --pool=fio-test-pool \
    --rbdname=fio-image \
    --rw=randread \
    --bs=4k \
    --numjobs=4 \
    --iodepth=32 \
    --runtime=60 \
    --lat_percentiles=1 \
    --percentile_list=50:90:95:99:99.9:99.99

Sample latency output:

lat (usec): min=180, max=28441, avg=1842.33
  50.00th=[ 1434],
  90.00th=[ 2900],
  95.00th=[ 3696],
  99.00th=[ 6980],
  99.90th=[15664],
  99.99th=[27264]

Running fio Inside Kubernetes

Deploy fio as a Kubernetes Job against a Rook PVC:

apiVersion: batch/v1
kind: Job
metadata:
  name: fio-benchmark
  namespace: default
spec:
  template:
    spec:
      containers:
      - name: fio
        image: nixery.dev/fio
        command:
        - fio
        - --name=bench
        - --rw=randrw
        - --bs=4k
        - --rwmixread=70
        - --numjobs=4
        - --iodepth=64
        - --runtime=120
        - --filename=/data/testfile
        - --ioengine=libaio
        - --direct=1
        - --size=10G
        - --group_reporting
        - --lat_percentiles=1
        volumeMounts:
        - name: data
          mountPath: /data
      volumes:
      - name: data
        persistentVolumeClaim:
          claimName: fio-benchmark-pvc
      restartPolicy: Never

Cleanup After Testing

rbd rm fio-test-pool/fio-image
ceph osd pool delete fio-test-pool fio-test-pool --yes-i-really-really-mean-it

Summary

fio with the native librbd ioengine is the most accurate way to benchmark Ceph block storage performance, bypassing OS caching for pure Ceph measurements. Key test profiles cover sequential throughput (1 MB blocks), random IOPS (4k blocks), and mixed workloads. Capturing latency percentiles at P99 and P999 reveals tail latency behavior that averages hide, providing a complete performance picture for production workload planning.