Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark, TOC: add 4.0 TPC-H, TPC-C and Sysbench test reports #2661

Merged
merged 12 commits into from
Jun 5, 2020

Conversation

TomShawn
Copy link
Contributor

@TomShawn TomShawn commented Jun 2, 2020

What is changed, added or deleted? (Required)

add 4.0 TPC-H, TPC-C and Sysbench test reports.

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v4.0 (TiDB 4.0 versions)
  • v3.1 (TiDB 3.1 versions)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)

If you select two or more versions from above, to trigger the bot to cherry-pick this PR to your desired release version branch(es), you must add corresponding labels such as needs-cherry-pick-4.0, needs-cherry-pick-3.1, needs-cherry-pick-3.0, and needs-cherry-pick-2.1.

What is the related PR or file link(s)?

@TomShawn TomShawn added translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. status/PTAL This PR is ready for reviewing. needs-cherry-pick-4.0 labels Jun 2, 2020
@TomShawn TomShawn requested review from JaySon-Huang and yikeke June 2, 2020 06:41
@TomShawn TomShawn changed the title add 4.0 TPC-H benchmark test report add 4.0 TPC-H, TPC-C and Sysbench test reports Jun 2, 2020
@TomShawn TomShawn requested review from scsldb and shuke987 June 2, 2020 12:35
@@ -1,113 +1,133 @@
---
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.
summary: Compare the TPC-H performance of TiDB 4.0 and TiDB 3.0 using BenchmarkSQL.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TPC-C

