Why Memory Consumption Doubles When Upgrading TiDB from Version 4.0 to 6.5.0

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

Original topic: TiDB从4.0版本升级到6.5.0版本为什么内存消耗增加1倍

| username: TiDBer_G64jJ9u8

[Test/Poc Environment] TiDB
[TiDB Version] 6.5.0
[Reproduction Path] Only installation and deployment, same business
[Encountered Problem: Phenomenon and Impact] Running version 6.5.0, with almost no business, memory increased by 1~2G compared to version 4.0
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]
tikv 4.0.1 around 700M
tikv 6.5.0 around 1.6G
tidb-server 4.0.1 around 200M
tidb-server 6.5.0 around 600M

| username: 大飞哥online | Original post link

You can compare the parameter configurations.

| username: 大飞哥online | Original post link

Some parameter configurations will have their default values changed.

| username: Fly-bird | Original post link

Perform some tuning.

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

How should I put it, the higher the version of the app on your phone, the more features it will have, and the more memory it will occupy…

| username: 喵父666 | Original post link

Do some parameter tuning.

| username: 喵父666 | Original post link

Or, if conditions permit, upgrade the host.

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

The person above makes a good point, considering the increasing memory usage of WeChat.

| username: TiDBer_G64jJ9u8 | Original post link

The parameter configuration should basically remain unchanged. Most of the default configurations are used.

| username: 大飞哥online | Original post link

The default will also be increased, you can compare it.

| username: 大飞哥online | Original post link

The example above is pretty good, haha.

| username: TiDBer_G64jJ9u8 | Original post link

Is it only possible to see all default configurations in the documentation? Is there any way to view all default configurations?

| username: 路在何chu | Original post link

This isn’t much higher either. You need to check the consumption when there is business activity.

| username: 大飞哥online | Original post link

You can use “show variable” and “show config” to check. By comparing the old and new settings, you can see the differences. At the same time, you can learn about the parameters by referring to the official documentation.

| username: Kongdom | Original post link

It is estimated that some new features are occupying memory. The main focus should be on whether there is an improvement in performance.

| username: TiDBer_小阿飞 | Original post link

Only responsible for TiDB itself, not for hardware costs :rofl:

| username: 喵父666 | Original post link

There will definitely be an increase in hardware overhead.

| username: 喵父666 | Original post link

After running the business, there shouldn’t be too many queries.

| username: system | Original post link

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