使用COSBench工具对ceph s3接口进行压力测试--续
之前写的使用COSBench工具对ceph s3接口进行压力测试是入门,在实际使用是,配置内容各不一样,下面列出
压力脚本是xml格式的,套用UserGuide文档说明,如下
有很多模板的例子,在conf目录下,如librados-config-sample.xml、s3-config-sample.xml
这里只有s3的,所以目前只关注s3的相关配置
S3的配置在页面上选择时没有显示出来,所以我们就进行手工配置
第一级workload,格式如下:
<workload name=”demo” description=”demo benchmark with mock storage” />
属性 |
类型 |
默认值 |
备注 |
Name |
String |
名字,随便取 |
|
Descriptipion |
String |
描述 |
对应s3就用storage参数,格式如下:
<storage type="s3" config="accesskey=<accesskey>;secretkey=<scretkey>;endpoint=<endpoint>; proxyhost=<proxyhost>;proxyport=<proxyport>" />
属性 |
类型 |
默认值 |
备注 |
Timeout |
Int |
30,000 |
毫秒 |
Accesskey |
String |
S3 的accesskey |
|
Secretkey |
String |
S3的secretkey |
|
Endpoint |
String |
默认为亚马逊地址 |
|
Proxyhost |
String |
代理地址 |
|
Proxyport |
Int |
代理端口 |
第二级workstorage,格式如下
<workstage name="<name>" ></workstage>
属性 |
类型 |
默认值 |
备注 |
Name |
String |
名字,随便取 |
对应使用work参数,格式如下
<work name="main" type="normal" workers="128" interval="5" division="none" runtime="60" rampup="0" rampdown="0" totalOps="0" totalBytes="0" afr=”200000” config="" > . . . </work>
属性 |
类型 |
默认值 |
备注 |
Name |
String |
名字,随便取 |
|
Type |
String |
“normal” |
工作类型,下面有介绍 |
Workers |
Int |
并发工作数 |
|
Interval |
Int |
5 |
间隔时间 |
Division |
Str |
“none” |
划分数据方式,为container时,通过bucket划分数据,为ojbect,以对像数据划分数据,”none”时,所以的bucket都 有ojbect数据 |
Runtime |
Int |
0 |
运行时长 |
Rampup |
Int |
0 |
多长时间启动完所有的压力 |
Rampdown |
Int |
0 |
结束数,不能与runtime同时配 |
totalOps |
Int |
0 |
操作数 |
totalBytes |
Int |
0 |
多大bytes将传输 |
Driver |
Str |
哪个driver将执行工作,默认的话,所有的drivers将参与工作,平分 |
|
Afr |
Int |
200,000 – normal 0 – special work |
可接受错误速率,毫秒级别 |
Work type支持
init(创建bucket)
格式<work type=”init” workers=”4” config=”containers=r(1,100)” />
参数 |
类型 |
默认值 |
说明 |
Containers |
String |
Bucket选项表达式,比如c(1),r(1,100) |
|
Cprefix |
String |
Mycontainers_ |
Bucket前缀 |
Csuffix |
String |
<null> |
后缀 |
prepare(在bucket中插入特定的对像)
格式
<work type=”perpare” work=”4” config=”containers-=r(1,10);objects=r(1,100);sizes=c(64)KB”/>
参数 |
类型 |
默认值 |
说明 |
Containers |
String |
Bucket选项表达式,比如c(1),r(1,100) |
|
Cprefix |
String |
Mycontainers_ |
Bucket前缀 |
Csuffix |
String |
<null> |
后缀 |
Ojbects |
String |
Object选择表达式,如c(1),u(1,100) |
|
Oprefix |
String |
Myobjects_ |
对像前缀 |
Osuffix |
String |
<null> |
对像后缀 |
Sizes |
String |
大小,单位可以为(B/KB/MG/GB) |
|
Chuncked |
Boolean |
False |
校验上传的数据 |
Content |
String |
“random”(默认) “zero” |
上传数据内容,默认为随机字符号 |
Createcontainer |
Boolean |
False |
如果bucket不存在就创建对赢的bucket |
hashCheck |
Boolean |
False |
Hash检查 |
Cleanup(删除文件)
格式:<work type=”cleanup” workers=”4” config=”containers=r(1,5)”;objects=r(1,100)” />
参数 |
类型 |
默认值 |
说明 |
Containers |
String |
Bucket选项表达式,比如c(1),r(1,100) |
|
Cprefix |
String |
Mycontainers_ |
Bucket前缀 |
Csuffix |
String |
<null> |
后缀 |
Ojbects |
String |
Object选择表达式,如c(1),u(1,100) |
|
Oprefix |
String |
Myobjects_ |
对像前缀 |
Osuffix |
String |
<null> |
对像后缀 |
Deletecontainer |
Boolean |
False |
存在相关的bucket则删除bucket |
Dispolse(删除bucket)
格式 <work type=”dispose” workers=”4” config=”containers=r(1,100)” />
参数 |
类型 |
默认值 |
说明 |
Containers |
String |
Bucket选项表达式,比如c(1),r(1,100) |
|
Cprefix |
String |
Mycontainers_ |
Bucket前缀 |
Csuffix |
String |
<null> |
后缀 |
Delay(延迟)
用的少,不写了
Operation支持:
格式<operation type=”read|write|delete” ratio=”<1-100> config=”<key>=<value>;….” />
参数 |
类型 |
默认值 |
说明 |
Type |
String |
操作类型,只有read write delete list |
|
Ratio |
Int |
比例 |
|
Division |
Int |
||
Config |
String |
参数列表 |
read
格式<operation type=”read” ratio=”79” config=”containers=c(1);objects=u(1,100)” />
参数 |
类型 |
默认值 |
说明 |
Containers |
String |
Bucket选项表达式,比如c(1),r(1,100) |
|
Cprefix |
String |
Mycontainers_ |
Bucket前缀 |
Csuffix |
String |
<null> |
后缀 |
Ojbects |
String |
对像表达式如u(1,100) |
|
Oprefix |
String |
Myobjects_ |
对像前缀 |
Osuffix |
String |
<null> |
对像后缀 |
Hascheck |
Boolean |
False |
是否校验 |
write
格式:
<operation type=”write” ratio=”20” config=”containers=c(2);objects=u(1,10);size=c(2)MB”/>
参数 |
类型 |
默认值 |
说明 |
Containers |
String |
Bucket选项表达式,比如c(1),r(1,100) |
|
Cprefix |
String |
Mycontainers_ |
Bucket前缀 |
Csuffix |
String |
<null> |
后缀 |
objects |
String |
对像表达式如u(1,100) |
|
Oprefix |
String |
Myobjects_ |
对像前缀 |
Osuffix |
String |
<null> |
对像后缀 |
Sizes |
String |
大小 |
|
Chunked |
Boolean |
False |
上传数据是否分片 |
Content |
String |
“radom”(默认值) “zero” |
默认是随机字符填充 |
Hascheck |
Boolean |
False |
是否校验 |
filewrite(文件上传)
格式:
<operation type=”filewrite” ratio=”20” config=”containers=c(2);fileselection=s;files=/tmp”/>
参数 |
类型 |
默认值 |
说明 |
Containers |
String |
Bucket选项表达式,比如c(1),r(1,100) |
|
Cprefix |
String |
Mycontainers_ |
Bucket前缀 |
Csuffix |
String |
<null> |
后缀 |
Fileselection |
String |
上传文件选择方式,如s |
|
Files |
String |
目录 |
|
Chunked |
Boolean |
False |
上传数据是否分片 |
Hascheck |
Boolean |
False |
是否校验 |
delete
格式<operation type=”delete” ratio=”10” config=”containers=c(2);ojbects=u(1,100)” />
参数 |
类型 |
默认值 |
说明 |
Containers |
String |
Bucket选项表达式,比如c(1),r(1,100) |
|
Cprefix |
String |
Mycontainers_ |
Bucket前缀 |
Csuffix |
String |
<null> |
后缀 |
objects |
String |
对像表达式如u(1,100) |
|
Oprefix |
String |
Myobjects_ |
对像前缀 |
Osuffix |
String |
<null> |
对像后缀 |
list(用的少)
在填写参数时,还需要注意各种选择器的使用,如下
Expression |
格式 |
备注 |
Constant(不变的) |
C(number) |
固定在一个数值 |
Uniform(随机) |
U(min,max) |
从[min,max]中随机选择一个数 |
Range |
R(min,max) |
同python里的range函数 更常用在(init,prepare,cleanup,dispose)里,不建议用在operation |
sequential |
S(min,max) |
也是增加函数,常用于operation操作中 |
Histogram |
H(min1|max1|weight1,…..) |
用在文件大小的不同比重中,实际使用少,不解释 |
常见的xml:
初始化bucket,将会创建二个bucket
<?xml version="1.0" encoding="UTF-8" ?>
- <workload name="initBucket" description="sample benchmark for s3">
<storage type="s3" config="accesskey=V02TU7BTTHYSVINSRB7P;secretkey=b2u6ZgiNVlnfsDUpBigEbZKX9Na7kvM7UWEMrtPN;endpoint=http://xxx.xxx.xxx/" />
- <workflow>
- <workstage name="init_create_bucket">
<work type="init" workers="1" config="cprefix=test;containers=r(1,2)" />
</workstage>
</workflow>
</workload>
上传特定大小的文件
在test1 bucket中上传100个4M的文件,并发25
<?xml version="1.0" encoding="UTF-8" ?>
- <workload name="put-100Workers-4MB" description="sample benchmark for s3">
<storage type="s3" config="accesskey=V02TU7BTTHYSVINSRB7P;secretkey=b2u6ZgiNVlnfsDUpBigEbZKX9Na7kvM7UWEMrtPN;endpoint=http://xxx.xxx.xxx.xxx/" />
- <workflow>
- <workstage name="put 4MB data with 100 workers">
- <work name="Put64KBData1" workers="25" totalOps="200" driver="sv40">
<operation type="write" ratio="100" config="cprefix=test;oprefix=100wks_64k;containers=c(1);objects=s(1,100);sizes=c(4)MB" />
</work>
</workstage>
</workflow>
</workload>
读写1:1
<?xml version="1.0" encoding="UTF-8" ?>
- <workload name="read&write" description="sample benchmark for s3">
<storage type="s3" config="accesskey=7FRWOW451AM5N1BDGWG6;secretkey=Xb9YEC5ia4KbCR1M7fZgR67RFXi1ARPrOfxa9Bjx;endpoint=http://xxx.xxx.xx.xx/" />
- <workflow>
- <workstage name="read &write">
- <work name="read write" workers="25" totalOps="100">
<operation type="write" ratio="50" config="cprefix=test;oprefix=100wks_64k;containers=c(1);objects=s(1,10);sizes=c(50)KB" />
<operation type="read" ratio="50" config="cprefix=test-;oprefix=100wks_64kr;containers=c(1);objects=s(1,10);sizes=c(50)KB" />
</work>
</workstage>
</workflow>
</workload>
使用COSBench工具对ceph s3接口进行压力测试--续的更多相关文章
- 使用COSBench工具对ceph s3接口进行压力测试
一.COSBench安装 COSBench是Intel团队基于java开发,对云存储的测试工具,全称是Cloud object Storage Bench 吐槽下,貌似这套工具是intel上海团队开发 ...
- 单机Web后端接口服务压力测试
单机Web后端接口服务压力测试 工具:Apache jmeter 环境:Window 10 语言:Kotlin + java 架构:SpringBoot + + Mysql + redis + Spr ...
- python学习笔记(threading接口性能压力测试)
又是新的一周 延续上周的进度 关于多进程的学习 今天实践下 初步设计的接口性能压力测试代码如下: #!/usr/bin/env python # -*- coding: utf_8 -*- impor ...
- 使用 WRK 压力测试工具对 ASP.NET Core 的接口进行压力测试
0. 简要介绍 WRK 是一款轻量且易用的 HTTP 压力测试工具,通过该工具我们可以方便地对我们所开发的 WebAPI 项目进行压力测试,并且针对测试的情况返回结果. PS:Wrk 并不能针对测试的 ...
- JMeter工具接口性能压力测试分析与优化
最近公司做的项目,要求对相关接口做性能压力测试,在这里记录一下分析解决过程. 压力测试过程中,如果因为资源使用瓶颈等问题引发最直接性能问题是业务交易响应时间偏大,TPS逐渐降低等.而问题定位分析通常情 ...
- 开源API测试工具 Hitchhiker v0.6更新 - 改进压力测试
Hitchhiker 是一款开源的支持多人协作的 Restful Api 测试工具,支持Schedule, 数据对比,压力测试,支持上传脚本定制请求,可以轻松部署到本地,和你的team成员一起协作测试 ...
- 工具使用-----Jmeter教程 简单的压力测试
摘抄于http://www.cnblogs.com/TankXiao/p/4059378.html 以下是英文版的,中文版的也差不多的 Jmeter是一个非常好用的压力测试工具. Jmeter用来做 ...
- 结合docker做flask+kafka数据接口与压力测试
一.需求 需要做实时数据接入的接口.数据最终要写入库,要做到高并发,数据的完整,不丢失数据. 二.技术选型 1.因为只是做简单的接口,不需要复杂功能,所以决定用flask这个简单的python框架(因 ...
- Jmter接口网站压力测试工具使用记录
1.首先下载Jmeter 官方地址:http://jmeter.apache.org/ 2.安装Jmeter 把下载的文件进行解压,产生如下目录: 打开bin文件夹下的jmeter.bat文件及进入程 ...
随机推荐
- ubuntu-16.04.1-desktop-amd64.iso:ubuntu-16.04.1-desktop-amd64:安装Oracle11gR2
特点: 使用ubuntu-16.04.1-desktop-amd64.iso liveCD模式 + Casper-rw 本地文件 不降级默认的gcc版本,(liveCD 自带默认为 gcc 5.4): ...
- win8 关闭防火墙
http://jingyan.baidu.com/article/b87fe19eddb4da5218356894.html
- scala中获取Map中key和value的方法
val scores=Map("Alice"->10,"Bob"->3,"Cindy"->8) // 获取所有的key v ...
- C# dmp debug, can't load pdb file
1. Project->Properties->Build->Advance, Debug Info : Full/pdb-only . set to [none] will no ...
- 如果BarTender出现卸载不干净的问题如何处理
自从BarTender 2016出了之后,好多小伙伴都想试试新功能咋样,这就意味着首先要卸载电脑上旧版BarTender.然而就是这个操作,难倒了好一批人,他们表示BarTender卸载卸不干净,不仅 ...
- 为VS code中的项目添加特定的智能提示功能
当我们的在用vscode开发项目的时候, 如果项目中引用了jquery包, 我们可以下面的方式获得jquery的类型提示 npm install @types/jquery --save-dev 或我 ...
- 运动规划 (Motion Planning): MoveIt! 与 OMPL---44
原创博文:转载请标明出处:http://www.cnblogs.com/zxouxuewei 最近有不少人询问有关MoveIt!与OMPL相关的话题,但是大部分问题都集中于XXX功能怎么实现,XXX错 ...
- struts2防止反复提交的办法
<? xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC " ...
- SpringBoot------热部署(Springloaded)
为啥要热部署: 在修改代码的时候,不需要重新启动程序,程序会自动进行编译 注意: 控制器中新增加的方法是不能进行热部署的 方法: 1.在pom.xml文件里面添加下面代码 <project> ...
- Lottie 动画库
强大的动画库,且同时支持 android.ios.react native 和 web http://airbnb.io/lottie/