TiDB Deployment

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

Original topic: tidb部署

| username: cy6301567

If the budget is limited, can the PD and KV nodes be placed on the same server?

| username: xfworld | Original post link

You can deploy in a hybrid manner, but you need to refer to the configurations and requirements provided in the official documentation. The maintenance will also be more demanding.

| username: zhanggame1 | Original post link

Pd is generally used together with TiDB.

| username: Jellybean | Original post link

TiDB is a component that consumes a lot of memory and CPU.
TiPD is a component that consumes a lot of CPU and IO.
TiKV is a component that consumes a lot of CPU, memory, and IO.

Therefore, it is recommended to deploy different components on different server nodes to achieve the best performance, which is the optimal state.

  • In a testing environment, you can deploy however you like, as long as it runs and meets your expected goals.
  • In a production environment, if there are budget constraints and server nodes are limited, a low-cost mixed deployment is also a compromise. Even so, it is not highly recommended to deploy TiPD and TiKV on the same server. The best practice is to deploy TiKV separately, and mix TiDB and TiPD, balancing performance and cost considerations.
| username: Kongdom | Original post link

It is highly not recommended to put them together. Unless absolutely necessary, the performance will be reduced.

| username: zhanggame1 | Original post link

The built-in database of PD uses Raft for synchronization, and deploying it together with TiKV will compete for I/O resources.

| username: ffeenn | Original post link

What is the current budget for several servers, and what are their configurations?

| username: 有猫万事足 | Original post link

PD can be placed together with TiDB, but it is highly discouraged to place PD and TiKV together.

| username: cy6301567 | Original post link

Understood. Please provide the Chinese text you would like translated into English.

| username: cy6301567 | Original post link

Currently, there are only four machines: one TiDB, three KV. PD and KV share three machines, with a configuration of 32 cores and 64GB RAM.

| username: cy6301567 | Original post link

Okay, thank you.

| username: cy6301567 | Original post link

Yes, each machine with 65GB of memory is currently using about 75% of its memory.

| username: 有猫万事足 | Original post link

Memory is actually okay; the key is the CPU.
TiKV can easily max out the CPU, so you need to follow the hybrid deployment documentation and calculate the parameters for each component.
Also, NUMA needs to be configured.

You need to adjust all the parameters mentioned in this document.

| username: cy6301567 | Original post link

Okay, I will take a good look at it.

| username: system | Original post link

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