Steps to Run BenchmarkSQL on AntsDB/MySQL

Steps to Run BenchmarkSQL on AntsDB/MySQL


First of all, the system must meet the following requirements

  • 16GB memory. Could be more or less depending on the test volume.
  • 100GB free storage. SSD is preferred.
  • Centos 7

Install Required Software

sudo yum install wget java-1.8.0-openjdk maven git ant mysql tuned-profiles-oracle

Install AntsDB

cd ; wget; tar xzvf antsdb-18.05.27-bin.tar.gz

Open the AntsDB configuration file at ~/antsdb/conf/, specify the hbase-site.xml and cache size. This step is optional, if HBase configuration is missing, all data will be stored locally.

Install BenchmarkSQL

cd ; git clone [email protected]:waterguo/benchmarksql.git
cd ~/benchmarksql; ant

This is my fork of the official BenchmarkSQL 4.1.1. The only difference from the original are the extra scripts to create test schema on MySQL and Oracle, as well as MySQL JDBC driver in the lib directory.

Create the Schema

Start AntsDB using the command below

~/antsdb/bin/antsdb start

Create schema in AntsDB using the command below

echo 'create database benchmarksql;' | mysql -h
cd ~/benchmarksql/run
./ props.mysql sqlTableCreates.mysql
./ props.mysql sqlIndexCreates.mysql

Load the Data

The command below will load 100 warehouses into the database. Each warehouse consists of 500k records roughly.

cd ~/benchmarksql/run
./ props.mysql numWarehouses 100

Run the Benchmark

Open the benchmark profile at /home/xinyi/benchmarksql/run/props.mysql. Change warehouses to the number of warehouses you loaded in above step. Change terminals to the number of concurrent sessions you want to run in the benchmark.

Issue the following command to kick off the benchmark.

cd ~/benchmarksql/run
./ props.mysql


To achieve the best performance, consider changing the following parameter

  • Change the kernel parameters using command sudo tuned-adm profile oracle
  • Disable SELinux using command sudo setenforce 0
  • Change AntsDB heap size to 4GB. Specify in configuration file ~/antsdb/conf/wrapper.conf
  • Change JVM to server mode. Specify in configuration file ~/antsdb/conf/wrapper.conf
  • Change readahead to 16KB for very large volume echo 16 >  /sys/block/sdb/queue/read_ahead_kb

Leave a Reply