diff --git a/TOC.md b/TOC.md index 063812f24066..19c43a8f4d6c 100644 --- a/TOC.md +++ b/TOC.md @@ -35,6 +35,11 @@ + 性能测试报告及重现指南 + [如何用 Sysbench 测试 TiDB](/benchmark/benchmark-tidb-using-sysbench.md) + [如何对 TiDB 进行 TPC-C 测试](/benchmark/benchmark-tidb-using-tpcc.md) + + [Sysbench 性能对比 - v4.0 对比 v3.0](/benchmark/benchmark-sysbench-v4-vs-v3.md) + + [TPC-H 性能对比 - v4.0 对比 v3.0](/benchmark/v4.0-performance-benchmarking-with-tpch.md) + + [TPC-C 性能对比 - v4.0 对比 v3.0](/benchmark/v4.0-performance-benchmarking-with-tpcc.md) + + [Sysbench 性能对比 - v3.0 对比 v2.1](/benchmark/v3.0-performance-benchmarking-with-sysbench.md) + + [TPC-C 性能对比 - v3.0 对比 v2.1](/benchmark/v3.0-performance-benchmarking-with-tpcc.md) + [线上负载与 ADD INDEX 相互影响测试](/benchmark/online-workloads-and-add-index-operations.md) + 数据迁移 + [支持的数据迁移路径](/data-migration-route.md) diff --git a/benchmark/benchmark-sysbench-v4-vs-v3.md b/benchmark/benchmark-sysbench-v4-vs-v3.md index ee2f8c68bd37..d975e6285045 100644 --- a/benchmark/benchmark-sysbench-v4-vs-v3.md +++ b/benchmark/benchmark-sysbench-v4-vs-v3.md @@ -1,7 +1,6 @@ --- title: TiDB Sysbench 性能对比测试报告 - v4.0 对比 v3.0 category: benchmark -draft: true --- # TiDB Sysbench 性能对比测试报告 - v4.0 对比 v3.0 @@ -14,7 +13,7 @@ draft: true ### 硬件配置 -| 服务类型 | EC2 类型 | 节点数 | +| 服务类型 | EC2 类型 | 节点数 | |:----------|:----------|:----------| | PD | m5.xlarge | 3 | | TiKV | i3.4xlarge| 3 | @@ -23,7 +22,7 @@ draft: true ### 软件版本 -| 服务类型 | 软件版本 +| 服务类型 | 软件版本 | |:----------|:-----------| | PD | 3.0、4.0 | | TiDB | 3.0、4.0 | @@ -32,65 +31,88 @@ draft: true ### 参数配置 -#### TiDB 3.0 参数配置 - -- log.level: “error” -- performance.max-procs: 20 -- prepared-plan-cache.enabled: true -- tikv-client.max-batch-wait-time: 2000000 - -#### TiKV 3.0 参数配置 - -- storage.scheduler-worker-pool-size: 5 -- raftstore.store-pool-size: 3 -- raftstore.apply-pool-size: 3 -- rocksdb.max-background-jobs: 3 -- raftdb.max-background-jobs: 3 -- raftdb.allow-concurrent-memtable-write: true -- server.grpc-concurrency: 6 -- readpool.storage.normal-concurrency: 10 -- readpool.coprocessor.normal-concurrency: 5 - -#### TiDB 4.0 参数配置 - -- log.level: “error” -- performance.max-procs: 20 -- prepared-plan-cache.enabled: true -- tikv-client.max-batch-wait-time: 2000000 - -#### TiKV 4.0 参数配置 - -- storage.scheduler-worker-pool-size: 5 -- raftstore.store-pool-size: 3 -- raftstore.apply-pool-size: 3 -- rocksdb.max-background-jobs: 3 -- raftdb.max-background-jobs: 3 -- raftdb.allow-concurrent-memtable-write: true -- server.request-batch-enable-cross-command: false -- server.grpc-concurrency: 6 -- readpool.unifiy-read-pool: true -- readpool.unified.min-thread-count: 5 -- readpool.unified.max-thread-count: 20 -- readpool.storage.normal-concurrency: 10 -- pessimistic-txn.pipelined: true - -#### 全局变量 - -- set global tidb_hashagg_final_concurrency=1; -- set global tidb_hashagg_partial_concurrency=1; -- set global tidb_disable_txn_auto_retry=0; +#### TiDB v3.0 参数配置 + +{{< copyable "" >}} + +```yaml +log.level: “error” +performance.max-procs: 20 +prepared-plan-cache.enabled: true +tikv-client.max-batch-wait-time: 2000000 +``` + +#### TiKV v3.0 参数配置 + +{{< copyable "" >}} + +```yaml +storage.scheduler-worker-pool-size: 5 +raftstore.store-pool-size: 3 +raftstore.apply-pool-size: 3 +rocksdb.max-background-jobs: 3 +raftdb.max-background-jobs: 3 +raftdb.allow-concurrent-memtable-write: true +server.grpc-concurrency: 6 +readpool.storage.normal-concurrency: 10 +readpool.coprocessor.normal-concurrency: 5 +``` + +#### TiDB v4.0 参数配置 + +{{< copyable "" >}} + +```yaml +log.level: “error” +performance.max-procs: 20 +prepared-plan-cache.enabled: true +tikv-client.max-batch-wait-time: 2000000 +``` + +#### TiKV v4.0 参数配置 + +{{< copyable "" >}} + +```yaml +storage.scheduler-worker-pool-size: 5 +raftstore.store-pool-size: 3 +raftstore.apply-pool-size: 3 +rocksdb.max-background-jobs: 3 +raftdb.max-background-jobs: 3 +raftdb.allow-concurrent-memtable-write: true +server.request-batch-enable-cross-command: false +server.grpc-concurrency: 6 +readpool.unifiy-read-pool: true +readpool.unified.min-thread-count: 5 +readpool.unified.max-thread-count: 20 +readpool.storage.normal-concurrency: 10 +pessimistic-txn.pipelined: true +``` + +#### 全局变量配置 + +{{< copyable "sql" >}} + +```sql +set global tidb_hashagg_final_concurrency=1; +set global tidb_hashagg_partial_concurrency=1; +set global tidb_disable_txn_auto_retry=0; +``` ## 测试方案 -- 通过 TiUP 部署 TiDB v4.0 和 v3.0。 -- 通过 Sysbench 导入 16 张表,每张表数据 1000 万数据。 -- 分别对每个表执行 `analyze table` 命令。 -- 备份数据用于不同并发测试前进行恢复以保证每次数据一致。 -- 启动 Sysbench 客户端,测试 point_select, read_write,update_index, update_non_index,通过 aws nlb 向 TIDB 加压,单次预热 1 分钟,测试 5 分钟。 -- 每轮完成后停止集群,使用之前的备份的数据覆盖,再启动集群。 +1. 通过 TiUP 部署 TiDB v4.0 和 v3.0。 +2. 通过 Sysbench 导入 16 张表,每张表数据 1000 万数据。 +3. 分别对每个表执行 `analyze table` 命令。 +4. 备份数据,用于不同并发测试前进行数据恢复,以保证每次数据一致。 +5. 启动 Sysbench 客户端,进行 `point_select`、`read_write`、`update_index` 和 `update_non_index` 测试。通过 AWS NLB 向 TiDB 加压,单轮预热 1 分钟,测试 5 分钟。 +6. 每轮完成后停止集群,使用之前的备份的数据覆盖,再启动集群。 ### 准备数据命令 +{{< copyable "shell-regular" >}} + +```bash sysbench oltp_common \ --threads=16 \ --rand-type=uniform \ @@ -101,9 +123,13 @@ sysbench oltp_common \ --mysql-user=root \ --mysql-password=password \ prepare --tables=16 --table-size=10000000 - +``` + ### 执行测试命令 +{{< copyable "shell-regular" >}} + +```bash sysbench $testname \ --threads=$threads \ --time=300 \ @@ -114,25 +140,30 @@ sysbench $testname \ --mysql-host=$aws_nlb_host \ --mysql-port=$aws_nlb_port \ run --tables=16 --table-size=10000000 +``` ## 测试结果 -### Point Select +### Point Select 性能 + +v4.0 对比 v3.0,Point Select 性能提升了 14%。 + +![Point Select](/media/sysbench_v4vsv3_point_select.png) + +### Update Non-index 性能 + +v4.0 对比 v3.0,Update Non-index 性能提升了 15%。 -TODO - +![Update Non-index](/media/sysbench_v4vsv3_update_non_index.png) -### Update Non-index +### Update Index 性能 -TODO - +v4.0 对比 v3.0,Update Index 性能提升了 17%。 -### Update Index +![Update Index](/media/sysbench_v4vsv3_update_index.png) -TODO - +### Read Write 性能 -### Read Write +v4.0 对比 v3.0,Read Write 性能提升了 31%。 -TODO - +![Read Write](/media/sysbench_v4vsv3_read_write.png) diff --git a/benchmark/v3.0-performance-benchmarking-with-sysbench.md b/benchmark/v3.0-performance-benchmarking-with-sysbench.md new file mode 100644 index 000000000000..a46c0c6392de --- /dev/null +++ b/benchmark/v3.0-performance-benchmarking-with-sysbench.md @@ -0,0 +1,279 @@ +--- +title: TiDB Sysbench 性能对比测试报告 - v3.0 对比 v2.1 +category: benchmark +aliases: ['/docs-cn/stable/benchmark/sysbench-v4/'] +--- + +# TiDB Sysbench 性能对比测试报告 - v3.0 对比 v2.1 + +## 测试目的 + +对比 TiDB 3.0 版本和 2.1 版本在 OLTP 场景下的性能。 + +## 测试版本、时间、地点 + +TiDB 版本:v3.0.0 vs. v2.1.13 + +时间:2019 年 6 月 + +地点:北京 + +## 测试环境 + +测试在 AWS EC2 上进行,使用 CentOS-7.6.1810-Nitro (ami-028946f4cffc8b916) 镜像,各组件实例类型如下: + +| 组件 | 实例类型 | +| :--- | :--------- | +| PD | r5d.xlarge | +| TiKV | c5d.4xlarge | +| TiDB | c5.4xlarge | + +Sysbench 版本:1.0.17 + +## 测试方案 + +使用 Sysbench 向集群导入 **16 张表,每张数据 1000 万**。起 3 个 sysbench 分别向 3 个 TiDB 发压,请求并发数逐步增加,单次测试时间 5 分钟。 + +准备数据命令: + +{{< copyable "shell-regular" >}} + +```sh +sysbench oltp_common \ + --threads=16 \ + --rand-type=uniform \ + --db-driver=mysql \ + --mysql-db=sbtest \ + --mysql-host=$tidb_host \ + --mysql-port=$tidb_port \ + --mysql-user=root \ + --mysql-password=password \ + prepare --tables=16 --table-size=10000000 +``` + +执行测试命令: + +{{< copyable "shell-regular" >}} + +```sh +sysbench $testname \ + --threads=$threads \ + --time=300 \ + --report-interval=15 \ + --rand-type=uniform \ + --rand-seed=$RANDOM \ + --db-driver=mysql \ + --mysql-db=sbtest \ + --mysql-host=$tidb_host \ + --mysql-port=$tidb_port \ + --mysql-user=root \ + --mysql-password=password \ + run --tables=16 --table-size=10000000 +``` + +### TiDB 版本信息 + +### v3.0.0 + +| 组件 | GitHash | +| :--- | :---------------------------------------- | +| TiDB | `8efbe62313e2c1c42fd76d35c6f020087eef22c2` | +| TiKV | `a467f410d235fa9c5b3c355e3b620f81d3ac0e0c` | +| PD | `70aaa5eee830e21068f1ba2d4c9bae59153e5ca3` | + +### v2.1.13 + +| 组件 | GitHash | +| :--- | :---------------------------------------- | +| TiDB | `6b5b1a6802f9b8f5a22d8aab24ac80729331e1bc` | +| TiKV | `b3cf3c8d642534ea6fa93d475a46da285cc6acbf` | +| PD | `886362ebfb26ef0834935afc57bcee8a39c88e54` | + +### TiDB 参数配置 + +2.1 和 3.0 中开启 prepared plan cache (出于优化考虑,2.1 的 point select 与 read write 并未开启): + +```toml +[prepared-plan-cache] +enabled = true +``` + +并设置全局变量: + +{{< copyable "sql" >}} + +```sql +set global tidb_hashagg_final_concurrency=1; +set global tidb_hashagg_partial_concurrency=1; +set global tidb_disable_txn_auto_retry=0; +``` + +此外 3.0 还做了如下配置: + +```toml +[tikv-client] +max-batch-wait-time = 2000000 +``` + +### TiKV 参数配置 + +2.1 和 3.0 使用如下配置: + +```toml +log-level = "error" +[readpool.storage] +normal-concurrency = 10 +[server] +grpc-concurrency = 6 +[rocksdb.defaultcf] +block-cache-size = "14GB" +[rocksdb.writecf] +block-cache-size = "8GB" +[rocksdb.lockcf] +block-cache-size = "1GB" +``` + +3.0 还做了如下配置: + +```toml +[raftstore] +apply-pool-size = 3 +store-pool-size = 3 +``` + +### 集群拓扑 + +| 机器 IP | 部署实例 | +| :-------------------------------------- | :----------| +| 172.31.8.8 | 3 * Sysbench | +| 172.31.7.80, 172.31.5.163, 172.31.11.123 | PD | +| 172.31.4.172, 172.31.1.155, 172.31.9.210 | TiKV | +| 172.31.7.80, 172.31.5.163, 172.31.11.123 | TiDB | + +## 测试结果 + +### Point Select 测试 + +**v2.1** + +| Threads | QPS | 95% latency(ms) | +| :------- | :-------- | :------------- | +| 150 | 240304.06 | 1.61 | +| 300 | 276635.75 | 2.97 | +| 600 | 307838.06 | 5.18 | +| 900 | 323667.93 | 7.30 | +| 1200 | 330925.73 | 9.39 | +| 1500 | 336250.38 | 11.65 | + + + +**v3.0** + +| Threads | QPS | 95% latency(ms) | +| :------- | :-------- | :-------------- | +| 150 | 334219.04 | 0.64 | +| 300 | 456444.86 | 1.10 | +| 600 | 512177.48 | 2.11 | +| 900 | 525945.13 | 3.13 | +| 1200 | 534577.36 | 4.18 | +| 1500 | 533944.64 | 5.28 | + +![point select](/media/sysbench_v4_point_select.png) + +### Update Non-Index 测试 + +**v2.1** + +| threads | qps | 95% latency(ms) | +| ------- | -------: | --------------: | +| 150 | 21785.37 | 8.58 | +| 300 | 28979.27 | 13.70 | +| 600 | 34629.72 | 24.83 | +| 900 | 36410.06 | 43.39 | +| 1200 | 37174.15 | 62.19 | +| 1500 | 37408.88 | 87.56 | + +**v3.0** + +| threads | qps | 95% latency(ms) | +| ------- | -------: | --------------: | +| 150 | 28045.75 | 6.67 | +| 300 | 39237.77 | 9.91 | +| 600 | 49536.56 | 16.71 | +| 900 | 55963.73 | 22.69 | +| 1200 | 59904.02 | 29.72 | +| 1500 | 62247.95 | 42.61 | + +![update non-index](/media/sysbench_v4_update_non_index.png) + +### Update Index 测试 + +**v2.1** + +| Threads | QPS | 95% latency(ms) | +| :------- | :------- | :-------------- | +| 150 | 14378.24 | 13.22 | +| 300 | 16916.43 | 24.38 | +| 600 | 17636.11 | 57.87 | +| 900 | 17740.92 | 95.81 | +| 1200 | 17929.24 | 130.13 | +| 1500 | 18012.80 | 161.51 | + +**v3.0** + +| Threads | QPS | 95% latency(ms) | +| :------- | :------- | :-------------| +| 150 | 19047.32 | 10.09 | +| 300 | 24467.64 | 16.71 | +| 600 | 28882.66 | 31.94 | +| 900 | 30298.41 | 57.87 | +| 1200 | 30419.40 | 92.42 | +| 1500 | 30643.55 | 125.52 | + +![update index](/media/sysbench_v4_update_index.png) + +### Read Write 测试 + +**v2.1** + +| Threads | QPS | 95% latency(ms) | +| :------- | :-------- | :-------------- | +| 150 | 85140.60 | 44.98 | +| 300 | 96773.01 | 82.96 | +| 600 | 105139.81 | 153.02 | +| 900 | 110041.83 | 215.44 | +| 1200 | 113242.70 | 277.21 | +| 1500 | 114542.19 | 337.94 | + + + +**v3.0** + +| Threads | QPS | 95% latency(ms) | +| :------- | :-------- | :-------------- | +| 150 | 105692.08 | 35.59 | +| 300 | 129769.69 | 58.92 | +| 600 | 141430.86 | 114.72 | +| 900 | 144371.76 | 170.48 | +| 1200 | 143344.37 | 223.34 | +| 1500 | 144567.91 | 277.21 | + +![read write](/media/sysbench_v4_read_write.png) diff --git a/benchmark/v3.0-performance-benchmarking-with-tpcc.md b/benchmark/v3.0-performance-benchmarking-with-tpcc.md new file mode 100644 index 000000000000..52c055a6081a --- /dev/null +++ b/benchmark/v3.0-performance-benchmarking-with-tpcc.md @@ -0,0 +1,98 @@ +--- +title: TiDB TPC-C 性能对比测试报告 - v3.0 对比 v2.1 +category: benchmark +aliases: ['/docs-cn/stable/benchmark/tpcc/'] +--- + +# TiDB TPC-C 性能对比测试报告 - v3.0 对比 v2.1 + +## 测试目的 + +对比 TiDB 3.0 版本和 2.1 版本的 TPC-C 性能表现。 + +## 测试版本、时间、地点 + +TiDB 版本:v3.0.0 vs. v2.1.13 + +时间:2019 年 6 月 + +地点:北京 + +## 测试环境 + +IDC 机器: + +| 类别 | 名称 | +| :-: | :-: | +| OS | Linux (CentOS 7.3.1611) | +| CPU | 40 vCPUs, Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz | +| RAM | 128GB | +| DISK | 1.5TB SSD \* 2 | + +本文使用开源的 BenchmarkSQL 5.0 作为 TPC-C 测试工具并添加对 MySQL 协议支持, 可以通过以下命令下载测试程序: + +{{< copyable "shell-regular" >}} + +```shell +git clone -b 5.0-mysql-support-opt https://github.com/pingcap/benchmarksql.git +``` + +## 测试方案 + +使用 BenchmarkSQL 向集群导入 **1000 warehouse** 的数据。通过 HAProxy 代理,分别以递增并发数向集群发送请求,单次并发测试时间 10 分钟。 + +### TiDB 版本信息 + +### v3.0.0 + +| 组件 | GitHash | +| :-: | :-: | +| TiDB | 46c38e15eba43346fb3001280c5034385171ee20 | +| TiKV | a467f410d235fa9c5b3c355e3b620f81d3ac0e0c | +| PD | 70aaa5eee830e21068f1ba2d4c9bae59153e5ca3 | + +### v2.1.13 + +| 组件 | GitHash | +| :-: | :-: | +| TiDB | 6b5b1a6802f9b8f5a22d8aab24ac80729331e1bc | +| TiKV | b3cf3c8d642534ea6fa93d475a46da285cc6acbf | +| PD | 886362ebfb26ef0834935afc57bcee8a39c88e54 | + +### TiDB 参数配置 + +```toml +[log] +level = "error" +[performance] +max-procs = 20 +[prepared_plan_cache] +enabled = true +``` + +### TiKV 参数配置 + +默认配置 + +### 集群拓扑 + +| 机器 IP | 部署实例 | +| :-: | :-: | +| 172.16.4.75 | 2\*TiDB 2\*TiKV 1\*pd | +| 172.16.4.76 | 2\*TiDB 2\*TiKV 1\*pd | +| 172.16.4.77 | 2\*TiDB 2\*TiKV 1\*pd | + +## 测试结果 + +| 版本 | threads | tpmC | +| :-: | :-: | :-: | +| v3.0 | 128 | 44068.55 | +| v3.0 | 256 | 47094.06 | +| v3.0 | 512 | 48808.65 | +| v2.1 | 128 | 10641.71 | +| v2.1 | 256 | 10861.62 | +| v2.1 | 512 | 10965.39 | + +![tpcc](/media/tpcc-2.1-3.0.png) + +v3.0 比 v2.1 在 TPC-C 性能上,**提升了 450%**。 diff --git a/benchmark/v4.0-performance-benchmarking-with-tpcc.md b/benchmark/v4.0-performance-benchmarking-with-tpcc.md index 91bd2d9fb05b..0abe46392c25 100644 --- a/benchmark/v4.0-performance-benchmarking-with-tpcc.md +++ b/benchmark/v4.0-performance-benchmarking-with-tpcc.md @@ -2,7 +2,6 @@ title: TiDB TPC-C 性能对比测试报告 - v4.0 对比 v3.0 category: benchmark aliases: ['/docs-cn/stable/benchmark/tpcc-v2/'] -draft: true --- # TiDB TPC-C 性能对比测试报告 - v4.0 对比 v3.0 @@ -29,13 +28,11 @@ draft: true | PD | 3.0、4.0 | | TiDB | 3.0、4.0 | | TiKV | 3.0、4.0 | -| Benchmarksql | non | +| BenchmarkSQL | 无 | ### 配置参数 -#### v3.0 - -#### TiDB 配置 +#### TiDB v3.0 参数配置 {{< copyable "" >}} @@ -46,7 +43,7 @@ prepared-plan-cache.enabled: true tikv-client.max-batch-wait-time: 2000000 ``` -#### TiKV 配置 +#### TiKV v3.0 参数配置 {{< copyable "" >}} @@ -62,9 +59,7 @@ readpool.storage.normal-concurrency: 10 readpool.coprocessor.normal-concurrency: 5 ``` -### v4.0 - -#### TiDB 配置 +#### TiDB v4.0 参数配置 {{< copyable "" >}} @@ -75,7 +70,7 @@ prepared-plan-cache.enabled: true tikv-client.max-batch-wait-time: 2000000 ``` -#### TiKV 配置 +#### TiKV v4.0 参数配置 {{< copyable "" >}} @@ -109,9 +104,9 @@ set global tidb_disable_txn_auto_retry=0; 1. 通过 TiUP 部署 TiDB v4.0 和 v3.0。 -2. 通过 Benchmarksql 导入 TPC-C 5000 Warehouse 数据。 +2. 通过 BenchmarkSQL 导入 TPC-C 5000 Warehouse 数据。 - 1. 编译 Benchmarksql: + 1. 编译 BenchmarkSQL: {{< copyable "bash" >}} @@ -121,19 +116,18 @@ set global tidb_disable_txn_auto_retry=0; 2. 进入 `run` 目录,根据实际情况编辑 `props.mysql` 文件,调整 `conn`、`warehouses`、`loadWorkers`、`terminals`、`runMins` 配置项。 - 3. 运行 `runSQL.sh ./props.mysql sql.mysql/tableCreates.sql`。 + 3. 运行 `runSQL.sh ./props.mysql sql.mysql/tableCreates.sql` 命令。 - 4. 运行 `runSQL.sh ./props.mysql sql.mysql/indexCreates.sql`。 + 4. 运行 `runSQL.sh ./props.mysql sql.mysql/indexCreates.sql` 命令。 - 5. 运行 MySQL Client 并对每个表执行 `analyze table` 命令。 + 5. 运行 MySQL client 并对每个表执行 `analyze table` 语句。 -3. 运行 `runBenchmark.sh ./props.mysql`。 +3. 运行 `runBenchmark.sh ./props.mysql` 命令。 4. 从结果中提取 New Order 的 tpmC 的数据。 ### 测试结果 -#### TPC-C +v4.0 比 v3.0 在 TPC-C 性能上**提升了 50%**。 -TODO - +![TPC-C](/media/tpcc_v4vsv3.png) diff --git a/benchmark/v4.0-performance-benchmarking-with-tpch.md b/benchmark/v4.0-performance-benchmarking-with-tpch.md index 7e555f124360..3c73c4a55e90 100644 --- a/benchmark/v4.0-performance-benchmarking-with-tpch.md +++ b/benchmark/v4.0-performance-benchmarking-with-tpch.md @@ -1,7 +1,6 @@ --- title: TiDB TPC-H 性能对比测试报告 - v4.0 对比 v3.0 category: benchmark -draft: true --- # TiDB TPC-H 性能对比测试报告 - v4.0 对比 v3.0 @@ -41,6 +40,8 @@ draft: true #### v3.0 +v3.0 的 TiDB 和 TiKV 均为默认参数配置。 + ##### 全局变量配置 {{< copyable "sql" >}} @@ -57,6 +58,8 @@ set global tidb_index_lookup_join_concurrency = 16; #### v4.0 +v4.0 的 TiDB 为默认参数配置。 + ##### TiKV 配置 {{< copyable "" >}} @@ -184,5 +187,5 @@ set global tidb_index_lookup_join_concurrency = 16; 以上性能图中蓝色为 v3.0,红色为 v4.0(仅从 TiKV 读),黄色为 v4.0(从 TiKV、TiFlash 智能选取),纵坐标是查询的处理时间。纵坐标越低,表示性能越好。 -- v4.0(仅从 TiKV 读,即 TiDB 仅会从 TiKV 中读取数据。将该结果与 v3.0 的结果对比可得知,TiDB、TiKV 升级至 4.0 版本后,TPC-H 性能得到的提升幅度。 +- v4.0(仅从 TiKV 读取数据),即 TiDB 仅会从 TiKV 中读取数据。将该结果与 v3.0 的结果对比可得知,TiDB、TiKV 升级至 4.0 版本后,TPC-H 性能得到的提升幅度。 - v4.0(从 TiKV、TiFlash 智能选取),即 TiDB 优化器会自动根据代价估算选择是否使用 TiFlash 副本。将该结果与 v3.0 的结果对比可得知,在 v4.0 完整的 HTAP 形态下,TPC-H 性能得到的提升幅度。 diff --git a/media/sysbench_v4vsv3_point_select.png b/media/sysbench_v4vsv3_point_select.png new file mode 100644 index 000000000000..b9a4cbba03bc Binary files /dev/null and b/media/sysbench_v4vsv3_point_select.png differ diff --git a/media/sysbench_v4vsv3_read_write.png b/media/sysbench_v4vsv3_read_write.png new file mode 100644 index 000000000000..9b3d48ec22d2 Binary files /dev/null and b/media/sysbench_v4vsv3_read_write.png differ diff --git a/media/sysbench_v4vsv3_update_index.png b/media/sysbench_v4vsv3_update_index.png new file mode 100644 index 000000000000..d58689b519df Binary files /dev/null and b/media/sysbench_v4vsv3_update_index.png differ diff --git a/media/sysbench_v4vsv3_update_non_index.png b/media/sysbench_v4vsv3_update_non_index.png new file mode 100644 index 000000000000..d158d731a26c Binary files /dev/null and b/media/sysbench_v4vsv3_update_non_index.png differ diff --git a/media/tpcc_v4vsv3.png b/media/tpcc_v4vsv3.png new file mode 100644 index 000000000000..d33e844b5453 Binary files /dev/null and b/media/tpcc_v4vsv3.png differ