rbd file input output test
来源:互联网 发布:mac软件要怎么下载 编辑:程序博客网 时间:2024/06/06 04:40
目的
利用 rbd 文件读写, 对 ceph 集群 io 进行测试通过参数调整, 控制 IO 读写速度检测 SSD 在日志盘进行读写时候是否会达到瓶颈
测试环境
ceph 集群环境参考
rbd client 环境如下
服务器名称ip 地址hh-yun-compute-131203.vclound.com10.199.131.203hh-yun-compute-131204.vclound.com10.199.131.204hh-yun-compute-131205.vclound.com10.199.131.205hh-yun-compute-131207.vclound.com10.199.131.207hh-yun-compute-131208.vclound.com10.199.131.208rbd import VS rbd map 测试
目的
以相同环境测试, 测试一台至多台机器并发执行 rbd import 之间的速度对比
单机单文件数据传输测试
rbd import test
创建一个 4GB FILE, 非 dd file利用 rbd 命令 import 文件到 ceph cluster监控 import 时间, 监控 ceph journal disk io监控 ceph sata disk io监控 ceph cluster io
ID文件大小完成时间ssd journal最大速度单个 osd 最大速度A单个 osd 最大速度Bceph 整体最大速度14GB39s120MB/s50MB/s48MB/s105MB/s24GB41s118MB/s52MB/s52MB/s110MB/s34GB41s106MB/s44MB/s40MB/s106MB/s rbd map
对应操作系统内核版本
由于内存版本问题, CENTOS 7.2 执行 rbd map 时候将会出现下面错误信息
Dec 5 11:48:45 hh-yun-compute-131204 kernel: Key type dns_resolver registeredDec 5 11:48:45 hh-yun-compute-131204 kernel: Key type ceph registeredDec 5 11:48:45 hh-yun-compute-131204 kernel: libceph: loaded (mon/osd proto 15/24)Dec 5 11:48:45 hh-yun-compute-131204 kernel: rbd: loaded (major 252)Dec 5 11:48:45 hh-yun-compute-131204 kernel: libceph: mon1 10.199.128.214:6789 feature set mismatch, my 102b84a842a42 < server's 40102b84a842a42, missing 400000000000000Dec 5 11:48:45 hh-yun-compute-131204 kernel: libceph: mon1 10.199.128.214:6789 missing required protocol features
解决方法
升级至少 CENTOS 7.3 以上
rbd feature disable 问题
[root@hh-yun-compute-131203 ~]# rbd map -p data --image rbdtestfilerbd: sysfs write failedRBD image feature set mismatch. Try disabling features unsupported by the kernel with "rbd feature disable".In some cases useful info is found in syslog - try "dmesg | tail".rbd: map failed: (6) No such device or address
解决方法
查询
[root@hh-yun-compute-131203 ~]# rbd info data/rbdtestfilerbd image 'rbdtestfile': size 10240 MB in 2560 objects order 22 (4096 kB objects) block_name_prefix: rbd_data.c28e32ae8944a format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten <- 关闭多余的 feature flags: create_timestamp: Tue Dec 5 11:22:27 2017
修改方法
[root@hh-yun-compute-131203 ~]# rbd feature disable data/rbdtestfile exclusive-lock object-map fast-diff deep-flatten
修改后查询
[root@hh-yun-compute-131203 ~]# rbd info data/rbdtestfilerbd image 'rbdtestfile': size 10240 MB in 2560 objects order 22 (4096 kB objects) block_name_prefix: rbd_data.c28e32ae8944a format: 2 features: layering flags: create_timestamp: Tue Dec 5 11:22:27 2017
可选命令指定 feature
[root@hh-yun-compute-131203 ~]# rbd create --pool data --image newrbdfile --image-format 2 --image-feature layering --size 10G[root@hh-yun-compute-131203 ~]# rbd info data/newrbdfilerbd image 'newrbdfile': size 10240 MB in 2560 objects order 22 (4096 kB objects) block_name_prefix: rbd_data.b59b22ae8944a format: 2 features: layering flags: create_timestamp: Tue Dec 5 15:04:11 2017
永久修改方法
参考 feature 特性与编码
修改配置 /etc/ceph/ceph.conf
[osd] rbd_default_features = 1
注意, 修改的是 client 端, 不是 server 端
执行 rbd map
[root@hh-yun-compute-131203 ~]# rbd map data/newrbdfile/dev/rbd0[root@hh-yun-compute-131203 ~]# ls -lh /dev/rbd0brw-rw---- 1 root disk 252, 0 12月 5 16:13 /dev/rbd0 <- 新增的 rbd 设备文件
rbd map test
创建一个 4GB FILE, 非 dd file利用 rbd map 命令把 rbd file 当做本地磁盘进行 IO 读写监控 文件写入 时间, 监控 ceph journal disk io监控 ceph sata disk io监控 ceph cluster io
格式化
[root@hh-yun-compute-131203 ~]# mkfs -t xfs /dev/rbd0meta-data=/dev/rbd0 isize=512 agcount=17, agsize=162816 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0, sparse=0data = bsize=4096 blocks=2621440, imaxpct=25 = sunit=1024 swidth=1024 blksnaming =version 2 bsize=4096 ascii-ci=0 ftype=1log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=8 blks, lazy-count=1realtime =none extsz=4096 blocks=0, rtextents=0
挂载
[root@hh-yun-compute-131203 ~]# mount /dev/rbd0 /mnt
测试
ID文件大小完成时间ssd journal最大速度单个 osd 最大速度A单个 osd 最大速度Bceph 整体最大速度14GB40s120MB/s44MB/s48MB/s115MB/s24GB39s120MB/s40MB/s44MB/s125MB/s34GB39s132MB/s36MB/s40MB/s115MB/s总结
对于单机操作下, 对于 rbd mapping 与 rbd import 两种性能够上差不多对于文件写情况下, ssd journal 都会比单个 OSD 的读写 IO 频繁
三台机单文件数据传输测试
三机器并发对 ceph 进行数据写入测试
rbd import
ID文件大小A完成时间B完成时间C完成时间ssd journal最大速度ssd journal TPS单个 osd 最大速度A单个 osd 最大速度B单个 osd 最大TPSceph 整体最大速度14GB44s46s45s299MB/s130056MB/s59MB/s130292MB/s24GB42s44s44s300MB/s128042MB/s56MB/s132299MB/s34GB40s40s40s293MB/s133454MB/s52MB/s138288MB/s总结
作为 ceph 跨集群迁移建议利用 3 ~5 物理机进行并发 import 数据到新集群过多的机器并发, 会先导致 journal disk 首先达到瓶颈对于物理机 osd disk 与 journal disk 比例, 建议 5:1具有 journal disk 会大大加速 osd disk 数据响应速度(即提高 ceph 集群性能)
参考
http://tracker.ceph.com/projects/ceph/wiki/Benchmark_Ceph_Cluster_Performancehttp://ceph.com/planet/quick-analysis-of-the-ceph-io-layer/http://www.sebastien-han.fr/blog/2014/10/10/ceph-how-to-test-if-your-ssd-is-suitable-as-a-journal-device/https://github.com/bryanapperson/ceph-disk-test/blob/master/ceph_disk_test.shhttp://bryanapperson.com/blog/ceph-raw-disk-performance-testing/
阅读全文
0 0
- rbd file input output test
- Python[十二]:File Input output
- File Input and Output(1)
- File Input/Output in Python
- [Language]File Input and Output
- Python 入门教程 18 ---- File Input/Output
- Java IO(Input/Output)----File
- File Input and Output with R
- Codeacademy Python-12-File Input/Output
- input/output
- OpenCV--File Input and Output using XML and YAML files
- 黑马程序员----IO(Input Output)流及File类
- IO流(Input Output)——File类
- Error reading from file descriptor 13: Input/output error
- Error: Q0466E: An output file can only be specified if there is a single input file
- input and output
- Input和Output
- Redirection on input/output.
- ToLua源码分析:启动流程
- 设计模式(九)——建造者模式
- Workaround to view unavailable Android SDK 26 source code
- NEW关键字的三种用法
- 机器学习(3)机器学习算法目录
- rbd file input output test
- JAVA设计模式之责任链模式
- 计算该日是该年的第几天(结构体)
- gulp babel转es6 Cannot find module 'lodash/assign'
- Intellij IDEA如何使用Maven Tomcat Plugin运行web项目
- C++11新特性之operator "" xxx(const char *, size_t n)
- Appium的一些坑问题错误解决 与 技巧集锦
- 搭建windbg 双机调试出现错误“Fail to open \\.\pipe\com_1....
- Java进阶之验证码知识点总结