• No results found

HammerDB DB2 Quick Start

N/A
N/A
Protected

Academic year: 2021

Share "HammerDB DB2 Quick Start"

Copied!
15
0
0

Loading.... (view fulltext now)

Full text

(1)

1

HammerDB DB2 Quick Start

This quick start tutorial gets you up and running with the essentials of load testing and benchmarking for the IBM DB2 Database.

Install DB2 Server ... 1

Optional: Install DB2 Client Software for Networked Access ... 3

Install HammerDB ... 4

Build a DB2 Test Schema ... 5

Run a DB2 Load Test ... 8

Support and Questions ... 15

Install DB2 Server

IBM provide DB2 in a virtual appliance format with a pre-configured DB2 test database in a Linux

operating system. This provides the most rapid way to install and configure DB2 and the

recommended virtual environment for DB2 VM testing is Oracle VirtualBox.

Figure 1 Oracle VirtualBox

Alternatively IBM also offer DB2 Express-C as a freely available version of DB2 that can be run in

the 32 or 64-bit Windows and Linux environments that HammerDB supports.

(2)

2

Figure 2 DB2 Running

(3)

3

Figure 3 DB2 Database Created

Optional: Install DB2 Client Software for Networked Access

Alternatively if you already have a DB2 database running and you wish to connect across a

network HammerDB only requires the IBM Data Server Driver for ODBC and CLI. Note that

HammerDB connects to DB2 via CLI as the db2tcl interface is C based interface enabling CLI

connectivity. ODBC is not used for HammerDB connectivity to DB2.

Figure 5 Data Server Driver

Configure your

db2dsdriver.cfg

file with the hostname, port and database that you have

created on the server.

db2inst1:~/odbc_cli/clidriver/cfg> more db2dsdriver.cfg <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <configuration>

<dsncollection>

<dsn alias="TPCC" host="db2v1032bit" name="TPCC" port="50001"/> </dsncollection>

(4)

4

<databases>

<database host="db2v1032bit" name="TPCC" port="50001"/> </databases>

</configuration>

Install HammerDB

To install HammerDB follow the HammerDB installation guide. Before proceeding you should have

your DB2 database software installed and running. Firstly you will need to select which

benchmark and database you wish to use by choosing select benchmark from under the TPC

menu. The initial settings are determined by the values in your config.xml file. Select DB2 and

TPC-C and press OK as shown in Figure 6.

Figure 6 Select Benchmark

(5)

5

Figure 7 TPC-C Schema Options

Build a DB2 Test Schema

Click on the Benchmark tree view and under TPC-C select TPC-C Schema options to display the

TPC-C Schema options window as shown in Figure 8. Within this window enter the details for DB2

connectivity. The specified database will be created during installation. Select a number of

warehouses with the slider, 5 is good for a first test under a VM and set the Virtual Users to build

schema to the number of virtual CPU cores on your guest system. Click OK.

(6)

6

Figure 8 Build Options

Double-click on the Build option as shown in Figure 9.

(7)

7

On the Create Schema prompt check the details and Click Yes.

Figure 10 Confirm Schema

Wait for the Schema creation to complete, the time to completion depends on your system but should normally be less than 10 minutes.

(8)

8

Figure 12 Schema Build Complete

When the Display shows TPCC SCHEMA COMPLETE and all users have completed successfully the build is finished. Press the red traffic light icon to close the users down.

Run a DB2 Load Test

You can now proceed to run a load test against your created schema. Under the benchmark tree view select Driver Script and options. The choices to select for the driver script are displayed. Note that the database name and usernames if changed for the build options will also be reflected here. Accept the default values and click OK.

(9)

9

Figure 14 Driver Options

Now select the Driver Script option and double-click on Load as shown in Figure 15, this populates the Script Editor window with the driver script. You can observe that the EDITABLE OPTIONS correspond to the driver script options set in the previous step. You do not need to edit the script.

(10)

10

Figure 15 TPC-C Driver Script

Under the Virtual User view double-click on Options and enter the number of users you wish to run against your system. Don’t select too many to start with as the workload is intensive. If you wish check the Show Output button to see what your users are doing whilst the test is running, however note that displaying the output will reduce the overall level of performance and click OK.

Figure 16 Select Virtual Users

(11)

11

running yet.

Figure 17 Create Virtual Users

You can observe that the virtual users have been created but their status is shown as waiting. Now click the Run Virtual Users button as shown in Figure 18 to start the test. The virtual users will begin to execute the driver script in the Script Editor Window.

(12)

12

Figure 18 Virtual Users Created and Run

(13)

13

Figure 19 Load Testing Running

By clicking on the pencil icon shown in Figure 19 you can observe the transaction rate reported by DB2.

(14)

14

Also observe with HammerDB Metricsthat a load has been placed on the system.

Figure 21 HammerDB Metrics

The load will complete when all virtual users have completed the number of transactions you defined or can be stopped by pressing the red traffic light icon as shown in Figure 22 to destroy the virtual users.

(15)

15

HammerDB users of other databases should note that at the present time DB2 does not make Transaction Counter statistics queryable and therefore a transaction counter is not available. Performance statistics are available as NOPM by running a timed test. For next steps such as running timed and automated tests follow the Introduction to Transactional (OLTP) Load Testing for all Databases.

Support and Questions

References

Related documents

beneficial these lords are per stanza : “If the lord of third bhava has attained benefic vargas and is strong, the person born will be virtous; but he will be rash if that planet

Scatter diagrams and regression equations for analyses of aerial part (DWAP), root (RDW) and total (TDW) dry matter weight based on fertigation management and soil salinity levels

DOD………..……….……….….Department of Defense DOT………..……….…..Department of Transportation DPH………Department of Public Health DSLR (CDC)……….…………..Division

To appreciate the methodology, consider first the national annual per-capita gross domestic product (GDP) in constant prices. One could compare an individual born in an era

(the “Owner”) hereby acknowledges and agrees with ENMAX Energy Corporation (“ENMAX Energy”) that in the event there is a vacancy in the premises located at or in any of the

44, Pension Expense Deferral 2 investors.centerpointenergy.com, “Regulatory Information” section, “Natural Gas Utilities”

Our biggest store in Japan, with a sales fl oor of 3,300 square meters, opened in September 2011 within Ikebukuro’s Tobu Department Store in Tokyo. These prime urban stores

A train overtakes two persons who are walking in the same direction in which the train is going, at the rate of 2 kmph and 4 kmph and passes them completely in 9 and 10