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

推荐订阅源

人人都是产品经理
人人都是产品经理
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
月光博客
月光博客
T
Tailwind CSS Blog
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
罗磊的独立博客
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
量子位
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队
博客园 - 聂微东
V
V2EX

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 rados bench for Object Storage Benchmarking
Nawaz Dhandala · 2026-03-31 · via OneUptime Blog

What is rados bench?

rados bench is Ceph's built-in benchmarking tool that writes objects directly to a RADOS pool and measures throughput, IOPS, and latency. Unlike fio, it bypasses the block and file layers entirely, testing the raw object store performance that all Ceph services (RGW, RBD, CephFS) build on.

Basic Usage

rados bench has three modes: write, seq (sequential read), and rand (random read). Sequential read replays the objects written in the write phase; random read reads them in random order.

# Basic write benchmark (30 seconds, default 4 MB objects)
rados bench -p my-pool 30 write

# Sequential read (must have objects from write phase)
rados bench -p my-pool 30 seq

# Random read
rados bench -p my-pool 30 rand

# Clean up test objects
rados -p my-pool cleanup

Key Command-Line Options

OptionDescriptionDefault
-b <size>Block size (write size per operation)4 MB
-t <threads>Concurrent write threads16
--no-cleanupKeep objects after write testfalse
-O <size>Object size (overrides -b for object size)Same as -b
--show-timeShow timestamp per secondfalse
--run-name <name>Unique run IDbenchmark_last_metadata

Comprehensive Benchmark Script

Test multiple object sizes and concurrency levels:

#!/bin/bash
POOL="benchmark-pool"
DURATION=60

# Create dedicated pool
ceph osd pool create $POOL 64 64
ceph osd pool application enable $POOL rados

echo "=== rados bench results ==="
echo "Pool: $POOL, Duration: ${DURATION}s"
echo ""

for OBJ_SIZE in 4k 64k 1M 4M 16M; do
  for THREADS in 4 8 16 32; do
    echo "--- Object: $OBJ_SIZE, Threads: $THREADS ---"
    rados bench -p $POOL $DURATION write \
        --no-cleanup \
        -b $OBJ_SIZE \
        -t $THREADS \
        --run-name "run_${OBJ_SIZE}_${THREADS}" 2>&1 \
        | grep -E "Bandwidth|IOPS|Latency"
    # Clean up between runs
    rados -p $POOL cleanup \
        --run-name "run_${OBJ_SIZE}_${THREADS}" > /dev/null 2>&1
  done
done

Interpreting Results

Sample output from a write benchmark:

Maintaining 16 concurrent writes of 4194304 bytes for up to 60 seconds
Total time run:         60.0072
Total writes made:      7124
Write size:             4194304
Object size:            4194304
Bandwidth (MB/sec):     474.897
Stddev Bandwidth:       21.432
Max bandwidth (MB/sec): 502.000
Min bandwidth (MB/sec): 428.000
Average IOPS:           118
Stddev IOPS:            5
Max IOPS:               125
Min IOPS:               107
Average Latency(s):     0.135279
Stddev Latency:         0.032152
Max latency(s):         1.20243
Min latency(s):         0.04327

Key metrics:

  • Bandwidth: Average sustained throughput in MB/s
  • IOPS: Operations per second (most relevant for small objects)
  • Average Latency: Mean operation completion time
  • Max Latency: Worst-case operation (important for SLA planning)
  • Stddev: Consistency indicator - high stddev means variable performance

Testing from Kubernetes

Run rados bench in a Rook-managed cluster using a pod:

apiVersion: v1
kind: Pod
metadata:
  name: rados-bench
  namespace: rook-ceph
spec:
  containers:
  - name: rados-bench
    image: quay.io/ceph/ceph:v18.2.0
    command:
    - /bin/bash
    - -c
    - |
      rados bench -p benchmark-pool 60 write \
          --no-cleanup -b 4M -t 16 && \
      rados bench -p benchmark-pool 60 seq -t 16 && \
      rados bench -p benchmark-pool 60 rand -t 16 && \
      rados -p benchmark-pool cleanup
    env:
    - name: CEPH_CONF
      value: /etc/ceph/ceph.conf
    volumeMounts:
    - name: ceph-conf
      mountPath: /etc/ceph
  volumes:
  - name: ceph-conf
    configMap:
      name: rook-ceph-config
  restartPolicy: Never

Comparing Read vs Write Performance

# Write test (captures objects for subsequent reads)
rados bench -p benchmark-pool 60 write --no-cleanup -b 4M -t 16 \
    | tee /tmp/write-results.txt

# Sequential read (same objects, same order)
rados bench -p benchmark-pool 60 seq -t 16 \
    | tee /tmp/seq-read-results.txt

# Random read (same objects, random order)
rados bench -p benchmark-pool 60 rand -t 16 \
    | tee /tmp/rand-read-results.txt

# Extract bandwidth for comparison
echo "Write BW: $(grep "^Bandwidth" /tmp/write-results.txt | awk '{print $3}') MB/s"
echo "Seq Read BW: $(grep "^Bandwidth" /tmp/seq-read-results.txt | awk '{print $3}') MB/s"
echo "Rand Read BW: $(grep "^Bandwidth" /tmp/rand-read-results.txt | awk '{print $3}') MB/s"

Summary

rados bench provides direct object store performance measurements that reflect the raw capability of your Ceph hardware and configuration. Testing with multiple object sizes reveals the performance curve from small I/O-bound operations to large bandwidth-bound transfers. The combination of write, sequential read, and random read benchmarks captures the full spectrum of object storage workload characteristics needed for capacity planning and performance validation.