使用Ceph RGW Cosbench 测试时,文档中没有写如何使用 path_style_access 模式的方法。 查看了一下cosbench源码发现已经支持,只是文档没有写。
提交了一个issue给社区: https://github.com/intel-cloud/cosbench/issues/350
如下配置文件中,加入如下path_style_access=true参数即可
完整样例:
<?xml version="1.0" encoding="UTF-8" ?>
<workload name="s3-sample" description="sample benchmark for s3">
<storage type="s3" config="accesskey=9TGVU7D9W70ESJZ54OVX;secretkey=****;proxyhost=;proxyport=;endpoint=http://s3.yyclouds.com;path_style_access=true" />
<workflow>
<workstage name="init">
<work type="init" workers="20" config="cprefix=s3testqwer;containers=r(1,2)" />
</workstage>
<workstage name="prepare">
<work type="prepare" workers="20" config="cprefix=s3testqwer;containers=r(1,2);objects=r(1,256);sizes=u(1,3)MB" />
</workstage>
<workstage name="main">
<work name="main" workers="100" runtime="120">
<operation type="read" ratio="1" config="cprefix=s3testqwer;containers=u(1,2);objects=u(1,128)"/>
<operation type="write" ratio="99" config="cprefix=s3testqwer;containers=u(1,2);objects=u(129,256);sizes=u(1,3)MB" />
</work>
</workstage>
<workstage name="cleanup">
<work type="cleanup" workers="20" config="cprefix=s3testqwer;containers=r(1,2);objects=r(1,256)" />
</workstage>
<workstage name="dispose">
<work type="dispose" workers="20" config="cprefix=s3testqwer;containers=r(1,2)" />
</workstage>
</workflow>
</workload>