How TiDB Achieves a Single Table Write Rate of Over 20,000 Rows per Second

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb如何实现单表写入速率2w/s以上

| username: TiDBer_yBunUeUc

For the selection of the TiDB database, we conducted a stress test in the test environment, and here is the data:


To achieve a single table write rate of over 20,000/s, what steps do we need to take next?

| username: 像风一样的男子 | Original post link

Replace the mechanical drive with an SSD, and the speed will immediately improve.

| username: 小龙虾爱大龙虾 | Original post link

Single node means what

| username: TiDBer_yBunUeUc | Original post link

It’s running on a single machine, haha.

| username: TiDBer_yBunUeUc | Original post link

To achieve a single table write rate of over 20,000 writes per second, how should I test it?

| username: 像风一样的男子 | Original post link

What is the purpose of your testing? A single-node MySQL outperforms TiDB in terms of performance. TiDB’s advantage lies in its distributed scalability.

| username: TiDBer_yBunUeUc | Original post link

Indeed, single-node testing is unreasonable. I’ll post a new thread and test it with a cluster.

| username: TIDB-Learner | Original post link

MySQL is a traditional relational database. TiDB is a distributed database. It doesn’t mean that TiDB is more powerful than MySQL in every scenario. In the context of localization, many state-owned enterprises or larger companies require system vendors to switch to TiDB or other domestic databases. Distributed systems do not require each host to have high configurations. Increasing the number of hosts can achieve or even surpass the overall performance of a monolithic system. In some big data and high concurrency scenarios, TiDB completely outperforms MySQL.

| username: oceanzhang | Original post link

Reading performance is very poor, which is related to the initial design.

| username: zhanggame1 | Original post link

Use sysbench for pressure testing.

| username: oceanzhang | Original post link

Can you test a mixed read-write scenario?

| username: porpoiselxj | Original post link

Opening multiple threads, single-thread speed does not improve.

| username: zhanggame1 | Original post link

Multi-threading is also meaningless for mechanical drives.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.