Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idle TiDB keeps OOM because of AnalyzeColumnExec subMergeWorker #27297

Closed
sticnarf opened this issue Aug 17, 2021 · 5 comments
Closed

Idle TiDB keeps OOM because of AnalyzeColumnExec subMergeWorker #27297

sticnarf opened this issue Aug 17, 2021 · 5 comments
Assignees
Labels
severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@sticnarf
Copy link
Contributor

sticnarf commented Aug 17, 2021

Bug Report

1. Minimal reproduce step (Required)

I have a 1 TiDB + 3 TiKV cluster containing only one table. The workload is insert only, each row is about 64 KiB.

Now the table has about 10 million rows. But after I stopped writing, TiDB keeps OOM. The TiDB node has 32 GB memory.

I did a heap profiling and found most memory is used by subMergeWorker.

图片

Heap:
heap.gz

The estimated inuse memory increases like stairs:

图片

2. What did you expect to see? (Required)

When idling, TiDB memory usage should be stable and low.

3. What did you see instead (Required)

The memory usage of TiDB keeps growing and OOM.

4. What is your TiDB version? (Required)

Release Version: v5.2.0-alpha-603-g13f2a661d
Edition: Community
Git Commit Hash: 13f2a661d9be5f9e8a0d8cd592a5f3f5973dee52
Git Branch: master
UTC Build Time: 2021-08-12 11:14:56
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
@sticnarf sticnarf added the type/bug The issue is confirmed as a bug. label Aug 17, 2021
@sticnarf
Copy link
Contributor Author

Could you take a look at the problem? @winoros

@winoros
Copy link
Member

winoros commented Aug 17, 2021

/assign

@winoros
Copy link
Member

winoros commented Aug 17, 2021

this is a duplicate issue with #27187
known with the limitation of current sampling algo.
you can set @@tidb_analyze_version=1
@sticnarf

@sticnarf
Copy link
Contributor Author

@winoros Thanks. I failed to find the duplicated issue because that one does not include the subMergeWorker keywords.

@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

4 participants