Skip to content

Commit

Permalink
benchmark: add benchmark for v4.0.0-rc (pingcap#2460)
Browse files Browse the repository at this point in the history
  • Loading branch information
ran-huang authored May 13, 2020
1 parent 46788f2 commit d4d1dac
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 0 deletions.
1 change: 1 addition & 0 deletions TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [How to Test TiDB Using Sysbench](/benchmark/how-to-run-sysbench.md)
- [How to Run TPC-C Test on TiDB](/benchmark/how-to-run-tpcc.md)
- [Sysbench Performance Test - v3.0 vs. v2.1](/benchmark/sysbench-v4.md)
- [TPC-C Performance Test - v4.0 vs. v3.0](/benchmark/tpcc-v2.md)
- [TPC-C Performance Test - v3.0 vs. v2.1](/benchmark/tpcc.md)
- [Interaction Test on Online Workloads and `ADD INDEX` Operations](/benchmark/add-index-with-load.md)
- [Quick Start with TiDB](/quick-start-with-tidb.md)
Expand Down
112 changes: 112 additions & 0 deletions benchmark/tpcc-v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
title: TiDB TPC-C Performance Test Report -- v4.0 vs. v3.0
summary: Compares the TPC-C performance of TiDB 4.0 and TiDB 3.0 using BenchmarkSQL.
category: benchmark
---

# TiDB TPC-C Performance Test Report -- v4.0 vs. v3.0

## Test purpose

This test aims to compare the TPC-C performance of TiDB 4.0 and TiDB 3.0.

## Test version, time, and place

TiDB versions: v4.0.0-rc vs. v3.0.8

Time: April, 2020

Place: Beijing

## Test environment

AWS machine:

| Type | Machine | Number | vCPUs |
| :- | :- | :- | :- |
| TiKV | i3.4xlarge | 3 | 16 |
| TiDB | c5.4xlarge | 2 | 16 |
| PD | m5.xlarge | 3 | 4 |

This test uses the open-source BenchmarkSQL 5.0 as the TPC-C testing tool and adds the support for the MySQL protocol. You can download the testing program by using the following command:

{{< copyable "shell-regular" >}}

```shell
git clone -b 5.0-mysql-support-opt https://github.com/pingcap/benchmarksql.git
```

## Test Plan

Use BenchmarkSQL to load the data of **5000 warehouses** into the TiDB cluster. By using HAProxy, send concurrent requests to the cluster at an incremental number. A single concurrent test lasts 10 minutes.

### TiDB version information

#### v4.0.0-rc

| Component | GitHash |
| :- | :- |
| TiDB | 79db9e30ab8f98ac07c8ae55c66dfecc24b43d56 |
| TiKV | f45d0c963df3ee4b1011caf5eb146cacd1fbbad8 |
| PD | 6f06805f3b0070107fcb4af68b2fc224dee0714d |

#### v3.0.8

| Component | GitHash |
| :- | :- |
| TiDB | 8f13cf1449bd8903ff465a4f12ed89ecbac858a4 |
| TiKV | 0d3168cfd8224fbc48a07796df83ddac0fbcbf46 |
| PD | 456c42b8b0955b33426b58054e43b771801a74d0 |

### TiDB parameter configuration

{{< copyable "" >}}

```toml
[log]
level = "error"
[performance]
max-procs = 20
[prepared_plan_cache]
enabled = true
```

### TiKV parameter configuration

{{< copyable "" >}}

```toml
[readpool]
unify-read-pool = true
[readpool.unified]
min-thread-count = 5
max-thread-count = 6
[readpool.storage]
[readpool.coprocessor]
[storage]
scheduler-worker-pool-size = 3
[raftstore]
store-pool-size = 3
[rocksdb]
max-background-jobs = 3
wal-dir = ""
[raftdb]
max-background-jobs = 3
allow-concurrent-memtable-write = true
[server]
request-batch-enable-cross-command = false
[pessimistic-txn]
pipelined = true
```

### Cluster topology

* 1 TiKV instance is deployed on each `i3.4xlarge` machine, 3 in total.
* 1 TiDB instance is deployed on each `c5.4xlarge` machine, 2 in total.
* 1 PD instance is deployed on each `m5.xlarge` machine, 3 in total.

## Test result

![tpcc](/media/tpcc-3.0-4.0.png)

According to the testing statistics, the performance of TiDB 4.0.0-rc **has increased by 45%** than that of TiDB 3.0.8.
Binary file added media/tpcc-3.0-4.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d4d1dac

Please sign in to comment.