Skip to content

Commit

Permalink
lightning: add back content about tpcc (#17221)
Browse files Browse the repository at this point in the history
  • Loading branch information
hfxsd authored Apr 16, 2024
1 parent 07ab947 commit 84881cc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tidb-lightning/tidb-lightning-physical-import-mode-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,25 @@ store-write-bwlimit = "128MiB"
distsql-scan-concurrency = 3
```

You can measure the impact of data import on TPCC results by simulating the online application using TPCC and importing data into a TiDB cluster using TiDB Lightning. The test result is as follows:

| Concurrency | TPM | P99 | P90 | AVG |
| ----- | --- | --- | --- | --- |
| 1 | 20%~30% | 60%~80% | 30%~50% | 30%~40% |
| 8 | 15%~25% | 70%~80% | 35%~45% | 20%~35% |
| 16 | 20%~25% | 55%~85% | 35%~40% | 20%~30% |
| 64 | No significant impact |
| 256 | No significant impact |

The percentage in the preceding table indicates the impact of data import on TPCC results.

* For the TPM column, the number indicates the percentage of TPM decrease.
* For the P99, P90, and AVG columns, the number indicates the percentage of latency increase.

The test results show that the smaller the concurrency, the larger the impact of data import on TPCC results. When the concurrency is 64 or more, the impact of data import on TPCC results is negligible.

Therefore, if your TiDB cluster has a latency-sensitive application and a low concurrency, it is strongly recommended **not** to use TiDB Lightning to import data into the cluster. This will cause a significant impact on the online application.

## Performance tuning

**The most direct and effective ways to improve import performance of the physical import mode are as follows:**
Expand Down

0 comments on commit 84881cc

Please sign in to comment.