Use the Cosbench tool to perform stress testing on the Ceph S3 interface

Source: Internet
Author: User

First, Cosbench installation

Cosbench is the Intel Team's test tool for cloud storage based on Java development, the full name is Cloud object Storage Bench

Under the groove, it seems that this set of tools is developed by the Intel Shanghai team, there is no Chinese-related information.

Like all performance testing tools, the Cosbench also points to the driver of the console and the originating request, and driver can be distributed. Supports Swift, S3, OpenStack and other interfaces

1. Download Cosbench Tools

As: Https://github.com/intel-cloud/cosbench, be sure to download the latest package
Otherwise it may fail to run and I am experiencing a startup failure.

2, after the download is completed, the package will be placed in any directory of Linux, decompression unzip XXX.ZIP3, decompression, there is a description of the document: Cosbenchuserguide.pdf, but in English 4, install third-party assembly, under the CentOS, need to install Java and Curl
Yum Install Java Curl

Cosbench the Linux NC is called to do the data analysis, so if the Linux does not install NC need to manually installed NC

5, after the decompression is complete, the CD enters the directory, such as the latest version of the directory example 0.4.2.c3, the sh file is given execute permission, here use the HTTP protocol to send commands
0.4. 2  0.4. 2 chmod +x *. SH  0.4. 2. c3]# unset http_proxy
TwoStart

Running the./start_all.sh file directly will simultaneously run control and driver simultaneously, but driver can only be started on one stage, and subsequent additions will be said to add more than one driver

After successful startup, the page will appear when you enter http://127.0.0.1:19088/controller/index.html, and if you are viewing it on Windows, the IP here needs to be replaced with the native IP address of Linux, and the Port 19088 is released.

As shown in the following:

There is a problem here, each time the time zone is not displayed, and after the request, the time will change, the original is to modify the startup script cosbench-start.sh

Modify Java startup as follows:

/usr/bin/nohup java  -duser.timezone=asia/shanghai-dcosbench.tomcat.config= $TOMCAT _config-server-CP Main/*  org.eclipse.equinox.launcher.main-configuration $OSGI _config-console $OSGI _console_port 1> $ Boot_log 2>&1 &
Third, the configuration

Configuration of the control.conf

Configure basic information and driver information,

Note that the driver must be added as driver<n>, otherwise unrecognized, as follows:

== http://*.11:18088/driver== http://*.12:18088/driver == http://*.13:18088/driver = = http:  //  *.14:18088/driver

Configuration of the driver.conf

Configure the dirver you need to initiate the pressure, you can not start, if not started, in controller overview will not see driver

If you want to start dirver on different machines, you need to run start-driver.sh separately and ensure that the communication is normal, you can use Curl http://<dirver-host>:18088/driver/ Index.html determine if communication is normal

FourScript Configuration

There are many examples of templates, in the Conf directory, such as Librados-config-sample.xml, S3-config-sample.xml

This only tests the S3 interface, so focus on the S3 configuration first.

The S3 configuration is not displayed on the page, so we configure it manually

<Workstagename= "Prepare"><Storagetype= "S3"Config= "accesskey=<accesskey>;secretkey=<scretkey>;p roxyhost=<proxyhost>;p roxyport=< Proxyport>;endpoint=<endpoint> " />      < Worktype= "Prepare"Workers= "1"Config= "Cprefix=s3testqwer;containers=r"; objects=r (1,10); Sizes=c (+) KB " /></Workstage>

The configuration is described below (refer to Userguide.pdf)

<workstage name= "Prepare" >

Property Type Default value Note
Name String Name, take whatever you want.
<type= "Prepare"  workers= "1"  config= "cprefix= S3testqwer;containers=r, Objects=r (1,10); Sizes=c (+) KB "/>

Insert the instructions in the PDF here:

For the S3 interface, there are generally the following types of work type:init, prepare, Dispose, cleanup, specifically refer to the demo document

Here are a few sample configuration documents:

Create Buckets

-<Workloadname= "Initbucket"Description= "Sample benchmark for S3">  <Storagetype= "S3"Config= "accesskey=v02tu7btthysvinsrb7p;secretkey=b2u6zginvlnfsdupbigebzkx9na7kvm7uwemrtpn;endpoint=http:// xx.xx.xx.xx/" /> - <Workflow>- <Workstagename= "Init_create_bucket">  < Worktype= "Init"Workers= "1"Config= "Cprefix=test;containers=r" />   </Workstage>  </Workflow>  </Workload>

Get Data

<?XML version= "1.0" encoding= "UTF-8"?> - <Workloadname= "get-100workers-64k"Description= "Sample benchmark for S3">  <Storagetype= "S3"Config= "accesskey=v02tu7btthysvinsrb7p;secretkey=b2u6zginvlnfsdupbigebzkx9na7kvm7uwemrtpn;endpoint=http:// xx.xx.xx.xx/" /> - <Workflow>- <Workstagename= "Get 64k data with workers">- < Workname= "Get64kbdata"Workers= "+"Totalops= "75000"Driver= "SV40">  <Operationtype= "read"ratio= "+"Config= "cprefix=test;oprefix=100wks_64k;containers=c (1); Objects=u (1,75000)" />   </ Work>  </Workstage>  </Workflow>  </Workload>

Here the workers represents the number of concurrent, Totalops represents the total number of operations, driver for different pressure machines, according to the Userguide document, there are many parameters are optional, as follows:

Property Type Default value Description
Workers Integral type Must be equipped with Concurrency number
Interval Integral type 5s

Time interval

Division Character "None" Optional: ["None" |
"Container" |
"Object"]
Runtime Integral type 0 How long it takes to run
Rampup Integral type 0

How long it takes to start all of the concurrency, with JMeter

Conflicts with runtime and cannot be combined with

Rampdown Integral type 0 The end number, and the runtime can not be combined with

Uploading data

<?XML version= "1.0" encoding= "UTF-8"?> - <Workloadname= "PUT-100WORKERS-4MB"Description= "Sample benchmark for S3">  <Storagetype= "S3"Config= "accesskey=v02tu7btthysvinsrb7p;secretkey=b2u6zginvlnfsdupbigebzkx9na7kvm7uwemrtpn;endpoint=http://x.x.x.x/" /> - <Workflow>- <Workstagename= "Put 4MB data with workers">- < Workname= "Put64kbdata1"Workers= "+"Totalops= "75000"Driver= "SV40">  <Operationtype= "Write"ratio= "+"Config= "cprefix=test;oprefix=100wks_64k;containers=c (1); Objects=s (1,75000); Sizes=c (4) MB" />   </ Work>  </Workstage>  </Workflow>  </Workload>

V. Viewing results

A result after the test is complete

We can see with the task a pressure tool is the indicator

1, avg-restime response Average Time

2, avg-proctime average processing time

3, throughput: throughput, which is what we often say TPS

4, Bandwith: Bandwidth

5. Succ-ratio: Number of successes

Here is a pity point is that the performance test in the resource monitoring no way to join, such as CPU memory, and can only write their own scripts to collect data.

Use the Cosbench tool to perform stress testing on the Ceph S3 interface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.