Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
bfb0ff9
Merge pull request #233 from ddeflyer/master
Jan 12, 2015
3f3d525
Fix #270: S3 timeout parameter modifies both connection and inactivit…
zoran-rajic Apr 30, 2015
5c75e76
Merge pull request #271 from zoran-rajic/fix_270
Apr 30, 2015
ce145b7
Update README.md
May 4, 2015
6e1bf20
Add Google Cloud Storage Plugin
noralife Nov 30, 2015
50263b4
Fix benchmark failures
noralife Dec 1, 2015
e6c5ceb
Adjust indent
noralife Dec 1, 2015
4cbe74d
Add jar files
noralife Dec 1, 2015
574b228
Merge remote-tracking branch 'origin/noralife/gcs-plugin' into norali…
noralife Dec 1, 2015
005c1e9
Add description
noralife Dec 1, 2015
6ef3101
Add sample credential file and change description
noralife Dec 2, 2015
308db3c
Merge pull request #287 from noralife/noralife/gcs-plugin
Dec 2, 2015
3d3d2d3
Merge branch 'master' of https://github.com/intel-cloud/cosbench
Jan 27, 2016
3bd55cf
add COSBench-Appliance project, update supported storage types
Apr 27, 2016
dcbfa8a
Get rid of 100-continue overhead
hrchu May 6, 2016
e1b0bc9
Merge pull request #309 from hrchu/patch-1
ywang19 May 9, 2016
fb19ca2
OpenIO COSBench plugin
Jan 13, 2016
74066fd
Update openio plugin to 0.3.2-SNAPSHOT version
fvennetier Apr 21, 2016
cdbd28f
Replace System.currentTimeMillis() by System.nanoTime()
fvennetier Apr 21, 2016
296db3a
OpenIO: fix error code of unmanaged exceptions, add workload example
fvennetier May 11, 2016
d7a4d7c
Update dependency for cosbench-s3
hrchu May 11, 2016
f8e38df
Merge pull request #312 from hrchu/patch-1
ywang19 May 12, 2016
bdcc344
Merge pull request #313 from open-io/master-openio
ywang19 May 12, 2016
9fc04de
add ansible playbook
Jun 8, 2016
85fa779
add ansible playbook
Jun 8, 2016
c41a7a7
add ansible playbook
Jun 8, 2016
985bef4
Added EMC ECS driver.
APeter0807 Jul 12, 2016
c76aa72
Merge remote-tracking branch 'upstream/master'
APeter0807 Jul 12, 2016
8ba426d
Deleted erronious directory metadata files
APeter0807 Jul 12, 2016
6e7d40e
Catching additional directory files.
APeter0807 Jul 12, 2016
50a04bf
Merge pull request #325 from emcvipr/master
ywang19 Jul 13, 2016
1998b8a
fix operator reader copy large issue of s3 storage service
mcspring Jul 13, 2016
98b1869
fix operator lister copy large issue of s3 storage service
mcspring Jul 13, 2016
2fa4a08
Merge pull request #326 from mcspring/copy_large
ywang19 Jul 14, 2016
c137828
cosbench appliance location has been changed.
ywang19 Oct 15, 2016
0e4e78a
add support to aliyun oss
mycodediary Nov 2, 2017
0c4d974
删除一个.bak文件
mycodediary Nov 2, 2017
dff0fee
modify readme
mycodediary Nov 2, 2017
1cdab2d
add configuration sample for aliyun-oss
mycodediary Nov 2, 2017
4f1ddde
add contents for oss
mycodediary Nov 2, 2017
fcee8d0
Merge pull request #365 from kun95/master
Jian-Zhang Nov 29, 2017
9fe9eb8
0.4.2 release include Aliyun OSS support.
Jian-Zhang Nov 30, 2017
ca68b33
Merge pull request #370 from Jian-Zhang/0.4.2
Jian-Zhang Nov 30, 2017
68ffaa9
Remove Email
Jian-Zhang Jun 28, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified COSBench-User-Guide.odt
Binary file not shown.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
COSBench - Cloud Object Storage Benchmark
=========================================

