[MDEV-17996] ANALYZE TABLE x PERSISTENT FOR ALL - memory usage excessive / fails to complete Created: 2018-12-13 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.1.31, 10.3.10, 10.4.1 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Black | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | eits, leak | ||
| Environment: |
fc29 x86_64 + debian x86_64 jessie container |
||
| Description |
|
Starting mariadb from start and ran mysqldump to fully populate the innodb_buffer_pool. No other concurrenct activity on this database:
Before the previous `ANALYZE TABLE` table was run the below script was run to monitor memory usage.
memory usage raised from 321M to 378M (57M)
Halving the number of entries:
The memory usage of ANALYZE TABLE from before it started
ANALYZE TABLE continued to run after 30minutes and failed to finish despite finishing in 30 seconds previously. Memory use continued to over time. Quote from coworker on 10.1.31-MariaDB-1~jessie running in x86-64 64G container:
|
| Comments |
| Comment by Daniel Black [ 2018-12-13 ] |
|
cost populated with: INSERT INTO cost SELECT UUID(), IF(name='UNION',2,RAND()*5), name, IF(name='UNION',1,RAND()*5), RAND()*50 FROM mysql.help_topic; several times before quite a few: insert into cost select UUID(), snapshotActive,billingAccountName,period,cost FROM cost; |
| Comment by Elena Stepanova [ 2018-12-28 ] |
|
We have several resource consumption issues filed in regard to ANALYZE with persistent statistics collection, most importantly |
| Comment by Sergei Petrunia [ 2018-12-28 ] |
|
High resource consumption is a known limitation of ANALYZE. But here, danblack mentions that
So it runs for much more time and consumes much more memory for a smaller dataset? It also continues to consume CPU, so this is not an "out of disk space in /tmp" issue. This looks like a different kind of bug to me. |
| Comment by Elena Stepanova [ 2018-12-28 ] |
|
I hope that danblack can clarify what "halving the number of entires" means in this context. Except for this word, nothing in the description (neither the complaint itself, nor innodb buffer pool stats, nor the outcome) suggests that it's about an inexplicable behavior upon reducing the number of rows. But if it's so anyway, I suppose danblack can provide the complete dataset and/or environment to reproduce it. |
| Comment by Daniel Black [ 2019-01-06 ] |
|
mysqldump MDEV-17996.sql uploaded ftps://ftp.mariadb.com/ "halving the number of entries" was reducing the number of table rows by half. This non-completion may be another bug that just happened to manifest on a different dataset and wasn't intended to be the defining aspect of this bug report. |