ceph性能测试工具总结

1 Ceph自带测试工具:rados bench 和 rbd bench

 

1.1 rados bench

 

命令行格式:rados bench -p <pool_name> <seconds> <write|seq|rand> -b <block size> -t --no-cleanup 默认对象尺寸是 4 MB ,默认模拟线程数为 16 。

-p:测试所针对的存储池;

seconds:测试所持续的秒数;

<write|seq|rand>:操作模式,write:写,seq:顺序读;rand:随机读;

-b:block size,即块大小,默认为 4M;

-t:读/写并行数,默认为 16;

--no-cleanup 表示测试完成后不删除测试用数据。在做读测试之前,需要使用该参数来运行一遍写测试来产生测试数据,在全部测试结束后可以运行 rados -p <pool_name>    cleanup 来清理所有测试数据。

 

 

例子

# rados bench -p test 30 write -b 4M --no-cleanup

 

1.2 rbd bench

命令行格式:rbd bench -p <pool_name> --image <image_name> --io-size <io-size> --io-total <total> 

--io-type <read/write> --io-pattern <rand/seq> --io-threads <thread_num>

 

例子:使用rbd bench需要手动创建一个image,然后对该image进行测试

# rbd create -p test --image img-1 --size 10G

# rbd bench -p test --image img-1 --io-size 4K --io-total 5G --io-type write --io-pattern rand --io-threads 16

 

【注意】J版本格式和L版本不同 rbd bench-write -p test --image img-1 --io-size 4K --io-total 5G --io-pattern rand --io-threads 16,且J版本只支持write,不能read。

 

2 使用fio测试

 

2.1 rbd裸盘性能

 

# rbd create volume_normal_triple/pure-volume --size 1000G --imge-feature layering

使用rbd引擎可以直接对rbd做测试,不需要map盘

# fio --ioengine=rbd --pool=volume_normal_triple -rbdname=pure-volume -rw=write -numjobs=1 -direct=1 -bs=tM -iodepth=16 -runtime=600 -name=test

2.3 rbd盘做文件系统

 

然后向/mnt/rbd0写数据

# rbd create volume_normal_triple/test --size 1000G --imge-feature layering

# rbd map volume/test

/dev/rbd0

# mkfs.xfs /dev/rbd0

# mount /dev/rbd0 /mnt/rbd0

# fio --ioengine=libaio -filename=/mnt/rbd0/file1 -rw=write -direct=1 -bs=4M -size=100M -numjobs=1 -iodepth=16 -runtime=60 -name=test

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值