ceph性能测试

时间:2024-03-04 10:12:40

查看集群状态

ceph -s

在这里插入图片描述
查看osd情况

ceph osd tree

在这里插入图片描述

创建pg_num为60的pool,名为test。

ceph osd pool create test 60

rados bench用于测试rados存储池底层性能,该工具可以测试写、顺序读、随机读三种类型

rados bench -p <pool_name> <seconds> <write|seq|rand> [-b block_size] [-t concurrent_operations] [-k /.../ceph.client.admin.keyring] [-c /.../ceph.conf] [--no-cleanup] [--run-name run_name]
-p <pool_name> 
测试存储池名称
------------------------
<seconds> 
测试运行时长,单位S
------------------------
<write|seq|rand> 
测试读写类型(write写;seq顺序读;rand随机读)
------------------------
-b block_size
测试读写块大小,默认4MB,默认单位字节
------------------------
-t concurrent_operation
测试读写并发线程数,默认为16
------------------------
-k /…/ceph.client.admin.keyring
指定测试ceph.client.admin.keyring配置文件路径
------------------------
-c /…/ceph.conf
指定测试ceph.conf配置文件路径
------------------------
–no-cleanup
测试完成后不删除测试数据,只对写有效
rados bench -p test 10 write -b 1M --no-cleanup
rados bench -p test 10 write -b 2M --no-cleanup
rados bench -p test 10 write -b 3M --no-cleanup
rados bench -p test 10 seq
rados bench -p test 10 rand

删除测试文件

rados -p {pool_name} cleanup

查看test存储池中的文件

 rados -p test-pool ls