git clone https://github.com/pingcap/tidb-bench.git && cd tpch/queries
```

2. Execute the query and record the executing time of the query.
Copy link
Contributor

@JaySon-Huang JaySon-Huang Jun 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "Execute those queries and record the executing time of each query"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adopted, thanks.


+ Blue lines represent v3.0;
+ Red lines represent v4.0 (data read only from TiKV);
+ Yellow lines represent v4.0 (data read from TiKV and TiFlash automatically based on intelligent choice).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use the term "smart selection" instead of "intelligent choice" in this doc:
https://pingcap.com/docs/stable/tiflash/use-tiflash/#smart-selection

Copy link
Contributor Author

@TomShawn TomShawn Jun 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This TiFlash overview document uses Intelligent choice https://pingcap.com/docs/stable/tiflash/tiflash-overview/#intelligent-choice

@yikeke yikeke requested review from CaitinChen and removed request for yikeke June 3, 2020 09:21
@yikeke
Copy link
Contributor

yikeke commented Jun 3, 2020

Please help review this PR, thx~ @CaitinChen

FYI @TomShawn

@CaitinChen CaitinChen changed the title add 4.0 TPC-H, TPC-C and Sysbench test reports benchmark, TOC: add 4.0 TPC-H, TPC-C and Sysbench test reports Jun 4, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Jun 5, 2020

@JaySon-Huang, @scsldb, @CaitinChen, @shuke987, PTAL.

Copy link
Contributor

@CaitinChen CaitinChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My review on the TPC-H doc is done. But I think we need to add numbers to show the improvements.
And, just like other benchmark reports, we should point put "TiDB version: v3.0.13 vs. v4.0.0."
@JaySon-Huang PTAL

title: TiDB TPC-H Performance Test Report -- v4.0 vs. v3.0
summary: Compare the TPC-H performance of TiDB 4.0 and TiDB 3.0.
category: benchmark
draft: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line.


## Test purpose

This test aims to compare the TPC-H performances of TiDB 4.0 and TiDB 3.0 in the OLAP (Online Analytical Processing) scenario.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This test aims to compare the TPC-H performances of TiDB 4.0 and TiDB 3.0 in the OLAP (Online Analytical Processing) scenario.
This test aims to compare the TPC-H performances of TiDB 4.0 and TiDB 3.0 in the online analytical processing (OLAP) scenario.


This test aims to compare the TPC-H performances of TiDB 4.0 and TiDB 3.0 in the OLAP (Online Analytical Processing) scenario.

Because [TiFlash](/tiflash/tiflash-overview.md) is introduced in TiDB v4.0 that enhances the HTAP (Hybrid Transactional and Analytical Processing) performance of TiDB, the following performances are tested and compared in this report:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Because [TiFlash](/tiflash/tiflash-overview.md) is introduced in TiDB v4.0 that enhances the HTAP (Hybrid Transactional and Analytical Processing) performance of TiDB, the following performances are tested and compared in this report:
Because [TiFlash](/tiflash/tiflash-overview.md) is introduced in TiDB v4.0, which enhances TiDB's Hybrid Transactional and Analytical Processing (HTAP) capabilities, test objects in this report are as follows:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

benchmark/v4.0-performance-benchmarking-with-tpch.md Outdated Show resolved Hide resolved

#### Hardware prerequisite

To avoid TiKV and TiFlash racing for disk and I/O resources, mount the two NVMe SSD disks configured on EC2 as `/data1` and `/data2`. Deploy TiKV on `/data1` and deploy TiFlash on `/data2`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To avoid TiKV and TiFlash racing for disk and I/O resources, mount the two NVMe SSD disks configured on EC2 as `/data1` and `/data2`. Deploy TiKV on `/data1` and deploy TiFlash on `/data2`.
To avoid TiKV and TiFlash racing for disk and I/O resources, mount the two NVMe SSD disks configured on EC2 to `/data1` and `/data2`. Deploy TiKV on `/data1` and deploy TiFlash on `/data2`.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "mount ... at "?

http://linuxcommand.org/lc3_man_pages/mount8.html

This tells the kernel to attach the filesystem found on device (which is of type type) at the directory dir.


| Query ID | v3.0 | v4.0 TiKV Only | v4.0 TiKV/TiFlash Automatically |
| :-------- | :----------- | :------------ | :-------------- |
| 1 | 7.78s | 7.45s | 2.09s |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| 1 | 7.78s | 7.45s | 2.09s |
| 1 | 7.78 s | 7.45 s | 2.09 s |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments for the following lines.

| 21 | 11.12s | 6.23s | 6.26s |
| 22 | 4.49s | 3.05s | 2.31s |

![TPC-H](/media/tpch_v4vsv3.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
![TPC-H](/media/tpch_v4vsv3.png)
![TPC-H](/media/tpch-v4vsv3.png)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"_" is not allowed in image names.

+ Blue lines represent v3.0;
+ Red lines represent v4.0 (data read only from TiKV);
+ Yellow lines represent v4.0 (data read from TiKV and TiFlash automatically based on intelligent choice).
+ The ordinate represents the processing time of the query. The lower the ordinate, the better the performance.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ The ordinate represents the processing time of the query. The lower the ordinate, the better the performance.
+ The y-axis represents the execution time of the query. The less the time, the better the performance.


Result description:

+ **v4.0 TiKV Only** means that TiDB reads data only from TiKV. Comparing this result with that of v3.0, you can learn the TPC-H performance increase after TiDB and TiKV are upgraded to v4.0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ **v4.0 TiKV Only** means that TiDB reads data only from TiKV. Comparing this result with that of v3.0, you can learn the TPC-H performance increase after TiDB and TiKV are upgraded to v4.0.
+ **v4.0 TiKV Only** means that TiDB reads data only from TiKV. The result shows that the TPC-H performance increased after TiDB and TiKV are upgraded to v4.0.

Result description:

+ **v4.0 TiKV Only** means that TiDB reads data only from TiKV. Comparing this result with that of v3.0, you can learn the TPC-H performance increase after TiDB and TiKV are upgraded to v4.0.
+ **v4.0 TiKV/TiFlash Automatically** means that the TiDB optimizer automatically determines whether to use the TiFlash replica according to the cost estimation. Comparing this result with that of v3.0, you can learn the TPC-H performance increase in the full HTAP form of v4.0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ **v4.0 TiKV/TiFlash Automatically** means that the TiDB optimizer automatically determines whether to use the TiFlash replica according to the cost estimation. Comparing this result with that of v3.0, you can learn the TPC-H performance increase in the full HTAP form of v4.0.
+ **v4.0 TiKV/TiFlash Automatically** means that the TiDB optimizer automatically determines whether to read data from the TiFlash replica according to the cost estimation. The result shows that the TPC-H performance increased in the full HTAP form of v4.0.

Copy link
Contributor

@CaitinChen CaitinChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My review on the TPC-C doc is done.

---

# 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.
This test aims to compare the TPC-C performances of TiDB 4.0 and TiDB 3.0 in the OLTP (Online Transactional Processing) scenario.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This test aims to compare the TPC-C performances of TiDB 4.0 and TiDB 3.0 in the OLTP (Online Transactional Processing) scenario.
This test aims to compare the TPC-C performances of TiDB 4.0 and TiDB 3.0 in the Online Transactional Processing (OLTP) scenario.

git clone https://github.com/pingcap/benchmarksql && cd benchmarksql && ant
```

2. Enter the `run` directory, edit the `props.mysql` file according to the actual situation. Modify the `conn`, `warehouses`, `loadWorkers`, `terminals`, and `runMins` configuration items.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Enter the `run` directory, edit the `props.mysql` file according to the actual situation. Modify the `conn`, `warehouses`, `loadWorkers`, `terminals`, and `runMins` configuration items.
2. Enter the `run` directory, edit the `props.mysql` file according to the actual situation, and modify the `conn`, `warehouses`, `loadWorkers`, `terminals`, and `runMins` configuration items.


