Setup HammerDB for Database Performance Testing in Ubuntu 20

Oracle Database Performance Testing

Tue, 04 Aug 2020

Setup HammerDB for Oracle Database Performance Testing in Ubuntu 20

Download and install HammerDB

export HAMMER_VERSION=3.3
export HAMMER_URI=https://github.com/TPC-Council/HammerDB/releases/download
 
sudo apt-get install -y curl
curl -kLJO {$HAMMER_URI}/v{$HAMMER_VERSION}/HammerDB-{$HAMMER_VERSION}-Linux.tar.gz
tar -zxvf HammerDB-$HAMMER_VERSION-Linux.tar.gz \
  && rm -rf HammerDB-$HAMMER_VERSION-Linux.tar.gz \
  && mv HammerDB-$HAMMER_VERSION hammerdb 
  

01 Install HammerDB

Download and install Oracle Instant Client

Download and install Oracle instant Client here: https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html

02 install Oracle instant client

Setup Oracle database connection details in tnsnames.ora:

06 hammerdb oracle tns setup

HammerDBcli librarycheck

Setup environment variables and run librarycheck in hammerdbcli:

export LD_LIBRARY_PATH=/home/alo/instantclient_19_8
export ORACLE_LIBRARY=/home/alo/instantclient_19_8/libclntsh.so
export PATH=$LD_LIBRARY_PATH:$PATH

03 librarycheck failed for oracle

If you encounter following error, install libaio libraries to resolve: OratclInit(): Failed to load /home/alo/instantclient19_8/libclntsh.so with error libaio.so.1: cannot open shared object file: No such file or directory

sudo apt-get install libaio1 libaio-dev

04 install libaio1

05 library check oracle check ok

HammerDB Schema Build

Before start the schema build, setup the service name (need to align with tnsnames.ora), system username and password in the build option

07 build option

Need to pre-create the tablespace in the database before schema build, otherwise, will get error.

08 create tpcc tablespace

Start schema build:

09 hammer db schema build

Schema Build completed:

10 hammer schema build complete

HammerDB Timed Workload with Time Profiles

Under Driver Options select Timed Driver Script: 11 oracle tcp c timed driver

Run the workload and the result:

Virtual User Output: 12 virtual user output

Oracle Metrics: 13 Oracle Metrisc output

Time Profiles Log: 14 virtual user log

15 virtual user time profile log

Loading...
Drew Lo

Drew.vip - Share my learning path about - Database, Security and Cloud

  • Copyright @ Drew.vip 2020. All rights reserved.
  • Photos by unsplash.com.