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

op-guide: add tidb-config-file.md #647

Merged
merged 10 commits into from
Apr 16, 2018
Merged

Conversation

winkyao
Copy link
Contributor

@winkyao winkyao commented Apr 4, 2018

No description provided.

@winkyao
Copy link
Contributor Author

winkyao commented Apr 8, 2018

@shenli @coocood @lilin90 PTAL


+ TiDB 的 CPU 使用数量。
+ 默认: 0
+ 默认为 0 表示使用机器上所有的 CPU,也可以设置成 `max-procs`, 那么 TiDB 会使用 `max-procs` 个 CPU 数量。
Copy link
Member

Choose a reason for hiding this comment

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

s/max-procs/n

Copy link
Contributor Author

Choose a reason for hiding this comment

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

s/max-procs/n/g?


# TiDB 配置文件

TiDB 配置文件比命令行参数支持更多的选项。大家可以在 [config/config.toml.example](https://github.com/pingcap/tidb/blob/master/config/config.toml.example) 找到默认的配置文件。大家重命名为 `config.toml` 即可。
Copy link
Member

Choose a reason for hiding this comment

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

-> 你可以在 config/config.toml.example 找到默认的配置文件,重命名为 config.toml 即可。


TiDB 配置文件比命令行参数支持更多的选项。大家可以在 [config/config.toml.example](https://github.com/pingcap/tidb/blob/master/config/config.toml.example) 找到默认的配置文件。大家重命名为 `config.toml` 即可。

这里只阐述在命令行参数中没有的参数,命令行参数大家可以看[这里](configuration.md)
Copy link
Member

Choose a reason for hiding this comment

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

-> 本文档只阐述未包含在命令行参数中的参数,命令行参数参见这里


### `split-table`

+ 为每个 table 建立单独的 region。
Copy link
Member

Choose a reason for hiding this comment

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

region - Region


+ 指定 TiDB 发生 out-of-memory 错误时的操作。
+ 默认: "log"
+ 现在合法的选项是 ["log", "cancel"],如果为 "log", 仅仅是打印日志,不作实质处理。如果为 "cancel",我们会取消执行这个操作,并且输出日志。
Copy link
Member

Choose a reason for hiding this comment

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

"," before 仅仅 -> ","


+ 保留的日志的最大数量。
+ 默认: 0
+ 默认全部保存,如果设置为7,会最多保留 7 个老的日志文件。
Copy link
Member

Choose a reason for hiding this comment

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

Leave a whitespace before the first 7.


### `tcp-keep-alive`

+ TiDB 在 tcp 层开启 keepalive
Copy link
Member

Choose a reason for hiding this comment

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

tcp -> TCP


### `stats-lease`

+ TiDB 统计信息做 Analyze 和 重载统计信息的时间间隔。
Copy link
Member

Choose a reason for hiding this comment

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

Delete the extra whitespace after "和".


### `run-auto-analyze`

TiDB 是否做自动的 Analyze。
Copy link
Member

Choose a reason for hiding this comment

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

Add a bullet list sign "+" for this line.


+ 执行事务提交时,最大的超时时间。
+ 默认: 41s
+ 这个值必须是大于两倍 raft 选举的超时时间。
Copy link
Member

Choose a reason for hiding this comment

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

raft -> Raft


### `grpc-connection-count`

+ 跟每个 tikv 之间建立的最大连接数。
Copy link
Member

Choose a reason for hiding this comment

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

tikv -> TiKV

@@ -0,0 +1,224 @@
---
Copy link
Member

Choose a reason for hiding this comment

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

Please add it to README.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@winkyao
Copy link
Contributor Author

winkyao commented Apr 9, 2018

@lilin90 @coocood PTAL

@coocood
Copy link
Member

coocood commented Apr 9, 2018

LGTM

@winkyao winkyao added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 9, 2018
+ 默认: 256
+ 这个数量越大,锁的粒度越小。

### prepared-plan-cache
Copy link
Member

Choose a reason for hiding this comment

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

Is this title the same level as ## plan-cache?

lilin90 added a commit to lilin90/docs that referenced this pull request Apr 9, 2018
+ 默认: 2048
+ 当语句的长度大于 `query-log-max-len`,将会被截断输出。

### log.file
Copy link
Contributor

Choose a reason for hiding this comment

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

useless?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

log.file is a new level.

- 每隔 `5 * stats-lease` 时间,TiDB 会将 DML 产生的总行数以及修改的行数变化持久化下来
- 每隔 `stats-lease` 时间,TiDB 会检查是否有表或者索引需要自动 analyze
- 每隔 `stats-lease` 时间,TiDB 会检查是否有列的统计信息需要被加载到内存中

Copy link
Contributor

Choose a reason for hiding this comment

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

useless line

### `stats-lease`

+ TiDB 重载统计信息, 更新表行数, 检查是否需要自动 analyze 以及加载列的统计信息的时间间隔
+ 默认: 3s
Copy link
Contributor

Choose a reason for hiding this comment

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

Style of : is not consistent with the others.

### `feedback-probability`

+ TiDB 对查询收集统计信息反馈的概率
+ 默认: 0
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@shenli
Copy link
Member

shenli commented Apr 10, 2018

@winkyao Please address the comments.

@winkyao
Copy link
Contributor Author

winkyao commented Apr 12, 2018

@XuHuaiyu PTAL

+ 默认: 10
+ 如果 TiDB 超过 `retry-limit` 次重试还是没有成功,将会返回错误。

### `join-concurrency`
Copy link
Contributor

Choose a reason for hiding this comment

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

This is removed in pingcap/tidb#6244

Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

LGTM

@XuHuaiyu XuHuaiyu merged commit 7f33240 into master Apr 16, 2018
@XuHuaiyu XuHuaiyu deleted the winkyao/add_tidb_config_file branch April 16, 2018 05:56
CaitinChen pushed a commit to pingcap/docs that referenced this pull request Apr 19, 2018
* op-guide: add tidb-config-file.md

Via: pingcap/docs-cn#647

* Address comments

* Delete `join-concurrency`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants