Skip to content

Commit

Permalink
Change the default values of multiple tiflash configs (pingcap#7962)
Browse files Browse the repository at this point in the history
  • Loading branch information
hehechen authored Jan 7, 2022
1 parent 6c7444e commit 255ab5c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
28 changes: 18 additions & 10 deletions tiflash/tiflash-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,27 +120,31 @@ delta_index_cache_size = 0
log = pd buddy log 路径

[flash.proxy]
addr = proxy 监听地址
advertise-addr = 外部访问 addr 的地址,不填则默认是 addr
addr = proxy 监听地址,不填则默认是 127.0.0.1:20170
advertise-addr = 外部访问 addr 的地址,不填则默认是 "addr"
data-dir = proxy 数据存储路径
config = proxy 配置文件路径
log-file = proxy log 路径
log-level = proxy log 级别,默认为 "info"
status-addr = 拉取 proxy metrics|status 信息的监听地址
advertise-status-addr = 外部访问 status-addr 的地址,不填则默认是 status-addr
log-level = proxy log 级别,默认是 "info"
status-addr = 拉取 proxy metrics|status 信息的监听地址,不填则默认是 127.0.0.1:20292
advertise-status-addr = 外部访问 status-addr 的地址,不填则默认是 "status-addr"

[logger]
level = log 级别(支持 trace、debug、information、warning、error)
## log 级别(支持 trace、debug、information、warning、error),默认是 "debug"
level = debug
log = TiFlash log 路径
errorlog = TiFlash error log 路径
size = 单个日志文件的大小
count = 最多保留日志文件个数
## 单个日志文件的大小,默认是 "100M"
size = "100M"
## 最多保留日志文件个数,默认是 10
count = 10

[raft]
pd_addr = pd 服务地址 # 多个地址以逗号隔开

[status]
metrics_port = Prometheus 拉取 metrics 信息的端口
## Prometheus 拉取 metrics 信息的端口,默认是 8234
metrics_port = 8234

[profiles]

Expand Down Expand Up @@ -179,9 +183,13 @@ delta_index_cache_size = 0
[server]
engine-addr = 外部访问 TiFlash coprocessor 服务的地址
[raftstore]
## 处理 Raft 数据落盘的线程池中线程的数量
apply-pool-size = 4
## 处理 Raft 的线程池中线程的数量,即 Raftstore 线程池的大小。
store-pool-size = 4
## 控制处理 snapshot 的线程数,默认为 2。设为 0 则关闭多线程优化
snap-handle-pool-size = 2
## 控制 raft store 持久化 WAL 的最小间隔。通过适当增大延迟以减少 IOPS 占用,默认为 4ms,设为 0ms 则关闭该优化。
## 控制 raft store 持久化 WAL 的最小间隔。通过适当增大延迟以减少 IOPS 占用,默认为 "4ms",设为 "0ms" 则关闭该优化。
store-batch-retry-recv-timeout = "4ms"
```

Expand Down
12 changes: 6 additions & 6 deletions tiflash/use-tiflash.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ SELECT * FROM information_schema.tiflash_replica WHERE TABLE_SCHEMA = '<db_name>
...
```

关于使用 label 进行副本调度划分可用区的更多内容,可以参考[通过拓扑 label 进行副本调度](/schedule-replicas-by-topology-labels.md),[同城多数据中心部署 TiDB](/multi-data-centers-in-one-city-deployment.md) 与[两地三中心部署](/three-data-centers-in-two-cities-deployment.md)。

## 使用 TiDB 读取 TiFlash
Expand Down Expand Up @@ -381,18 +381,18 @@ Session 变量 `tidb_enforce_mpp` 的初始值等于这台 tidb-server 实例的
> **注意:**
>
> `tidb_enforce_mpp=1` 在生效时,TiDB 优化器会忽略代价估算选择 MPP 模式。但如果存在其它不支持 MPP 的因素,例如没有 TiFlash 副本、TiFlash 副本同步未完成、语句中含有 MPP 模式不支持的算子或函数等,那么 TiDB 仍然不会选择 MPP 模式。
>
>
> 如果由于代价估算之外的原因导致 TiDB 优化器无法选择 MPP,在你使用 `EXPLAIN` 语句查看执行计划时,会返回警告说明原因,例如:
>
>
> {{< copyable "sql" >}}
>
>
> ```sql
> set @@session.tidb_enforce_mpp=1;
> create table t(a int);
> explain select count(*) from t;
> explain select count(*) from t;
> show warnings;
> ```
>
>
> ```
> +---------+------+-----------------------------------------------------------------------------+
> | Level | Code | Message |
Expand Down

0 comments on commit 255ab5c

Please sign in to comment.