Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#12607
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
pepezzzz authored and ti-chi-bot committed Jan 6, 2023
1 parent 2478fee commit 842ff2d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions benchmark/benchmark-tidb-using-sysbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ server_configs:
prepared-plan-cache.enabled: true
```
<<<<<<< HEAD
=======
同时,推荐启用 [`tidb_enable_prepared_plan_cache`](/system-variables.md#tidb_enable_prepared_plan_cache-从-v610-版本开始引入),并保证 `--db-ps-mode` 设置为 `auto`,这样 Sysbench 就可以使用预处理语句。关于 SQL 执行计划缓存的功能及监控,请参考[执行计划缓存](/sql-prepared-plan-cache.md)。

> **注意:**
>
> 不同版本 Sysbench 的 `db-ps-mode` 参数默认值可能会不同,建议在命令中显式指定。

>>>>>>> 8c0943360 (Update benchmark-tidb-using-sysbench.md (#12607))
### TiKV 配置

升高 TiKV 的日志级别同样有利于提高性能表现。
Expand Down Expand Up @@ -155,23 +164,23 @@ ANALYZE TABLE sbtest7;
{{< copyable "shell-regular" >}}

```bash
sysbench --config-file=config oltp_point_select --tables=32 --table-size=10000000 run
sysbench --config-file=config oltp_point_select --tables=32 --table-size=10000000 --db-ps-mode=auto --rand-type=uniform run
```

### Update index 测试命令

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

```bash
sysbench --config-file=config oltp_update_index --tables=32 --table-size=10000000 run
sysbench --config-file=config oltp_update_index --tables=32 --table-size=10000000 --db-ps-mode=auto --rand-type=uniform run
```

### Read-only 测试命令

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

```bash
sysbench --config-file=config oltp_read_only --tables=32 --table-size=10000000 run
sysbench --config-file=config oltp_read_only --tables=32 --table-size=10000000 --db-ps-mode=auto --rand-type=uniform run
```

## 常见问题
Expand Down

0 comments on commit 842ff2d

Please sign in to comment.