ceph S3測試--cosbench

COSBench安裝

Cosbench是Intel的開源雲存儲性能測試軟件,COSBench目前已經普遍使用與雲存儲測試,並做爲雲存儲的基準測試工具使用html

1 環境

1.1 操做系統

COSBench可在windows和linux兩種系統中運行,而爲了更好的發揮硬件和系統的能力,建議在使用COSBench進行測試時,選擇linux系統,目前我使用的環境是:ubuntu 12.04系統版本;java

1.2 運行環境

JRE 1.7+node

CURLlinux

2 安裝

2.1 支持環境安裝

2.1.1 JRE

JRE安裝,請參考JDK安裝相關教程,這裏省略。git

2.1.2 CURL安裝

在ubuntu系統中,使用apt-get install 直接進行安裝github

1. 使用 apt-get update對源進行更新web

clip_image001

2. 更新以後,使用apt-get install curl進行安裝ubuntu

clip_image002

3 COSBench安裝

3.1 下載

COSBench開源軟件地址:https://github.com/intel-cloud/cosbench 須要的軟件和說明這裏都有記錄;目前最新的版本是v0.4.2.c4 進入tag下載地址,下載ZIP包便可:swift

網址 https://github.com/intel-cloud/cosbench/releases/tag/v0.4.2.c4windows

clip_image004

在ubuntu系統中,直接使用wget下載便可:

wget https://github.com/intel-cloud/cosbench/releases/download/v0.4.2.c4/0.4.2.c4.zip

clip_image006

3.2 安裝

待軟件下載完畢後,使用unzip進行文件解壓。unzip 0.4.2.c4.zip

clip_image007

解壓完畢後,以下

clip_image008

進入到COSBench目錄,將腳本添加可執行權限:

clip_image009

目錄中,主要腳本的功能以下:

clip_image010

3.3 啓動

在啓動COSBench以前,運行 unset htt_proxy

clip_image011

啓動COSBench只須要直接運行啓動腳本便可:./start-all.sh

clip_image012

當出現以下的信息時,表示啓動成功

clip_image013

在瀏覽器裏面,輸入當前的地址,便可瀏覽COSBench工做界面

http://IP:端口/controller/

如:

http://192.168.59.20:19088/controller/

clip_image015

 

centOS7測試流程:

第一步:

wget https://github.com/intel-cloud/cosbench/releases/download/v0.4.2.c4/0.4.2.c4.zip  #下載軟件,下載速度會很慢