COSBench is a benchmarking tool to measure the performance of Cloud Object Storage services. Object storage is an
COSBench is a benchmarking tool to measure the performance of Cloud Object Storage services. Object storage is an
emerging technology that is different from traditional file systems (e.g., NFS) or block device systems (e.g., iSCSI).
Amazon S3 and Openstack* swift are well-known object storage solutions.

COSBench now supports OpenStack* Swift and Amplidata v2.3, 2.5 and 3.1, as well as custom adaptors.
COSBench now supports OpenStack* Swift, Amazon* S3, Amplidata v2.3, 2.5 and 3.1, Scality*, Ceph, CDMI, Google* Cloud Storage, Aliyun OSS as well as custom adaptors.


Important Notice and Contact Information
Expand All @@ -14,11 +14,9 @@ Important Notice and Contact Information
a) COSBench is not a product, and it does not have a full-time support team. Before you use this tool, please understand
the need to invest enough effort to learn how to use it effectively and to address possible bugs.

b) To help COSBench develop further, please become an active member of the community and consider giving back by making
b) To help COSBench develop further, please become an active member of the community and consider giving back by making
contributions.

For other questions, contact jiangang.duan@intel.com or yaguang.wang@intel.com


Licensing
---------
Expand Down Expand Up @@ -52,7 +50,6 @@ If a build from source code is needed, please refer to BUILD.md for details.

Resources
---------
Blog: TBD

