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

dev, .circleci/config.yml, .markdownlint.yaml: Add markdown style check for dev folder #1494

Merged
merged 11 commits into from
Jul 9, 2019
35 changes: 35 additions & 0 deletions circle.yml → .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
version: 2

jobs:
lint:
docker:
- image: circleci/ruby:2.4.1-node
working_directory: ~/pingcap/docs-cn
steps:
- checkout

- run:
name: "Install markdownlint"
command: |
sudo npm install -g markdownlint-cli
markdownlint --version

- run:
name: "Lint dev"
command: markdownlint dev/

- run:
name: "Lint README"
command: markdownlint README.md

build:
docker:
- image: andelf/doc-build:0.1.9
Expand Down Expand Up @@ -46,3 +67,17 @@ jobs:

- store_artifacts:
path: /tmp/artifacts

workflows:
version: 2
lint:
jobs:
- lint
build:
jobs:
- build:
filters:
branches:
only:
- master
- website-preview
44 changes: 44 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
comment: 'Rules for PingCAP docs-cn'

# disable all by default
default: false

heading-increment: true
heading-style:
style: atx
no-trailing-spaces: true
no-hard-tabs: true
ul-indent:
indent: 4
no-multiple-blanks: true
# commands-show-output: true
no-missing-space-atx: true
no-multiple-space-atx: true
blanks-around-headings: true
heading-start-left: true
no-duplicate-heading:
siblings_only: true
single-title:
front_matter_title: ''
no-trailing-punctuation:
punctuation: '.,;:!。,;:!'
no-multiple-space-blockquote: true
ol-prefix:
style: ordered
list-marker-space: true
blanks-around-fences: true
blanks-around-lists: true
no-bare-urls: true
no-space-in-emphasis: true
no-space-in-code: true
no-space-in-links: true
no-empty-links: true
# proper-names:
# names: ['TiDB', 'TiKV', 'PingCAP']
# code_blocks: false
no-alt-text: true
code-block-style:
style: fenced
single-trailing-newline: true
first-line-heading: true

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TiDB 是 PingCAP 公司设计的开源分布式 HTAP (Hybrid Transactional and A
TiDB 具备如下特性:

- 高度兼容 MySQL

[大多数情况下](/v3.0/reference/mysql-compatibility.md),无需修改代码即可从 MySQL 轻松迁移至 TiDB,分库分表后的 MySQL 集群亦可通过 TiDB 工具进行实时迁移。

- 水平弹性扩展
Expand Down Expand Up @@ -40,4 +40,4 @@ TiDB 对业务没有任何侵入性,能优雅的替换传统的数据库中间

- [说存储](https://pingcap.com/blog-cn/tidb-internal-1/)
- [说计算](https://pingcap.com/blog-cn/tidb-internal-2/)
- [谈调度](https://pingcap.com/blog-cn/tidb-internal-3/)
- [谈调度](https://pingcap.com/blog-cn/tidb-internal-3/)
4 changes: 3 additions & 1 deletion dev/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 目录

<!-- markdownlint-disable MD007 -->
+ [关于 TiDB](overview.md)
+ 主要概念
- [整体架构](architecture.md)
Expand Down Expand Up @@ -332,7 +333,8 @@
+ [贡献](contribute.md)
- [贡献代码](contribute.md#成为-tidb-的贡献者)
- [改进文档](contribute.md#改进文档)
- [TiDB 路线图](roadmap.md)

+ [TiDB 路线图](roadmap.md)
+ [版本发布历史](releases/rn.md)
+ v3.0
- [3.0 GA](releases/3.0-ga.md)
Expand Down
2 changes: 1 addition & 1 deletion dev/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TiDB 是 PingCAP 公司设计的开源分布式 HTAP (Hybrid Transactional and A
TiDB 具备如下特性:

- 高度兼容 MySQL

[大多数情况下](/reference/mysql-compatibility.md),无需修改代码即可从 MySQL 轻松迁移至 TiDB,分库分表后的 MySQL 集群亦可通过 TiDB 工具进行实时迁移。

- 水平弹性扩展
Expand Down
4 changes: 2 additions & 2 deletions dev/benchmark/how-to-run-sysbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ enabled = true

由于 TiKV 是以集群形式部署的,在 Raft 算法的作用下,能保证大多数节点已经写入数据。因此,除了对数据安全极端敏感的场景之外,raftstore 中的 `sync-log` 选项可以关闭。

TiKV 集群存在两个 Column Family(Default CF 和 Write CF),主要用于存储不同类型的数据。对于 Sysbench 测试,导入数据的 Column Family 在 TiDB 集群中的比例是固定的。这个比例是:
TiKV 集群存在两个 Column Family(Default CF 和 Write CF),主要用于存储不同类型的数据。对于 Sysbench 测试,导入数据的 Column Family 在 TiDB 集群中的比例是固定的。这个比例是:

Default CF : Write CF = 4 : 1

Expand Down Expand Up @@ -215,7 +215,7 @@ sysbench --config-file=config oltp_read_only --tables=32 --table-size=10000000 r

| 类型 | Thread | TPS | QPS | avg.latency(ms) | .95.latency(ms) | max.latency(ms) |
|:---- |:---- |:---- |:---- |:----------------|:----------------- |:---- |
| oltp_update_index | 3\*8 | 9668.98 | 9668.98 | 2.51 | 3.19 | 103.88|
| oltp_update_index | 3\*8 | 9668.98 | 9668.98 | 2.51 | 3.19 | 103.88|
| oltp_update_index | 3\*16 | 12834.99 | 12834.99 | 3.79 | 5.47 | 176.90 |
| oltp_update_index | 3\*32 | 15955.77 | 15955.77 | 6.07 | 9.39 | 4787.14 |
| oltp_update_index | 3\*64 | 18697.17 | 18697.17 | 10.34 | 17.63 | 4539.04 |
Expand Down
14 changes: 7 additions & 7 deletions dev/benchmark/sysbench-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ IDC 机器
| OS | Linux (CentOS 7.3.1611) |
| CPU | 40 vCPUs, Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz |
| RAM | 128GB |
| DISK | Optane 500GB SSD * 1 |
| DISK | Optane 500GB SSD * 1 |

## 测试方案

Expand Down Expand Up @@ -55,15 +55,15 @@ IDC 机器
```
sync-log = false
grpc-concurrency = 8
grpc-raft-conn-num = 24
grpc-raft-conn-num = 24
```

* v2.0.0-rc6

```
```
sync-log = false
grpc-concurrency = 8
grpc-raft-conn-num = 24
grpc-raft-conn-num = 24
use-delete-range: false
```

Expand All @@ -83,7 +83,7 @@ IDC 机器

## 测试结果

### 标准 Select 测试
### 标准 Select 测试

| 版本 | table count | table size | sysbench threads |qps | latency(avg / .95) |
| :---: | :---: | :---: | :---: | :---: | :---: |
Expand All @@ -98,7 +98,7 @@ IDC 机器

GA2.0 比 GA1.0 在 Select 查询性能上,最高提升了 10% 左右。

### 标准 OLTP 测试
### 标准 OLTP 测试

| 版本 | table count | table size | sysbench threads | tps | qps | latency(avg / .95) |
| :---: | :---: | :---: | :---: | :---: | :---: | :---:|
Expand All @@ -113,7 +113,7 @@ GA2.0 比 GA1.0 在 Select 查询性能上,最高提升了 10% 左右。

GA2.0 比 GA1.0 在 OLTP 性能上,性能基本一致。

### 标准 Insert 测试
### 标准 Insert 测试

| 版本 | table count | table size | sysbench threads |qps | latency(avg / .95) |
| :---: | :---: | :---: | :---: | :---: | :---: |
Expand Down
2 changes: 1 addition & 1 deletion dev/benchmark/sysbench-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ v2.1 与 v2.0 在 Update Non-Index 写入性能上基本一致。

![update index](/media/sysbench_v3_update_index.png)

v2.1 与 v2.0 在 Update Index 写入性能上基本一致。
v2.1 与 v2.0 在 Update Index 写入性能上基本一致。
5 changes: 5 additions & 0 deletions dev/benchmark/sysbench-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Sysbench 版本:1.0.17
使用 Sysbench 向集群导入 **16 张表,每张数据 1000 万**。起 3 个 sysbench 分别向 3 个 TiDB 发压,请求并发数逐步增加,单次测试时间 5 分钟。

准备数据命令:

```sh
sysbench oltp_common \
--threads=16 \
Expand All @@ -47,6 +48,7 @@ sysbench oltp_common \
```

执行测试命令:

```sh
sysbench $testname \
--threads=$threads \
Expand Down Expand Up @@ -88,6 +90,7 @@ sysbench $testname \
[prepared-plan-cache]
enabled = true
```

并设置全局变量:

```sql
Expand All @@ -106,6 +109,7 @@ max-batch-wait-time = 2000000
### TiKV 参数配置

2.1 和 3.0 使用如下配置:

```toml
log-level = "error"
[readpool.storage]
Expand All @@ -121,6 +125,7 @@ block-cache-size = "1GB"
```

3.0 还做了如下配置:

```toml
[raftstore]
apply-pool-size = 3
Expand Down
29 changes: 14 additions & 15 deletions dev/benchmark/sysbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ draft: true

## 测试版本、时间、地点

TiDB 版本:v1.0.0
TiDB 版本:v1.0.0
时间:2017 年 10 月 20 日
地点:北京

Expand All @@ -29,19 +29,19 @@ IDC 机器
| OS | linux (CentOS 7.3.1611) |
| CPU | 40 vCPUs, Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz |
| RAM | 128GB |
| DISK | 1.5T SSD * 2 + Optane SSD * 1 |
| DISK | 1.5T SSD \* 2 + Optane SSD \* 1 |
Copy link
Contributor

Choose a reason for hiding this comment

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

Is "" the escape character? Why we need it here?

Copy link
Contributor Author

@aylei aylei Jul 8, 2019

Choose a reason for hiding this comment

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

* sign is used to italic or bold the text in markdown, so it is recommended to use \ to escape the * sign

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see MD037


Sysbench 版本: 1.0.6

测试脚本: https://github.com/pingcap/tidb-bench/tree/cwen/not_prepared_statement/sysbench
测试脚本: [https://github.com/pingcap/tidb-bench/tree/cwen/not_prepared_statement/sysbench](https://github.com/pingcap/tidb-bench/tree/cwen/not_prepared_statement/sysbench)

## 测试方案

### 场景一:sysbench 标准性能测试

测试表结构

```
```
CREATE TABLE `sbtest` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
Expand All @@ -54,7 +54,7 @@ CREATE TABLE `sbtest` (

部署方案以及配置参数

```
```
// TiDB 部署方案
172.16.20.4 4*tikv 1*tidb 1*sysbench
172.16.20.6 4*tikv 1*tidb 1*sysbench
Expand Down Expand Up @@ -109,9 +109,9 @@ max_connections = 2000
| Mysql | 32 | 500 万 | 256 | 1902 | 38045 | 134.56 ms / 363.18 ms |
| Mysql | 32 | 1000 万 | 256 | 1770 | 35416 | 144.55 ms / 383.33 ms |

![](http://7xnp02.com1.z0.glb.clouddn.com/threads_oltp.png?imageView2/2/w/700/q/75|imageslim)
![alt](http://7xnp02.com1.z0.glb.clouddn.com/threads_oltp.png?imageView2/2/w/700/q/75|imageslim)

![](http://7xnp02.com1.z0.glb.clouddn.com/table_size_oltp.png?imageView2/2/w/700/q/75|imageslim)
![alt](http://7xnp02.com1.z0.glb.clouddn.com/table_size_oltp.png?imageView2/2/w/700/q/75|imageslim)

* 标准 select 测试

Expand All @@ -128,9 +128,9 @@ max_connections = 2000
| Mysql | 32 | 500 万 | 256 | 386866 | 0.66 ms / 1.64 ms |
| Mysql | 32 | 1000 万 | 256 | 388273 | 0.66 ms / 1.64 ms |

![](http://7xnp02.com1.z0.glb.clouddn.com/threads_select.png?imageView2/2/w/700/q/75|imageslim)
![alt](http://7xnp02.com1.z0.glb.clouddn.com/threads_select.png?imageView2/2/w/700/q/75|imageslim)

![](http://7xnp02.com1.z0.glb.clouddn.com/table_size_select.png?imageView2/2/w/700/q/75|imageslim)
![alt](http://7xnp02.com1.z0.glb.clouddn.com/table_size_select.png?imageView2/2/w/700/q/75|imageslim)

* 标准 insert 测试

Expand All @@ -146,11 +146,10 @@ max_connections = 2000
| Mysql | 32 | 100 万 | 256 | 14508 | 17.64 ms / 44.98 ms |
| Mysql | 32 | 500 万 | 256 | 10593 | 24.16 ms / 82.96 ms |
| Mysql | 32 | 1000 万 | 256 | 9813 | 26.08 ms / 94.10 ms |

![](http://7xnp02.com1.z0.glb.clouddn.com/threads_insert.png?imageView2/2/w/700/q/75|imageslim)

![](http://7xnp02.com1.z0.glb.clouddn.com/table_size_insert.png?imageView2/2/w/700/q/75|imageslim)
![alt](http://7xnp02.com1.z0.glb.clouddn.com/threads_insert.png?imageView2/2/w/700/q/75|imageslim)

![alt](http://7xnp02.com1.z0.glb.clouddn.com/table_size_insert.png?imageView2/2/w/700/q/75|imageslim)

### 场景二:TiDB 水平扩展能力测试

Expand Down Expand Up @@ -187,7 +186,7 @@ block-cache-size = "2GB"
| 4 物理节点 TiDB | 32 | 100 万 | 256 * 4 | 8984 | 179692 | 114.96 ms / 176.73 ms |
| 6 物理节点 TiDB | 32 | 500 万 | 256 * 6 | 12953 | 259072 | 117.80 ms / 200.47 ms |

![](http://7xnp02.com1.z0.glb.clouddn.com/scale_tidb_oltp.png?imageView2/2/w/700/q/75|imageslim)
![alt](http://7xnp02.com1.z0.glb.clouddn.com/scale_tidb_oltp.png?imageView2/2/w/700/q/75|imageslim)

* 标准 select 测试

Expand All @@ -198,7 +197,7 @@ block-cache-size = "2GB"
| 4 物理节点 TiDB | 32 | 100 万 | 256 * 4 | 289933 | 3.53 ms / 8.74 ms |
| 6 物理节点 TiDB | 32 | 500 万 | 256 * 6 | 435313 | 3.55 ms / 9.17 ms |

![](http://7xnp02.com1.z0.glb.clouddn.com/scale_tidb_select.png?imageView2/2/w/700/q/75|imageslim)
![alt](http://7xnp02.com1.z0.glb.clouddn.com/scale_tidb_select.png?imageView2/2/w/700/q/75|imageslim)

* 标准 insert 测试

Expand All @@ -208,4 +207,4 @@ block-cache-size = "2GB"
| 5 物理节点 TiKV | 32 | 100 万 | 256 * 3 | 60689 | 37.96 ms / 29.9 ms |
| 7 物理节点 TiKV | 32 | 100 万 | 256 * 3 | 80087 | 9.62 ms / 21.37 ms |

![](http://7xnp02.com1.z0.glb.clouddn.com/scale_tikv_insert.png?imageView2/2/w/700/q/75|imageslim)
![alt](http://7xnp02.com1.z0.glb.clouddn.com/scale_tikv_insert.png?imageView2/2/w/700/q/75|imageslim)
Loading