tidb-server memory increase rapidly
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Performance Questions
- What version of TiDB are you using?
5.3.0
- What's the observed and your expected performance respectively?
memory usage steadily
- Have you compared TiDB with other databases? If yes, what's their difference?
no
- For a specific slow SQL query, please provide the following information:
- Whether you analyzed the tables involved in the query and how long it is after you ran the last `ANALYZE`.
- Whether this SQL query always or occasionally runs slowly.
- The `EXPLAIN ANALYZE` result of this query if your TiDB version is higher than 2.1, or you can just provide the `EXPLAIN` result.
- The plain text of the SQL query and table schema so we can test it locally. It would be better if you can provide the dumped statistics information.
- The `EXPLAIN` result of the compared database. For MySQL, `EXPLAIN format=json`'s result will be more helpful.
- Other information that is useful from your perspective.
- For a general performance question, e.g. the benchmark result you got by yourself is not expected, please provide the following information:
through goprof i got such stack:
go tool pprof -inuse_space http://localhost:10080/debug/pprof/heap
Fetching profile over HTTP from http://localhost:10080/debug/pprof/heap
Saved profile in /root/pprof/pprof.tidb-server.alloc_objects.alloc_space.inuse_objects.inuse_space.009.pb.gz
File: tidb-server
Build ID: f802f4591b52719a3d3659c256db53dde27d2c61
Type: inuse_space
Time: Feb 16, 2022 at 7:07pm (CST)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof) top 30
Showing nodes accounting for 10847.67MB, 99.56% of 10895.35MB total
Dropped 394 nodes (cum <= 54.48MB)
flat flat% sum% cum cum%
7468.06MB 68.54% 68.54% 7468.06MB 68.54% github.com/pingcap/tidb/executor.getOneLine
2395.66MB 21.99% 90.53% 2395.66MB 21.99% github.com/pingcap/tidb/executor.decomposeToSlowLogTasks
983.94MB 9.03% 99.56% 983.94MB 9.03% github.com/pingcap/tidb/store/copr.(*copIteratorWorker).handleCopResponse
0 0% 99.56% 9863.72MB 90.53% github.com/pingcap/tidb/executor.(*slowQueryRetriever).getBatchLogForReversedScan
0 0% 99.56% 9863.72MB 90.53% github.com/pingcap/tidb/executor.(*slowQueryRetriever).parseDataForSlowLog
0 0% 99.56% 9863.72MB 90.53% github.com/pingcap/tidb/executor.(*slowQueryRetriever).parseSlowLog
0 0% 99.56% 986.95MB 9.06% github.com/pingcap/tidb/store/copr.(*copIteratorWorker).handleTask
0 0% 99.56% 986.95MB 9.06% github.com/pingcap/tidb/store/copr.(*copIteratorWorker).handleTaskOnce
0 0% 99.56% 986.95MB 9.06% github.com/pingcap/tidb/store/copr.(*copIteratorWorker).run
is this related to slow query.
Contributor guide
Assessment
This issue has not been assessed yet.