Swingbench Installation and Setup

Swingbench installation and setup

Swingbench is a Java based load generator for Oracle. Swingbench can be used to perform stress testing. The Swingbench package can be downloaded from here: http://www.dominicgiles.com/downloads.html.

Swingbench is a versatile tool in that in does not always need to be used for load generation. It can be used as an effective way to validate Oracle RAC configurations. It can be used to test new Oracle software or patches. And it can also assist in evaluating Oracle new features — like the upcoming 12c release.

Swingbench Load-generating tests

Swingbench has several load-generating tests available, including:

  • OE (Order Entry) – It behaves like an OLTP application. It is designed to stress a few number of tables and the RAC interconnect if it exists.
  • SH (Sales History) – SH is more of a data warehouse application running complex queries against large tables. It is noted on the Swingbench website that the schema can be further customized for different data layouts.
  • CC (Calling Circle) – This is designed to stress test SQL generated from an application. The application is reportedly CPU intensive, especially during the load generator.
  • The last test is called StressTest. Its simplistic design does random selects, updates, and inserts.

We often use Swingbench for Capacity Threshold Testing (CTT). What is CTT? CTT is benchmarking designed to test the capacity of your hardware or vSphere cluster. With our CTT test, Swingbench is actually not used to take benchmark metrics — instead it is used to generate a load. We do this by starting Swingbench nodes and then running benchmarks (like Linux dd), taking measurements, and we increase the number of Swingbench nodes.

To run this type of test you need to first download and setup Swingbench.

  1. Download Swingbench 2.4 from http://www.dominicgiles.com/downloads.html.
  2. Swingbench 2.4 requires Java 6 or higher.
  3. Unzip the swingbench zip file in the desired directory.
  4. Seed the OE data by starting the oewizard application located in the $SWINGBENCH/bin directory, the oewizard is a GUI java application so X Windows is required.

Swingbench_applicationwizard_1

Figure 1 – OE Install Wizard

Swingbench_oeinstallwizard_2

Swingbench installation and setup

Figure 2 – OE Wizard (Select Task)

Swingbench_selecttask_3

Swingbench installation and setup

Figure 3 – OE Wizard (Database Details)

Swingbench_databasedetails_4

Figure 4 – OE Wizard (Schema Details)

Swingbench_schemadetails_5

Swingbench installation and setup

Figure 5 – OE Wizard (Sizing Details)

Swingbench_sizingdetails_6

Figure 6 – OE Wizard (Parallelism)

Swingbench_parallelism_7

Swingbench installation and setup

After seeding the data, we edit the connection configuration file. The file contains, among other things, the username and password for the schema owner and connection string for the database. In our configuration, the connection string will be the only item we need to edit. In Figure 7 we have highlighted the connection string. The string is on line 8 in the file. Because Swingbench is running from the database host, we can leave localhost as the hostname. If this is not the case, change accordingly. The other item we need to supply is the database name.

Figure 7 – Edit soeconfig.xml

Swingbench_editsoeconfig_8

This completes the Swingbench setup. The load generating tool is now ready to begin testing using charbench—the Swingbench command client used for load generation. To begin using charbench:

  1. Log in as the oracle user to the virtual machine.
  2. Set the Oracle environment.
  3. Navigate to the Swingbench home and cd into the bin directory.
  4. Run the command:

Swingbench_charbenchcommand_9

Note: soeconfig.xml is the file we edited in the section above.

Notice that we asked charbench to output the following metrics: users (number of users), tpm (transactions per minute), tps (transactions per second), cpu (% of CPU used), and disk (bytes in and bytes out). See Figure 8 for sample output.

Figure 8 – Charbench Output

Swingbench_charbenchoutput_10

This is just one of the many uses for Swingbench. To find out more about what House of Brick can do for you, visit our Services page.

by Jim Hannan ( @HoBHannan), Principal Architect

Table of Contents

Related Posts