KonnexionsGmbH / ora_bench

Benchmark Framework for Oracle Database Drivers
Other
2 stars 2 forks source link
benchmark benchmark-framework oracle-database-drivers

OraBench - Benchmark Framework for Oracle Database Drivers.

Travis (.org) GitHub release GitHub Release Date GitHub commits since latest release


Table of Contents

1. Introduction
2. Framework Tools
2.1 Benchmark Configuration
2.2 Installation
2.3 Benchmark Operation
2.4 Benchmark Results
2.5 Bulk File


1. Introduction

OraBench can be used to determine the performance of different Oracle database drivers under identical conditions. The framework parameters for a benchmark run are stored in a central configuration file.

The currently supported database drivers are:

Driver Programming Language(s)
cx_Oracle Python 3
godror Go
JDBC.jl Julia
nimodpi Nim
Oracle JDBC Java & Kotlin
Oracle ODPI-C C++ (gcc)
Oracle.jl Julia
oranif Elixir & Erlang
Rust-oracle Rust

The following Oracle database versions are provided in a benchmark run via Docker container:

Shortcut Oracle Database Version
db_18_4_xe Oracle Database 18c (Express Edition) - Linux x86-64
db_19_3_ee Oracle Database 19c 19.3 - Linux x86-64
db_21_3_ee Oracle Database 21c 21.3 - Linux x86-64
db_21_3_xe Oracle Database 21c (Express Edition) - Linux x64 (OL8)

The results of the benchmark runs are collected in either csv (comma-separated values) or tsv (tab-separated values) files.


2. Framework Tools

2.1 Benchmark Configuration

The benchmark configuration file controls the execution and output of a benchmark run. The default name for the configuration file is priv/properties/ora_bench.properties. A detailed description of the configuration options can be found here. For reasons of convenience the following files are generated:

All the file names specified here are also part of the configuration file and can be changed if necessary.

2.2 Installation

The easiest way is to download a current release of OraBench from the GitHub repository. You can find the necessary link here.

OraBench is tested under Ubuntu.

Git is needed to download the repository and for compilation the following software components are needed:

For changes to the OraBench repository it is best to use an editor (e.g. Vim) or a suitable IDE. For using the Docker Image based databases in operational mode, Docker Desktop must also be installed. For the respective software versions, please consult the document release notes.

The whole software environment for the operation and further development of OraBench can be created most easily by using a Docker container (version 1.2.0 from here).

Alternatively, in an Ubuntu 20.04 based environment, e.g.: in a virtual machine, the two following scripts can be used to install the necessary software:

2.3 Benchmark Operation

2.3.1 Script run_ora_bench

This script executes the run_properties_standard script for each of the databases listed in chapter Introduction with standard properties. At the beginning of the script it is possible to exclude individual databases or drivers from the current benchmark. The run log is stored in the run_ora_bench.log file.

2.4 Benchmark Results

In a file defined by the configuration parameters file.result.delimiter, file.result.header and file.result.name, the results of the benchmark run with the actions benchmark, trial and query are stored. In the file directory priv/statistics reference statistics files are available per version of OraBench.

Excerpts from a sample file can be seen in the following image:

In detail, the following information is available in the result files:

Column Format Content
release alphanumeric config param benchmark.release
benchmark id alphanumeric config param benchmark.id
benchmark comment alphanumeric config param benchmark.comment
host name alphanumeric config param benchmark.host.name
no. cores integer config param benchmark.number.cores
os alphanumeric config param benchmark.os
user name alphanumeric config param benchmark.user.name
database alphanumeric config param benchmark.database
language alphanumeric config param benchmark.language
driver alphanumeric config param benchmark.driver
trial no. integer 0 if action equals benchmark, trial no. otherwise
SQL statement alphanumeric SQL statement if action equals query, empty otherwise
core multiplier integer config param benchmark.core.multiplier
fetch size integer config param connection.fetch.size
transaction size integer config param benchmark.transaction.size
bulk length integer config param file.bulk.length
bulk size integer config param file.bulk.size
batch size integer config param benchmark.batch.size
action alphanumeric one of benchmark, query or trial
start day time yyyy-mm-dd hh24:mi:ss.fffffffff current date and time at the start of the action
end day time yyyy-mm-dd hh24:mi:ss.fffffffff current date and time at the end of the action
duration (sec) integer time difference in seconds between start time and end time of the action
duration (ns) integer time difference in nanoseconds between start time and end time of the action

2.5 Bulk File

The bulk file in csv or tsv format is created in the run_create_bulk_file script if it does not already exist. The following configuration parameters are taken into account:

The data column in the bulk file is randomly generated with a unique key column (MD5 hash code).