Skip to content
Snippets Groups Projects
README.md 2.01 KiB
Newer Older
nownabe's avatar
nownabe committed
Cloud RDB Benchmark
===================

# Results

## tpcc-mysql

```
nownabe's avatar
nownabe committed
warehouses  = {50, 100}
nownabe's avatar
nownabe committed
connections = {20, 40, 60, 80, 100}
```

![tpcc-mysql-50](https://gitlab.com/nownabe/rdb-bench/raw/master/results/tpcc-mysql-50.png)

![tpcc-mysql-100](https://gitlab.com/nownabe/rdb-bench/raw/master/results/tpcc-mysql-100.png)

Ignored RDS for 100 warehouses test because RDS is too slow.

nownabe's avatar
nownabe committed
## sysbench

```
table_size = {10000, 100000, 1000000}
threads    = {2, 4, 8, 16, 32, 64, 128, 256}
```

![oltp_read_write-10k](https://gitlab.com/nownabe/rdb-bench/raw/master/results/oltp_read_write-10k.png)

![oltp_read_write-100k](https://gitlab.com/nownabe/rdb-bench/raw/master/results/oltp_read_write-100k.png)

![oltp_read_write-1m](https://gitlab.com/nownabe/rdb-bench/raw/master/results/oltp_read_write-1m.png)

nownabe's avatar
nownabe committed
# Build Databases

Make sure aws cli and gcloud are configured.
(Or configure their credentials.)

```bash
$ cd terraform
$ cp .envrc.example .envrc
$ vi .envrc
$ source .envrc
$ terraform init
$ terraform plan
$ terraform apply
```

# Benchmark Details

nownabe's avatar
nownabe committed
Configure MySQL credentials before tests.

```bash
$ echo "export MYSQL_USER=user"
$ echo "export MYSQL_PASS=password"
$ echo "export MYSQL_HOST=mysql-host"
```

nownabe's avatar
nownabe committed
## tpcc-mysql

### Preparation

Install tpcc-mysql.

```bash
$ sudo yum install -y gcc make git mysql-devel
$ git clone https://github.com/Percona-Lab/tpcc-mysql.git ${HOME}/tpcc-mysql
$ cd tpcc-mysql/src
$ make
```

Download test script.

```bash
$ curl -sSL -o ${HOME}/run-tpcc.sh https://gitlab.com/nownabe/rdb-bench/raw/master/run-tpcc.sh
```

nownabe's avatar
nownabe committed
Run tests.
nownabe's avatar
nownabe committed

```bash
nownabe's avatar
nownabe committed
$ bash ${HOME}/run-tpcc.sh
nownabe's avatar
nownabe committed
```

nownabe's avatar
nownabe committed
Then see `${HOME}/log/tpcc`.

## sysbench

Install sysbench.
nownabe's avatar
nownabe committed

```bash
nownabe's avatar
nownabe committed
$ curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash
$ sudo yum -y install sysbench
nownabe's avatar
nownabe committed
```

nownabe's avatar
nownabe committed
Download test script.

```bash
$ curl -sSL -o ${HOME}/run-sysbench.sh https://gitlab.com/nownabe/rdb-bench/raw/master/run-sysbench.sh
```

nownabe's avatar
nownabe committed
Run tests.
nownabe's avatar
nownabe committed

```bash
$ bash ${HOME}/run-sysbench.sh
```
nownabe's avatar
nownabe committed

Then see `${HOME}/log/sysbench`.