4. Execute the `runSQL.sh ./props.mysql sql.mysql/indexCreates.sql` command.

5. Execute MySQL client and execute the `analyze table` statement on every table.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. Execute MySQL client and execute the `analyze table` statement on every table.
5. Run the MySQL client and execute the `analyze table` statement on every table.


According to the testing statistics, the performance of TiDB 4.0.0-rc **has increased by 45%** than that of TiDB 3.0.8.
![TPC-C](/media/tpcc_v4vsv3.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
![TPC-C](/media/tpcc_v4vsv3.png)
![TPC-C](/media/tpcc-v4vsv3.png)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"_" is not allowed in our figure names.

Copy link
Contributor

@CaitinChen CaitinChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My review on the Sysbench doc is done.


## Test purpose

This test aims to compare the Sysbench performances of TiDB 4.0 and TiDB 3.0 in the OLTP (Online Transactional Processing) scenario.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This test aims to compare the Sysbench performances of TiDB 4.0 and TiDB 3.0 in the OLTP (Online Transactional Processing) scenario.
This test aims to compare the Sysbench performances of TiDB 4.0 and TiDB 3.0 in the Online Transactional Processing (OLTP) scenario.


| Service type | Software version |
|:----------|:-----------|
| PD | 3.0、4.0 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| PD | 3.04.0 |
| PD | 3.0 and 4.0 |

| Service type | Software version |
|:----------|:-----------|
| PD | 3.0、4.0 |
| TiDB | 3.0、4.0 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| TiDB | 3.04.0 |
| TiDB | 3.0 and 4.0 |

|:----------|:-----------|
| PD | 3.0、4.0 |
| TiDB | 3.0、4.0 |
| TiKV | 3.0、4.0 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| TiKV | 3.04.0 |
| TiKV | 3.0 and 4.0 |

{{< copyable "" >}}

```yaml
log.level: “error”
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log.level: error
log.level: "error"


Compared with v3.0, the Point Select performance of TiDB v4.0 has increased by 14%.

![Point Select](/media/sysbench_v4vsv3_point_select.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
![Point Select](/media/sysbench_v4vsv3_point_select.png)
![Point Select](/media/sysbench-v4vsv3-point-select.png)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"_" is not allowed in our figure names.


Compared with v3.0, the Update Non-index performance of TiDB v4.0 has increased by 15%.

![Update Non-index](/media/sysbench_v4vsv3_update_non_index.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
![Update Non-index](/media/sysbench_v4vsv3_update_non_index.png)
![Update Non-index](/media/sysbench-v4vsv3-update-non-index.png)


Compared with v3.0, the Update Index performance of TiDB v4.0 has increased by 17%.

![Update Index](/media/sysbench_v4vsv3_update_index.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
![Update Index](/media/sysbench_v4vsv3_update_index.png)
![Update Index](/media/sysbench-v4vsv3-update-index.png)


![Update Index](/media/sysbench_v4vsv3_update_index.png)

### Read Write performance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Read Write performance
### Read-write performance


### Read Write performance

Compared with v3.0, the Read Write performance of TiDB v4.0 has increased by 31%.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Compared with v3.0, the Read Write performance of TiDB v4.0 has increased by 31%.
Compared with v3.0, the read-write performance of TiDB v4.0 has increased by 31%.

@TomShawn
Copy link
Contributor Author

TomShawn commented Jun 5, 2020

@CaitinChen @JaySon-Huang Comments addressed, PTAL again.


## Test result
### Test result
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Test result
## Test result

```

### Cluster topology
### Test plan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Test plan
## Test plan

set global tidb_index_lookup_join_concurrency = 16;
```

### Test plan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Test plan
## Test plan


### Test plan

#### Hardware prerequisite
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Hardware prerequisite
### Hardware prerequisite


To avoid TiKV and TiFlash racing for disk and I/O resources, mount the two NVMe SSD disks configured on EC2 to `/data1` and `/data2`. Deploy TiKV on `/data1` and deploy TiFlash on `/data2`.

#### Test process
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Test process
### Test process


4. Extract and organize the data of query execution time.

### Test result
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Test result
## Test result

Copy link
Contributor

@CaitinChen CaitinChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TomShawn TomShawn merged commit f11484c into pingcap:master Jun 5, 2020
sre-bot pushed a commit to sre-bot/docs that referenced this pull request Jun 5, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Jun 5, 2020

cherry pick to release-4.0 in PR #2711

@TomShawn TomShawn deleted the tpc-h-4.0 branch June 5, 2020 12:38
TomShawn added a commit that referenced this pull request Jun 5, 2020
#2711)

* cherry pick #2661 to release-4.0

Signed-off-by: sre-bot <sre-bot@pingcap.com>

* resolve conflict

Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/PTAL This PR is ready for reviewing. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants