Search This Blog

Thursday, 20 September 2018

CosBench on Red Hat Linux

What is Cosbench

COSBench is a benchmarking tool to measure the performance of Cloud Object Storage services such as Amazon S3, Opestack Swift, DELL EMC ECS, Google Cloud Storage etc. Intel developed this tool.

Cosbench works on a Controller and Driver design. Controller VM will utilize the Drivers VMs to perform the IO on the Cloud Storage. So, there is can be only 1 VM that can be configured as Controller and Driver VM. If you want to test much more stringent tests, one controller VM and multiple drivers VMs can be utilized. 

The detailed procedure for installing and using Cosbench is available in the Download Package – “COSBenchUserGuide.pdf”

So, you must be thinking if everything is documented in User Guide, then what is the purpose of this document !!! Hold On !!!
“The User Guide does not cover the procedure for configuration on the RHEL OS, it only covers Ubuntu OS. Well! If you follow that procedure for RHEL, it will fail !!!”

OK ! Let’s begin:


What is required?

·         A VM/machine that is running RHEL with specifications defined in CosBench User Guide – “Reference Hardware Configuration”.
·         Ask your RHEL guy to make sure below packages are installed on the machine (very important):
o   Java Run Time Environment 1.6 or later
o   Curl 7.22.0 or later
o   NC (netcat) package
o   Unzip package
·         Most importantly, Download the latest CosBench Package from below link:

https://github.com/intel-cloud/cosbench/releases


Configuration on the Controller

·         FTP the CosBench package on the RHEL Server, e.g. in the /cosbench.
·         Unzip 0.4.2.zip
·         Ln –s 0.4.2/ cos                  -------------------------- Creates a symbolic link to unzipped files
·         Cd cos                  
·         Chmod +x .sh                       -------------------------- Sets the permissions to run scripts


Configuration Files

These filed will be under the cos folder.

Cos/conf/controller.conf

This file will contain the name and url of all the driver VM’s. Multiple entries if you are using multiple VM’s. Entries goes like below:

[controller]
concurrency=1
drivers=3
log_level = INFO
log_file = log/system.log
archive_dir = archive
[driver1]
name=driver1
url=http://192.168.10.1:18088/driver
[driver2]
name=driver2
url=http://192.168.10.2:18088/driver


Note: If more driver VM’s, add entries and change the name and url

Cos/cosbench-start.sh

This one is very important for configuration on the RHEL servers. By default there is a line (TOOL_PARAMS="-i 0"). This value does not applies to RHEL OS.
#-------------------------------
# COSBENCH STARTUP SCRIPT
#-------------------------------

SERVICE_NAME=$1

BOOT_LOG=log/$SERVICE_NAME-boot.log

OSGI_BUNDLES="$2"

OSGI_CONSOLE_PORT=$3

OSGI_CONFIG=conf/.$SERVICE_NAME

TOMCAT_CONFIG=conf/$SERVICE_NAME-tomcat-server.xml

TOOL="nc"
TOOL_PARAMS="-i 0" -----Delete this line

So edit this file and delete this line.


Start the Controller

On the Controller VM:
1. Cd cos
2. ./start-all.sh
3. This should display that all the services are started successfully.
4. Run the start-all script again if any error comes. Next time, the service should start successfully.


Start the Drivers

On the Driver VM’s:
1. cd cos
2. ./start-driver.sh
3. This should display that all the services are started successfully.
4. Run the start-all script again if any error comes. Next time, the service should start successfully.


Run the Performance Test

Once the services are started successfully on both Controller and Driver VM’s. You can launch the Web Browser from any Machine that is in same LAN as that is the Controller VM. The URL:

http://<controller-host>:19088/controller/index.html

Follow the ConBench User Guide to do Configure the workloads