-
Notifications
You must be signed in to change notification settings - Fork 415
Closed
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/computeseverity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Enhancement
On the dev machine (72C), When running the following query, memory usage is 12G+, but when change max_threads
to 8, the memory usage is smaller.

Most memory is occupied by FineGrainedShuffleWriter
, we need to optimize the memory usage

Env is as follow:
query: explain analyze select * from (select *, row_number() over (partition by ps_partkey order by ps_partkey) as rn from partsupp) d where rn = 1;
workload: tpch-50G
cluster: 1 tidb, 3 tikv, 3 tiflash, 1 pd
version:
mysql> select tidb_version();
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v9.0.0-beta.2.pre-275-g3409448
Edition: Community
Git Commit Hash: 3409448d3b9c405df37755f047c28bb0195ee891
Git Branch: HEAD
UTC Build Time: 2025-08-06 05:59:46
GoVersion: go1.23.11
Race Enabled: false
Check Table Before Drop: false
Store: tikv
Kernel Type: Classic |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Metadata
Metadata
Assignees
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/computeseverity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.