基准测试 Ceph 块性能

Ceph 包含 rbd bench-write 命令,用于测试对块设备的顺序写入,以测量吞吐量和等待时间。

缺省字节大小为 4096 ,缺省 I/O 线程数为 16 ,要写入的缺省总字节数为 1 GB。 这些缺省值可分别由 --io-size--io-threads--io-total 选项修改。

先决条件

  • 正在运行IBM Storage Ceph簇。

  • 对节点的根级别访问权。

  • 对块设备运行写性能测试:

    示例

    [root@host01 ~]# rbd bench --io-type write image01 --pool=testbench
    
    bench-write  io_size 4096 io_threads 16 bytes 1073741824 pattern seq
      SEC       OPS   OPS/SEC   BYTES/SEC
        2     11127   5479.59  22444382.79
        3     11692   3901.91  15982220.33
        4     12372   2953.34  12096895.42
        5     12580   2300.05  9421008.60
        6     13141   2101.80  8608975.15
        7     13195    356.07  1458459.94
        8     13820    390.35  1598876.60
        9     14124    325.46  1333066.62
        ..