# qc_storage **Repository Path**: qc-soft/qc_storage ## Basic Information - **Project Name**: qc_storage - **Description**: 存储优化和测试服务 - **Primary Language**: Python - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-03 - **Last Updated**: 2021-07-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #### 介绍 存储优化和测试服务,安装于虚拟机及多核云服务器,用于I/O虚拟化测试、性能效率测试,和多级缓存架构存储部署。 #### 安装教程 ##### server端 1.拉取项目代码: git clone http://xxxxx.git ;cd qc_storage 2.初始化server,安装依赖包和启动服务: ./contro.sh --build-server yes ##### client端 1.拉取项目代码: git clone http://xxxxx.git ;cd qc_storage 2.初始化client,安装依赖包: ./contro.sh --build-client yes #### 使用教程 ##### 测试接口说明 1.示例:4K随机写测试 post方法:http://URL:PORT/sw/test 请求实例: ``` { "test_type": "storage", #api用来识别测试类型,有qos和storage "storage": { "name": "4krandwrite", #此次测试的名称 "type": "randwrite", #fio存储测试的测试类型,randwrite(随机写)和randrw(随机读写) "filename": "/root/cma_test_test_test", #fio测试的对象,根据环境情况,传入信息,不是固定值 "bs": "4k", #fio测试,用来测试的块大小;支持4k,8k,16k,64k,128k,256k,512k "host": ["test01","test02"] #进行存储测试的主机,list形式传入 } } ``` 返回实例 ``` { "name": "4krandwrite", #此次测试的名称 "test01": { #主机test01的测试结果 "bs": "4k", #fio测试,用来测试的块大小;支持4k,8k,16k,64k,128k,256k,512k "describe": "write_bw Use KB as the unit", #描述信息,write_bw使用的单位是KB "filename": "/root/cma_test_test_test", #fio测试的对象,根据环境情况,传入信息,不是固定值 "fio time": "Thu Nov 26 02:35:23 2020", #fio测试结束的时间 "fio version": "fio-3.14", #fio测试软件版本信息 "name": "4krandwrite", #此次测试的名称 "test_type": "storage", #api用来识别测试类型,有qos和storage "time": "20201126103510", #api收到请求,开始执行测试的时间,用来标识测试报告使用 "type": "randwrite", #fio存储测试的测试类型,randwrite(随机写)和randrw(随机读写) "write_bw": 20741, #fio测试结果,测试写的带宽 "write_iops": 5185.407296 #测试最关键的字段,fio测试结果,测试写的IOPS数据,体现存储性能的指标,用于和同时测试的主机做对比比较。 }, "test02": { #主机test02的测试结果 "bs": "4k", "describe": "write_bw Use KB as the unit", "filename": "/root/cma_test_test_test", "fio time": "Thu Nov 26 02:35:37 2020", "fio version": "fio-3.14", "name": "4krandwrite", "test_type": "storage", "time": "20201126103510", "type": "randwrite", "write_bw": 20419, "write_iops": 5104.853206 }, "test_type": "storage" #api用来识别测试的类型,有qos和storage } ``` 2.示例:QoS测试 post方法:http://URL:PORT/sw/test 请求实例: ``` { "test_type": "qos", #api用来识别测试类型,有qos和storage "qos": { "server": "test02", #QoS测试服务端,启动iperf server,等待客户端连接 "client": "test01", #QoS测试客户端,向iperf server发起连接,测试链路带宽 "name": "qos_test" #此次测试的名称 } } ``` 返回实例 ``` { "connection information": [ #iperf的连接信息 { "local_host": "10.0.0.21", #客户端主机地址,源地址 "local_port": 37322, #源端口 "remote_host": "10.0.0.22", #服务端主机地址,目的地址 "remote_port": 5201, #目的端口 "socket": 4 } ], "describe iperf_kbps": "The unit of use is 'Kbit'", #关于iperf_kbps字段的描述信息,单位是Kbit "iperf time": "Thu, 26 Nov 2020 02:19:22 GMT", #iperf测试结束的时间 "iperf version": "iperf 3.0.11", #iperf版本 "iperf_kbps": 94.9782, #测试最关键的字段,QoS测试,iperf软件测的的链路带宽信息。 "name": "qos_test", #此次测试的名称 "server": "test02", #QoS测试服务端 "test_type": "qos", #api用来识别测试类型 "time": "20201126101919" #api收到请求,开始执行测试的时间,用来标识测试报告使用 } ``` ##### 多级缓存环境配置说明 1.配置物理环境 ./contro.sh --contro-type bottom --contro-addr 0 --replica-level 1 --first-disk "0:0" --second-disk "0:1" ``` --contro-type #配置类型 --contro-addr #控制器ID --replica-level #副本数 --first-disk #第一块磁盘ID --second-disk #第二块磁盘ID ``` 2.配置系统环境 ./contro.sh --contro-type logical --cache-type writeback --first-disk /dev/sdb --second-disk /dev/sdc --third-disk /dev/sdd --data-size 500 ``` --contro-type #配置类型 --cache-type #缓存类型 --first-disk #第一块磁盘盘符 --second-disk #第二块磁盘盘符 --third-disk #第三块磁盘盘符 --data-size #数据盘的容量 ```