-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
tidb oom when insert 4m big value #36503
Comments
/type bug |
reproducible script: heap profile: |
After analyzing the heap profile, I find the memory usage is expected. Maybe you can try the non-prepared SQL, it might reduce the memory by more than a half. |
Or a tiny optimization could be, after |
OK, I'll take a look at this in Sprint10. It should be an enhancement instead of a bug. |
After #33651, the reproduce script fail to run. |
I test this again with tiup nightly... I have some new findings. And after I run "set @@global.tidb_enable_gogc_tuner = 0", the memory usage decrease a lot! And the 'reserved-by-go' nearly gone. So this OOM issue is by the gctunner feature, and we can workaround it, close this issue. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
tidb:8core 32GB
insert 4m big value with 256 Concurrency
code:
https://github.com/pingcap/endless/blob/master/pkg/workload/append.go
2. What did you expect to see? (Required)
tidb shoud not oom
3. What did you see instead (Required)
After running for a while, one tidb oom

w := workload.AppendWorkload{
DB: db,
Concurrency: 256,
Tables: 256,
PadLength: 4000000,
}
Try(w.Prepare())
w.Run(gctx)
4. What is your TiDB version? (Required)
./tidb-server -V
Release Version: v6.2.0-alpha
Edition: Community
Git Commit Hash: 28a8ffc
Git Branch: heads/refs/tags/v6.2.0-alpha
UTC Build Time: 2022-07-23 11:07:09
GoVersion: go1.18.2
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore
The text was updated successfully, but these errors were encountered: