Encountered Two Issues When Migrating to v6.5.5, Has Anyone Else Experienced This?

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

Original topic: 迁移到v6.5.5上遇到两个问题,不知同学们可遇到过

| username: 扬仔_tidb

[TiDB Usage Environment] Production Environment
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issues: Issue Phenomenon and Impact]
We just migrated from v5.3.0 to v6.5.5 in production and found that the speed is not as good as v5.3.0.
First issue: The same statement mostly performs a full table scan on TiFlash in v6, while in v5 it uses the TiKV index, which is more efficient than v6.
Second issue: My TiFlash configuration is only 16C/32G, is this too low? The official recommended configuration is 48C/128G, which is too high and costly. TiFlash often reports insufficient memory in the core. Are there any parameters that can be adjusted to control TiFlash’s memory access?

| username: 芮芮是产品 | Original post link

You can force it to only use TiKV.

| username: 扬仔_tidb | Original post link

Currently, this is how it’s done. What I’m curious about is why the same query often uses TiFlash in version 6, while in version 5 it would use TiKV.

| username: 我是人间不清醒 | Original post link

Do not accelerate the entire database.

| username: Billmay表妹 | Original post link

What is your current resource configuration?

In a situation where the data volume only increases and does not decrease, having too many machine configurations can also affect performance.

| username: 扬仔_tidb | Original post link

Currently, we are using Tencent S6 machines with 16 cores and 32GB of RAM. There are 5 TiFlash nodes and 4 TiKV nodes.

| username: zhanggame1 | Original post link

Let’s see if TiFlash can add more memory.

| username: 普罗米修斯 | Original post link

TiFlash has relatively high hardware resource requirements. If the configuration is not good, manually route to TiKV.

| username: dba远航 | Original post link

When upgrading the version, the same hardware configuration needs to be kept up. Otherwise, if the server determines that there are insufficient resources, it will affect the execution plan’s judgment, causing the issue you mentioned above.

| username: 随缘天空 | Original post link

Try not to use hardware that is below the official minimum requirements. TiDB is somewhat hardware-intensive. Otherwise, it will be difficult to troubleshoot various issues that may arise later on, and you won’t know whether it’s a machine problem, a configuration issue, or something else.

| username: Kongdom | Original post link

  1. It is recommended to force the use of TiKV. You can check the health of the indexes and tables. Generally, if there are indexes and the tables are healthy, TiKV will be used.
  2. If TiFlash is used less frequently, it is recommended to consolidate servers, reduce the number of servers, and improve server configurations.
| username: 托马斯滑板鞋 | Original post link

:upside_down_face: TiFlash requires a high CPU configuration. It is estimated that the situation will improve after the pipeline in version 7.5 becomes generally available.

| username: TiDBer_小阿飞 | Original post link

Question 1: Is it possible that the optimizer of the version has been modified?
Question 2:
The memory cache size limit for data block metadata, usually does not need to be modified
mark_cache_size = 1073741824
The memory cache size limit for data block min-max index, usually does not need to be modified
minmax_index_cache_size = 1073741824
DeltaIndex memory cache size limit, default is 0, which means no limit
delta_index_cache_size = 0