Sign inSign up

ninedata/dbbench

By ninedata

Updated 7 months ago

Image
1

403

ninedata/dbbench repository overview

NineData DBBench

Ready-to-Use TPC-C Database Benchmark Tool

DBBench is a professional database performance testing tool that fully implements the TPC-C benchmark specification. It supports 12 major databases and provides a real-time web monitoring dashboard.

Image Highlights

  • Multi-Database Support: MySQL, PostgreSQL, Oracle, SQL Server, DB2, TiDB, OceanBase, Dameng, SQLite, YashanDB, Sybase, SAP HANA
  • Real-Time Monitoring: Web UI with live tpmC, latency, CPU, memory, network metrics and time range selector (All / 1m / 10m / 1h / 6h / 1day / Custom)
  • Full TPC-C: All 5 transaction types (New-Order, Payment, Order-Status, Delivery, Stock-Level)
  • CSV Fast Load: Database-native bulk import (MySQL LOAD DATA, PostgreSQL COPY, etc.) for faster data loading
  • Flexible Configuration: Environment variable support for various testing scenarios

Quick Start

docker run -d -p 1929:1929 --name dbbench ninedata/dbbench:latest

Open http://localhost:1929 in your browser to start testing.

Main Dashboard

Main Dashboard

Configuration Panel

Configuration

Supported Databases

DatabaseJDBC URL Format
MySQLjdbc:mysql://host:3306/database
PostgreSQLjdbc:postgresql://host:5432/database
Oraclejdbc:oracle:thin:@host:1521:sid
SQL Serverjdbc:sqlserver://host:1433;databaseName=db
DB2jdbc:db2://host:50000/database
TiDBjdbc:mysql://host:4000/database
OceanBasejdbc:mysql://host:2881/database
Damengjdbc:dm://host:5236/database
SQLitejdbc:sqlite:./tpcc.db
YashanDBjdbc:yasdb://host:1688/database
Sybasejdbc:jtds:sybase://host:5000/database
SAP HANAjdbc:sap://host:30015/?currentschema=schemaName

Usage Workflow

  1. Start Container: Run the docker run command
  2. Access Web UI: Open http://localhost:1929
  3. Configure Connection: Set database connection in the config panel
  4. Load Data: Click "Load Data" to generate test data
  5. Run Benchmark: Click "Start" to begin the benchmark
  6. View Results: Monitor TPS, latency, and system resources in real-time, use time range selector to view different periods
  7. Export Report: Click "Report" after test completes to view/export the benchmark report

Data Scale Reference

Each warehouse contains approximately:

  • Customer: 30,000 rows
  • Order: 30,000 rows
  • Order-Line: ~300,000 rows
  • Stock: 100,000 rows

Recommended Configurations:

  • Quick Test: 1-2 warehouses, 5-10 terminals
  • Standard Test: 10 warehouses, 50 terminals
  • Stress Test: 100+ warehouses, 200+ terminals

Port Reference

PortPurpose
1929Web UI and REST API

REST API

EndpointMethodDescription
/api/benchmark/configGET/POSTGet/Update configuration
/api/benchmark/test-connectionPOSTTest database connection
/api/benchmark/loadPOSTLoad test data
/api/benchmark/startPOSTStart benchmark
/api/benchmark/stopPOSTStop benchmark
/api/benchmark/statusGETGet current status
/api/metrics/currentGETGet real-time metrics
/api/metrics/historyGETGet metrics history (up to 3600 snapshots)
/api/metrics/tps-historyGETGet TPS history data
/api/report/markdownGETGet benchmark report (Markdown)

Metrics Collected

Transaction Metrics
  • Throughput (tpmC / TPM)
  • Total transactions count
  • Success / Rollback / Error counts and rates
  • Latency (average, min, max)
  • Per-transaction type breakdown
Database Host Metrics (via SSH)
  • CPU usage (%)
  • Memory usage (%)
  • Disk I/O (read/write bytes/sec)
  • Network I/O (recv/sent bytes/sec)
Database Metrics
  • Active connections
  • Buffer pool / Cache hit ratio
  • Row lock waits
  • Slow queries count
Client Metrics (Local Machine)
  • CPU usage (%)
  • Memory usage (%)
  • Load average (1m, 5m, 15m)
  • Network I/O (bytes/sec)
  • Disk I/O (bytes/sec)

CLI Mode

In addition to the Web UI, CLI mode is also supported using configuration files:

# Enter container
docker exec -it dbbench bash

# Load data
java -jar /app/dbbench.jar -f /app/profiles/config.properties load

# Run benchmark
java -jar /app/dbbench.jar -f /app/profiles/config.properties run

# Combine actions: clean → load → run
java -jar /app/dbbench.jar -f /app/profiles/config.properties clean load run

# Override specific settings
java -jar /app/dbbench.jar -f /app/profiles/config.properties -w 20 -c 100 -d 300 run

Source Code & Documentation

License

Apache License 2.0

Tag summary

Content type

Image

Digest

sha256:5ab69864b

Size

150.3 MB

Last updated

7 months ago

docker pull ninedata/dbbench