Wiki: (https://github.com/intel-cloud/cosbench/wiki)

Expand All @@ -70,5 +67,13 @@ COSBench-Workload-Generator: (https://github.com/giteshnandre/COSBench-Workload-

COSBench-Plot: (https://github.com/icclab/cosbench-plot)

COSBench-Appliance: (https://susestudio.com/a/8Kp374/cosbench)

COSBench Ansible Playbook:

- (http://www.ksingh.co.in/blog/2016/05/29/deploy-cosbench-using-ansible/)
- (https://github.com/ksingh7/ansible-role-cosbench)
- (https://galaxy.ansible.com/ksingh7/cosbench/)


= END =
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.1
0.4.2
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ public int read(byte[] b, int off, int len) throws IOException {

private void recordTime() {
if (this.isFirstByte) {
this.xferStart = System.currentTimeMillis();
this.xferStart = System.nanoTime();
this.isFirstByte = false;
}
this.xferEnd = System.currentTimeMillis();
this.xferEnd = System.nanoTime();
}

public long getXferTime() {
long xferTime = this.xferEnd - this.xferStart;
long xferTime = (this.xferEnd - this.xferStart) / 1000000;
return xferTime > 0 ? xferTime : 0L;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static Sample doDelete(String conName, String objName,
if (Thread.interrupted())
throw new AbortedException();

long start = System.currentTimeMillis();
long start = System.nanoTime();

try {
session.getApi().deleteObject(conName, objName, config);
Expand All @@ -87,11 +87,10 @@ public static Sample doDelete(String conName, String objName,
op.getSampleType(), op.getName(), false);
}

long end = System.currentTimeMillis();
long end = System.nanoTime();

Date now = new Date(end);
return new Sample(now, op.getId(), op.getOpType(), op.getSampleType(),
op.getName(), true, end - start, 0L, 0L);
return new Sample(new Date(), op.getId(), op.getOpType(), op.getSampleType(),
op.getName(), true, (end - start) / 1000000, 0L, 0L);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public Sample doWrite(InputStream in, long length, String conName, String objNam

XferCountingInputStream cin = new XferCountingInputStream(in);

long start = System.currentTimeMillis();
long start = System.nanoTime();

try {
session.getApi().createObject(conName, objName, cin, length, config);
Expand All @@ -153,10 +153,9 @@ public Sample doWrite(InputStream in, long length, String conName, String objNam
IOUtils.closeQuietly(cin);
}

long end = System.currentTimeMillis();
long end = System.nanoTime();

Date now = new Date(end);
return new Sample(now, getId(), getOpType(), getSampleType(),
getName(), true, end - start, cin.getXferTime(), cin.getByteCount());
return new Sample(new Date(), getId(), getOpType(), getSampleType(),
getName(), true, (end - start) / 1000000, cin.getXferTime(), cin.getByteCount());
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
/**

Copyright 2013 Intel Corporation, All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -12,7 +12,7 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/

package com.intel.cosbench.driver.operator;
Expand All @@ -37,7 +37,7 @@ public class Lister extends AbstractOperator {
public static final String OP_TYPE = "list";

private ObjectPicker objPicker = new ObjectPicker();

private byte buffer[] = new byte[1024*1024];

public Lister() {
Expand Down Expand Up @@ -75,14 +75,14 @@ private Sample doList(OutputStream out, String conName, String objName,
InputStream in = null;
CountingOutputStream cout = new CountingOutputStream(out);
doLogWarn(session.getLogger(), "listerrr: "+ conName + "/" + objName);//###
long start = System.currentTimeMillis();
long start = System.nanoTime();
long xferTime = 0L;
try {
doLogDebug(session.getLogger(), "worker "+ session.getIndex() + " List target " + conName + "/" + objName);
doLogDebug(session.getLogger(), "worker "+ session.getIndex() + " List target " + conName + "/" + objName);
in = session.getApi().getList(conName, objName, config);
long xferStart = System.currentTimeMillis();
long xferStart = System.nanoTime();
copyLarge(in, cout);
xferTime = System.currentTimeMillis() - xferStart;
xferTime = (System.nanoTime() - xferStart) / 1000000;
} catch (StorageInterruptedException sie) {
doLogErr(session.getLogger(), sie.getMessage(), sie);
throw new AbortedException();
Expand All @@ -95,20 +95,16 @@ private Sample doList(OutputStream out, String conName, String objName,
IOUtils.closeQuietly(in);
IOUtils.closeQuietly(cout);
}
long end = System.currentTimeMillis();
long end = System.nanoTime();

Date now = new Date(end);
return new Sample(now, getId(), getOpType(), getSampleType(),
getName(), true, end - start, xferTime, cout.getByteCount());
return new Sample(new Date(), getId(), getOpType(), getSampleType(),
getName(), true, (end - start) / 1000000, xferTime, cout.getByteCount());
}

public OutputStream copyLarge(InputStream input, OutputStream output)
throws IOException
{
for(int n = 0; -1 != (n = input.read(buffer));)
{
output.write(buffer, 0, n);
}
IOUtils.copyLarge(input, output);

return output;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
/**

Copyright 2013 Intel Corporation, All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -12,8 +12,8 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
limitations under the License.
*/

package com.intel.cosbench.driver.operator;

Expand All @@ -32,18 +32,18 @@

/**
* This class represents primitive READ operation.
*
*
* @author ywang19, qzheng7
*
*
*/
class Reader extends AbstractOperator {

public static final String OP_TYPE = "read";

private boolean hashCheck = false;

private ObjectPicker objPicker = new ObjectPicker();

private byte buffer[] = new byte[1024*1024];

public Reader() {
Expand Down Expand Up @@ -82,51 +82,48 @@ private Sample doRead(OutputStream out, String conName, String objName,
InputStream in = null;
CountingOutputStream cout = new CountingOutputStream(out);

long start = System.currentTimeMillis();
long start = System.nanoTime();
long xferTime = 0L;
long xferTimeCheck = 0L;
try {
in = session.getApi().getObject(conName, objName, config);
long xferStart = System.currentTimeMillis();
if (!hashCheck){
long xferStart = System.nanoTime();
if (!hashCheck) {
copyLarge(in, cout);
long xferEnd = System.currentTimeMillis();
xferTime = xferEnd - xferStart;
} else if (!validateChecksum(conName, objName, session, in, cout, xferTimeCheck))
} else if (!validateChecksum(conName, objName, session, in, cout)) {
return new Sample(new Date(), getId(), getOpType(),
getSampleType(), getName(), false);
}
long xferEnd = System.nanoTime();
xferTime = (xferEnd - xferStart) / 1000000;
} catch (StorageInterruptedException sie) {
doLogErr(session.getLogger(), sie.getMessage(), sie);
throw new AbortedException();
} catch (Exception e) {
isUnauthorizedException(e, session);
errorStatisticsHandle(e, session, conName + "/" + objName);

return new Sample(new Date(), getId(), getOpType(), getSampleType(), getName(), false);
} finally {
IOUtils.closeQuietly(in);
IOUtils.closeQuietly(cout);
}
long end = System.currentTimeMillis();
long end = System.nanoTime();

Date now = new Date(end);
return new Sample(now, getId(), getOpType(), getSampleType(),
getName(), true, end - start, hashCheck ? xferTimeCheck : xferTime, cout.getByteCount());
return new Sample(new Date(), getId(), getOpType(), getSampleType(),
getName(), true, (end - start)/1000000,
xferTime, cout.getByteCount());
}

public OutputStream copyLarge(InputStream input, OutputStream output)
throws IOException
{
for(int n = 0; -1 != (n = input.read(buffer));)
{
output.write(buffer, 0, n);
}
IOUtils.copyLarge(input, output);

return output;
}

private static boolean validateChecksum(String conName, String objName,
Session session, InputStream in, OutputStream out, long xferTimeCheck)
Session session, InputStream in, OutputStream out)
throws IOException {
HashUtil util;
try {
Expand All @@ -138,8 +135,7 @@ private static boolean validateChecksum(String conName, String objName,

String storedHash = new String();
String calculatedHash = new String();

long xferStart = System.currentTimeMillis();

int br1 = in.read(buf1);

if (br1 <= hashLen) {
Expand Down Expand Up @@ -176,8 +172,7 @@ private static boolean validateChecksum(String conName, String objName,
br1 = br2;
}
}
xferTimeCheck = System.currentTimeMillis() - xferStart;


if (!calculatedHash.equals(storedHash)) {
if (storedHash.startsWith(HashUtil.GUARD)) {
String err =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static Sample doWrite(InputStream in, long length, String conName,
throw new AbortedException();

XferCountingInputStream cin = new XferCountingInputStream(in);
long start = System.currentTimeMillis();
long start = System.nanoTime();

try {
session.getApi()
Expand All @@ -110,10 +110,10 @@ public static Sample doWrite(InputStream in, long length, String conName,
IOUtils.closeQuietly(cin);
}

long end = System.currentTimeMillis();
Date now = new Date(end);
return new Sample(now, op.getId(), op.getOpType(), op.getSampleType(),
op.getName(), true, end - start, cin.getXferTime(), cin.getByteCount());
long end = System.nanoTime();
return new Sample(new Date(), op.getId(), op.getOpType(), op.getSampleType(),
op.getName(), true, (end - start) / 1000000,
cin.getXferTime(), cin.getByteCount());
}
/*
* public static Sample doWrite(byte[] data, String conName, String objName,
Expand Down
1 change: 1 addition & 0 deletions dev/cosbench-ecs/META-INF/.ecsmeta/.dirmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"instanceClass":"com.emc.ecs.sync.model.SyncMetadata","cacheControl":null,"contentDisposition":null,"contentEncoding":"identity","contentLength":0,"contentType":"application/x-directory","httpExpires":null,"modificationTime":"Jun 23, 2016 4:03:00 PM","userMetadata":{"x-emc-crtime":{"key":"x-emc-crtime","value":"2016-06-20T21:16:47Z","indexed":false},"x-emc-posix-owner-name":{"key":"x-emc-posix-owner-name","value":"petera5","indexed":false},"x-emc-posix-group-owner-name":{"key":"x-emc-posix-group-owner-name","value":"CORP\\Domain Users","indexed":false},"x-emc-atime":{"key":"x-emc-atime","value":"2016-06-23T21:02:46Z","indexed":false},"x-emc-mtime":{"key":"x-emc-mtime","value":"2016-06-20T21:16:47Z","indexed":false},"x-emc-posix-mode":{"key":"x-emc-posix-mode","value":"rwxr-xr-x","indexed":false}},"acl":null,"checksum":null,"expirationDate":null}
1 change: 1 addition & 0 deletions dev/cosbench-ecs/META-INF/.ecsmeta/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"instanceClass":"com.emc.ecs.sync.model.SyncMetadata","cacheControl":null,"contentDisposition":null,"contentEncoding":"identity","contentLength":777,"contentType":"application/octet-stream","httpExpires":null,"modificationTime":"Jun 23, 2016 4:03:49 PM","userMetadata":{"x-emc-crtime":{"key":"x-emc-crtime","value":"2016-06-20T21:16:47Z","indexed":false},"x-emc-posix-owner-name":{"key":"x-emc-posix-owner-name","value":"petera5","indexed":false},"x-emc-posix-group-owner-name":{"key":"x-emc-posix-group-owner-name","value":"CORP\\Domain Users","indexed":false},"x-emc-atime":{"key":"x-emc-atime","value":"2016-06-20T21:16:47Z","indexed":false},"x-emc-mtime":{"key":"x-emc-mtime","value":"2016-06-20T21:16:47Z","indexed":false},"x-emc-posix-mode":{"key":"x-emc-posix-mode","value":"rw-r--r--","indexed":false}},"acl":null,"checksum":null,"expirationDate":null}
28 changes: 28 additions & 0 deletions dev/cosbench-ecs/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: cosbench-ecs
Bundle-SymbolicName: cosbench-ecs
Bundle-Version: 0.4.2.0
Bundle-Vendor: emc
Import-Package: com.intel.cosbench.api.auth,
com.intel.cosbench.api.context,
com.intel.cosbench.api.storage,
com.intel.cosbench.client.http,
com.intel.cosbench.config,
com.intel.cosbench.log
Bundle-ClassPath: .,
commons-codec-1.4.jar,
commons-logging-1.1.1.jar,
httpclient-4.5.jar,
httpcore-4.4.1.jar,
javax.mail-api-1.4.6.jar,
jdom2-2.0.5.jar,
jersey-apache-client4-1.18.3.jar,
jersey-client-1.18.3.jar,
jersey-core-1.18.3.jar,
log4j-1.2.17.jar,
lzma-sdk-4j-9.22.0.jar,
object-client-2.1.0.jar,
slf4j-api-1.7.5.jar,
smart-client-2.0.6.jar,
vipr-object-transformations-2.0.3.jar
1 change: 1 addition & 0 deletions dev/cosbench-ecs/META-INF/spring/.ecsmeta/.dirmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"instanceClass":"com.emc.ecs.sync.model.SyncMetadata","cacheControl":null,"contentDisposition":null,"contentEncoding":"identity","contentLength":0,"contentType":"application/x-directory","httpExpires":null,"modificationTime":"Jun 23, 2016 4:03:49 PM","userMetadata":{"x-emc-crtime":{"key":"x-emc-crtime","value":"2015-03-11T16:55:08Z","indexed":false},"x-emc-posix-owner-name":{"key":"x-emc-posix-owner-name","value":"petera5","indexed":false},"x-emc-posix-group-owner-name":{"key":"x-emc-posix-group-owner-name","value":"CORP\\Domain Users","indexed":false},"x-emc-atime":{"key":"x-emc-atime","value":"2016-06-23T21:02:46Z","indexed":false},"x-emc-mtime":{"key":"x-emc-mtime","value":"2015-03-11T16:55:08Z","indexed":false},"x-emc-posix-mode":{"key":"x-emc-posix-mode","value":"rwxr-xr-x","indexed":false}},"acl":null,"checksum":null,"expirationDate":null}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"instanceClass":"com.emc.ecs.sync.model.SyncMetadata","cacheControl":null,"contentDisposition":null,"contentEncoding":"identity","contentLength":774,"contentType":"application/octet-stream","httpExpires":null,"modificationTime":"Jun 23, 2016 4:06:25 PM","userMetadata":{"x-emc-crtime":{"key":"x-emc-crtime","value":"2015-03-11T16:55:08Z","indexed":false},"x-emc-posix-owner-name":{"key":"x-emc-posix-owner-name","value":"petera5","indexed":false},"x-emc-posix-group-owner-name":{"key":"x-emc-posix-group-owner-name","value":"CORP\\Domain Users","indexed":false},"x-emc-atime":{"key":"x-emc-atime","value":"2016-06-16T16:58:52Z","indexed":false},"x-emc-mtime":{"key":"x-emc-mtime","value":"2015-03-11T16:55:08Z","indexed":false},"x-emc-posix-mode":{"key":"x-emc-posix-mode","value":"rw-r--r--","indexed":false}},"acl":null,"checksum":null,"expirationDate":null}
Loading