Disable TiFlash

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

Original topic: 禁用tiflash

| username: 等一分钟

【TiDB Usage Environment】Production Environment
【TiDB Version】6.1.0
set session tidb_isolation_read_engines=‘tidb,tikv’;
This can only disable TiFlash at the session level. Is there a way to disable TiFlash globally?

| username: 等一分钟 | Original post link

After using TiFlash, the script actually consumes more memory in the TiDB server.

| username: WalterWj | Original post link

Just configure this: TiDB 配置文件描述 | PingCAP 文档中心.

| username: QH琉璃 | Original post link

Is it resolved?

| username: tidb菜鸟一只 | Original post link

You need to edit the configuration file parameter isolation-read.engines.

| username: zhang_2023 | Original post link

Use engines

| username: shigp_TIDBER | Original post link

isolation-read

Configuration items related to isolation read.

engines

  • Used to control which types of engines TiDB nodes are allowed to read data from.
  • Default value: [“tikv”, “tiflash”, “tidb”], indicating that the optimizer automatically selects the storage engine.
  • Optional values: combinations of “tikv”, “tiflash”, “tidb”, such as [“tikv”, “tidb”], [“tiflash”, “tidb”].
| username: 等一分钟 | Original post link

Modify the configuration file, and then restart the tidb_server node, right?

| username: terry0219 | Original post link

I tested it, and after restarting TiDB, the changes were not successful. I don’t know why.
image

| username: 等一分钟 | Original post link

Is the parameter name written incorrectly?
Is it supposed to be isolation-read?

| username: 等一分钟 | Original post link

isolation-read.engines
It should be this one, right?

| username: terry0219 | Original post link

I made a mistake, it’s isolation-read.engines. Just reload after changing it.

| username: 等一分钟 | Original post link

Has anyone encountered that after adding TiFlash, the memory usage actually increased?

| username: 数据库真NB | Original post link

It will definitely take up more memory.

| username: 等一分钟 | Original post link

What is the principle behind this? :innocent:

| username: 数据库真NB | Original post link

TiFlash, just by looking at the name, follows the approach of using more memory and increasing data caching to speed up performance.

| username: 舞动梦灵 | Original post link

TiFlash consumes a lot of memory, I have never installed it.

| username: 等一分钟 | Original post link

Previously consulted with the official technical team, and they said that adding all the tables in SQL to TiFlash would save more memory.

| username: TiDBer_JUi6UvZm | Original post link

It should be saved by column pruning.

| username: TiDBer_vJGTQABF | Original post link

Directly use ALTER DATABASE database_name SET TIFLASH REPLICA 0 to remove TiFlash replicas, so queries will no longer go to TiFlash.