下載解壓後給執行權限  chmod +x ./*.sh

第二步:

搭建java1.7的運行環境

第三步:

到項目文件夾裏面 執行 sh start-all.sh

[root@admin-node 0.4.2.c4]# ./start-all.sh
Launching osgi framwork ... 
Successfully launched osgi framework!
Booting cosbench driver ... 
Starting    cosbench-log_0.4.2    [OK]
.
Starting    cosbench-tomcat_0.4.2    [OK]
Starting    cosbench-config_0.4.2    [OK]
Starting    cosbench-http_0.4.2    [OK]
Starting    cosbench-cdmi-util_0.4.2    [OK]
Starting    cosbench-core_0.4.2    [OK]
Starting    cosbench-core-web_0.4.2    [OK]
Starting    cosbench-api_0.4.2    [OK]
Starting    cosbench-mock_0.4.2    [OK]
Starting    cosbench-ampli_0.4.2    [OK]
Starting    cosbench-swift_0.4.2    [OK]
Starting    cosbench-keystone_0.4.2    [OK]
Starting    cosbench-httpauth_0.4.2    [OK]
Starting    cosbench-s3_0.4.2    [OK]
Starting    cosbench-librados_0.4.2    [OK]
Starting    cosbench-scality_0.4.2    [OK]
Starting    cosbench-cdmi-swift_0.4.2    [OK]
Starting    cosbench-cdmi-base_0.4.2    [OK]
Starting    cosbench-driver_0.4.2    [OK]
Starting    cosbench-driver-web_0.4.2    [OK]
Successfully started cosbench driver!
Listening on port 0.0.0.0/0.0.0.0:18089 ... 
Persistence bundle starting...
Persistence bundle started.
----------------------------------------------
!!! Service will listen on web port: 18088 !!!
----------------------------------------------

======================================================

Launching osgi framwork ... 
Successfully launched osgi framework!
Booting cosbench controller ... 
Starting    cosbench-log_0.4.2    [OK]
.
Starting    cosbench-tomcat_0.4.2    [OK]
Starting    cosbench-config_0.4.2    [OK]
Starting    cosbench-core_0.4.2    [OK]
Starting    cosbench-core-web_0.4.2    [OK]
Starting    cosbench-controller_0.4.2    [OK]
Starting    cosbench-controller-web_0.4.2    [OK]
Successfully started cosbench controller!
Listening on port 0.0.0.0/0.0.0.0:19089 ... 
Persistence bundle starting...
Persistence bundle started.
----------------------------------------------
!!! Service will listen on web port: 19088 !!!
----------------------------------------------

若是執行結構如以上說明軟件運行沒問題

能夠登陸http://xx.xx.xx.xx:19088/controller/index.html #查看是否運行正常

 

 能夠查看進程是否運行

ps aux |grep java  或者  netstat -ant

[root@admin-node 0.4.2.c4]# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     
tcp        0     52 10.101.0.102:22         10.101.0.8:62293        ESTABLISHED
tcp6       0      0 :::19088                :::*                    LISTEN     
tcp6       0      0 :::80                   :::*                    LISTEN     
tcp6       0      0 :::19089                :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:25                  :::*                    LISTEN     
tcp6       0      0 :::18088                :::*                    LISTEN     
tcp6       0      0 :::18089                :::*                    LISTEN     
tcp6       0      0 127.0.0.1:36108         127.0.0.1:18088         TIME_WAIT  
tcp6       0      0 127.0.0.1:36112         127.0.0.1:18088         TIME_WAIT  
tcp6       0      0 127.0.0.1:36110         127.0.0.1:18088         TIME_WAIT  
tcp6       0      0 10.101.0.102:19088      172.18.0.129:50836      TIME_WAIT

 

而後進入項目文件裏面的conf文件夾:/opt/0.4.2.c4/conf

編輯s3-config-sample.xml

測試s3接口配置文件

<?xml version="1.0" encoding="UTF-8" ?>
<workload name="s3-sample" description="sample benchmark for s3">

  <storage type="s3" config="accesskey=<accesskey>;secretkey=<scretkey>;proxyhost=<proxyhost>;proxyport=<proxyport>;endpoint=<endpoint>" />

  <workflow>

    <workstage name="init">
      <work type="init" workers="1" config="cprefix=s3testqwer;containers=r(1,2)" />
    </workstage>

    <workstage name="prepare">
      <work type="prepare" workers="1" config="cprefix=s3testqwer;containers=r(1,2);objects=r(1,10);sizes=c(64)KB" />
    </workstage>

    <workstage name="main">
      <work name="main" workers="8" runtime="30">
        <operation type="read" ratio="80" config="cprefix=s3testqwer;containers=u(1,2);objects=u(1,10)" />
        <operation type="write" ratio="20" config="cprefix=s3testqwer;containers=u(1,2);objects=u(11,20);sizes=c(64)KB" />
      </work>
    </workstage>

    <workstage name="cleanup">
      <work type="cleanup" workers="1" config="cprefix=s3testqwer;containers=r(1,2);objects=r(1,20)" />
    </workstage>

    <workstage name="dispose">
      <work type="dispose" workers="1" config="cprefix=s3testqwer;containers=r(1,2)" />
    </workstage>

  </workflow>

</workload>

 第四步:

執行項目文件下面:

./cli.sh submit conf/s3-config-sample.xml   #執行一個測試

能夠在http://xx.xx.xx.xx:19088/controller/index.html 查看詳細測試結果

相關文章
相關標籤/搜索