Swingbench Short Cookbook Commands

In this example, we are using Swingbench 2.6 with the Order Entry stress test using a configuration file (SOE_Server_Side_V2.xml).

Connection String
The connection will always be defined to the pluggable database (not CDB), if installed.

  • //hostname/service_name valid for driver type: Oracle oci Driver and Oracle jdbc Driver (oewizard,sbutil use only this option).
    Make sure the service name is recognized by the listener (lsnrctl services | grep Service).
  • Tnsnames alias valid only for driver type: Oracle oci Driver (requires Oracle 12.2 client)

Creating the Schema

cd swingbench/bin
$ ./oewizard -dbap change_on_install -ts SOE -nopart -u soe -p soe -cl -df +DATA -create -scale 1 -cs //db_server/db_service

Running
If you need to use connection pooling:

charbench: character mode benchmark
minibench: graphical minimal mode benchmark
swingbench: graphical full mode benchmark (need Xming)

 

Swingbench

Main parameters (see more Swingbench parameters at the end of this document):

-uc: user count
-r: results file
-rt: run time for the benchmark
-cs: connection string
-a: run automatically
-cpuuser: os username of the user used to monitor cpu
-cpupass: os password of the user used to monitor cpu
-cpuloc: location/hostname of the cpu monitor

 

When running swingbench or minibench with the “-a” parameter, it starts automatically. You may want to omit this parameter, to look or change some parameters. highlighted text is unclear. Do you mean: You may want to review, omit, or change this parameter?

Run XLaunch (Xming) or equivalent application:

 

$ export DISPLAY=your windows ip:0.0
$ cd swingbench/bin
./swingbench -u soe -p soe -min 10 -max 200 -stats full -c ../configs/SOE_Server_Side_V2.xml -ld 500 -f -dbap change_on_install -dbau "sys as sysdba" -r scale1_100user.xml -uc 100 -rt 0:05 -cs //db_server/db_service -cpuuser db_os_owner -cpupass db_os_owner_password -cpuloc db_server -a

 

Minibench

 

./minibench -u soe -p soe -min 10 -max 200 -stats full -c ../configs/SOE_Server_Side_V2.xml -ld 500 -f -dbap change_on_install -dbau "sys as sysdba" -r scale1_100user.xml -uc 100 -rt 0:05 -cs //db_server/db_service -cpuuser db_os_owner -cpupass db_os_owner_password -cpuloc db_server -a

 

Charbench

 

./charbench -u soe -p soe -min 10 -max 200 -stats full -c ../configs/SOE_Server_Side_V2.xml -ld 500 -f -dbap change_on_install -dbau "sys as sysdba" -r scale1_100user.xml -uc 100 -rt 0:05 -cs //db_server/db_service -cpuuser db_os_owner -cpupass db_os_owner_password -cpuloc db_server

 

See swingbench database tables:

$ ./sbutil -soe -u soe -p soe -cs //db_server/db_service -tables

 

Compress tables:

$ ./sbutil -soe -u soe -p soe -cs //db_server/db_service -dup 1 -ac -sort

 

Format result output to pdf:

$ ./results2pdf -c results.xml

 

The formatting may not work properly in Linux. In this case, the solution is to use the Windows version:

C:\swingbench\winbin\results2pdf.bat -c results.xml

 

Combine main data of several loads to one csv:

$ ./utils/parse_results.py -r scale1_400user.xml scale1_300user.xml scale1_200user.xml scale1_100user.xml -o results.csv

 

Compare several runs:

$ ./bmcompare -r scale1_100user.xml,scale1_200user.xml

 

Swingbench 2.6 Walkthrough – This screencast shows a complete walkthrough of Swingbench 2.6, from running a wizard to selecting a benchmark to run.

 

Running Swingbench Simultaneously from Several Hosts

Clusteroverview Walkthrough

 

On coordinator_server:

$ ./coordinator -g &

 

On other machines:

$ ./charbench -c ../configs/SOE_Server_Side_V2.xml -dt thin -dbap change_on_install -uc 100 -r scale1_100user.xml -rt 0:05 -cs //db_server/db_service -g group1 -co coordinator_server -bg &

$ ./charbench -c ../configs/SOE_Server_Side_V2.xml -dt thin -dbap change_on_install-uc 100 -r scale2_100user.xml -rt 0:05 -cs //db_server/db_service -g group2 -co coordinator_server -bg &

 

On coordinator_server / PC:

$ ./clusteroverview -rt 00:02 -co coordinator_server -c ../configs/clusteroverview.xml

 

Swingbench Parameters

$ ./swingbench -h
Application: Swingbench
Author: Dominic Giles
Version: 2.6.0.1082

usage: parameters

 

-D use value for given environment variable
-a run automatically
-be end recording statistics after; value is in the form hh:mm.sec
-bs start recording statistics after; value is in the form hh:mm.sec
-c specify config file
-cf the location of a credentials file for Oracle Exadata Express
-cm maximize the charts of swingbench/minibench at startup
-co specify/override coordinator in configuration file
-com specify comment for this benchmark run (in double quotes)
-cpuloc specify/override location/hostname of the cpu monitor
-cpupass specify/override os password of the user used to monitor cpu
-cpuuser specify/override os username of the user used to monitor cpu
-cs override connect string in configuration file
-dbap the password of admin user (used for collecting DB stats)
-dbau the username of admin user (used for collecting DB stats)
-debug turn on debugging; written to standard out
-debugf turn on debugging; written to debug.log
-debugfine turn on finest level of debugging
-debugg turn on debugging via graphical window
-di disable transactions(s) by short name; comma separated
-dim dimensions of swingbench/minibench
-dt override driver type in configuration file (thin, oci, ttdirect, ttclient)
-dumptx output transaction response times to file
-dumptxdir directory for transaction response times files
-en enable transactions(s) by short name; comma separated
-env display environment configuration
-f force data collection and run termination regardless of state
-g distributed group identifier
-h,–help print this message
-i run interactively (default)
-intermax override maximum inter transaction sleep time (default = 0)
-intermin override minimum inter transaction sleep time (default = 0)
-ld specify/override the logon delay (milliseconds)
-max override maximum intra transaction think time in configuration file
-min override minimum intra transaction think time in configuration file
-p override password in configuration file
-pos starting position of swingbench/minibench
-r specify results file
-rr specify/override refresh rate for charts in secs
-rt specify/override run time for the benchmark; value is in the form hh:mm.sec
-stats specify level result stats detail (full or simple)