After reading the tutorial on the best practices for a three-node mixed deployment, I noticed that the configuration is for 16C32GB. My environment is 64C256GB. How should I set the resources for each component to achieve optimal performance? I saw the following configuration on the official website:
Actually, the configuration is such that PD does not need much resources, 4 CPUs are enough, and memory within 8GB can be used with a virtual machine. For TiDB, you can allocate 4 cores and 8GB of memory. The underlying TiKV will occupy these 3 physical machines. The default parameters do not need to be changed, you just need 3 TiDB, 3 PD, and 3 TiKV, evenly distributed across your 3 physical machines.
Check the number of disks and assess your pressure. PD/TiDB/TiKV can all be set to run on a specific node by setting numa_node, using only the memory on that node. You can first try running PD/TiDB on node 0, one per host, and use a load balancer like HAProxy for multiple TiDB instances. Configure 2 TiKV instances per host using node 1, and initially set the block cache memory of TiKV to 32GB. Make sure to set at least one level of label for TiKV to ensure that TiKV instances on the same host use the same label.
Similar to setting up a MySQL cluster, it is recommended to set various parameters to their median values. If you want to maximize resource usage, it is advisable to test and adjust through stress evaluation.
For multi-component mixed deployment, you need to check the NUMA information of your physical machine using numactl --show. Then set NUMA binding to avoid resource contention.