How to Benchmark RadonDB MySQL with TPC‑C on Kubernetes (Step‑by‑Step)
This guide explains the background of TPC‑C, its key concepts, and provides a detailed, container‑based procedure for setting up the environment, preparing data, running the benchmark on RadonDB MySQL in Kubernetes, and interpreting throughput and price‑performance results.
Background: According to the DWorks 2020 report "The Significance of Chinese‑Developed Databases Ranking First in TPC‑C," more than 67.9% of respondents consider TPC‑C results when selecting a database, making performance a critical metric.
Concepts:
Association
The Transaction Processing Performance Council (TPC) is a nonprofit organization that defines benchmark standards, performance and price metrics, and publishes test results.
Standard
TPC‑C is the OLTP benchmark that evaluates online transaction processing systems and provides reference data for solution selection.
Tool
TPCC‑MySQL is a Percona‑derived implementation of the TPC‑C specification for MySQL, runnable on Windows, GNU/Linux, UNIX, and macOS.
Scenario
The benchmark simulates an online order processing system with multiple warehouses, districts, customers, and orders, representing a distributed database environment.
Five transaction types are defined, with the core performance metrics being New‑Order throughput (TPM) and latency.
New‑Order transaction throughput (TPM)
Latency
Environment preparation:
Operating System: Ubuntu 18.04.5 LTS
Container platform: KubeSphere V3.1.1
Database: RadonDB MySQL Kubernetes
Create Test Pod
$ kubectl run -i --tty --rm --image ubuntu test-shell bash
$ kubectl exec -ti test-shell -c test-shell /bin/bash
$ apt-get updateInstall Tools
$ apt-get install make
$ apt-get install gcc
$ apt-get install gitInstall MySQL client and development libraries:
$ apt-get install mysql-server
$ apt-get install libmysqlclient-devClone and build TPCC‑MySQL:
$ git clone https://github.com/Percona-Lab/tpcc-mysql.git
$ cd tpcc-mysql/src
$ makeData Preparation
In real tests, the number of warehouses should not be less than 100, and for SSD/PCIe SSD hardware, 1000 or more warehouses are recommended.
Create User
mysql> CREATE USER radondb@localhost IDENTIFIED BY 'mysql_password';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on *.* to 'radondb'@'%' identified by 'mysql_password' with grant option;
Query OK, 0 rows affected, 1 warning (0.01 sec)Create Database and Tables
Create the test database:
$ mysqladmin create tpcc1000 -h server_host -u mysql_user -p mysql_passwordLoad the provided schema files:
$ mysql -D tpcc1000 -h server_host -u mysql_user -p mysql_password < create_table.sql
$ mysql -D tpcc1000 -h server_host -u mysql_user -p mysql_password < add_fkey_idx.sqlLoad Data
$ ./tpcc_load -h server_host -d tpcc1000 -u mysql_user -p mysql_password -w 20Run TPC‑C Test
$ ./tpcc_start -h server_host -d tpcc1000 -u mysql_user -p mysql_password -w 20 -c 128 -r 120 -l 200 - > tpcc-output-logParameter explanation:
Generate Charts
Install gnuplot and generate performance graphs:
$ yum install -y gnuplot
$ cat log.conf | gnuplotSummary
The TPC‑C results focus on two indicators:
Throughput (tpmC)
Measures the number of New‑Order transactions processed per minute while satisfying response‑time requirements for the other four transaction types; higher values are better.
Price/Performance (Price/tpmC)
Calculates the ratio of system price (U.S. list price) to throughput; lower values indicate better cost efficiency.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Qingyun Technology Community
Official account of the Qingyun Technology Community, focusing on tech innovation, supporting developers, and sharing knowledge. Born to Learn and Share!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
