Issue of Temporary Disk Usage Not Being Automatically Released for tmp-storage-path

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

Original topic: 关于tmp-storage-path产生的临时磁盘占用不会自动释放问题

| username: TiDBer_菜鸟

In the current version TIDBv4.09, when the memory usage of a single SQL statement exceeds the mem-quota-query limit, some operators temporarily occupying disk storage do not automatically release it. I would like to ask how you experts handle this.

| username: WalterWj | Original post link

How about trying an upgrade? :thinking:

| username: TiDBer_vfJBUcxl | Original post link

The default value of server-memory-quota is 0, which means there is no memory limit.

| username: TiDBer_vfJBUcxl | Original post link

Increase mem-quota-query and set oom-use-tmp-storage to FALSE

mem-quota-query
The maximum memory threshold that a single SQL statement can use, in bytes.
Default value: 1073741824
Requests exceeding this value will be handled by the behavior defined by oom-action.
This value serves as the initial value for the system variable tidb_mem_quota_query 21.
oom-use-tmp-storage
Sets whether to enable temporary disk for certain operators when the memory usage of a single SQL statement exceeds the mem-quota-query limit.
Default value: true

| username: TiDBer_菜鸟 | Original post link

Currently, it is still impossible to assess the impact of the upgrade on the business :joy:

| username: TiDBer_菜鸟 | Original post link

Currently, the memory pressure is already quite high. Will increasing the memory threshold affect other normal queries? The company also does not plan to allocate funds for expansion at the moment.

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

The performance improvement was significant when I upgraded from 4.0.9 to 5.4 last year.

| username: redgame | Original post link

If not upgrading, try deleting manually.

| username: TiDBer_菜鸟 | Original post link

Currently, it can only be deleted manually. :joy:

| username: system | Original post link

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