[MDEV-29988] Major performance regression with 10.6.11 Created: 2022-11-09 Updated: 2023-05-08 Resolved: 2023-01-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets, Prepared Statements, Stored routines |
| Affects Version/s: | 10.3.37, 10.4.27, 10.5.18, 10.6.11, 10.7.7, 10.8.6, 10.9.4, 10.10.2 |
| Fix Version/s: | 10.11.2, 10.3.38, 10.4.28, 10.5.19, 10.6.12, 10.7.8, 10.8.7, 10.9.5, 10.10.3 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Nico Jehle | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 4 |
| Labels: | regression | ||
| Environment: |
CentOS 7 |
||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
After upgrading part of our systems to 10.6.11 the MariaDB server uses much more CPU compared to 10.6.10. We were upgrading to 10.6.11 for the fix to Server config is the same as on |
| Comments |
| Comment by Nico Jehle [ 2022-11-09 ] | ||||||||||||||||||||||||||||
|
Load increase after the upgrade: | ||||||||||||||||||||||||||||
| Comment by Nico Jehle [ 2022-11-09 ] | ||||||||||||||||||||||||||||
|
In one location, we tested with 2 hosts, both getting abour the same amount of requests. One host was still running 10.6.10 (dns04), usual load dns04_10.6.10.tar.gz The other host was running 10.6.11 (dns01), high load dns01_10.6.11.tar.gz | ||||||||||||||||||||||||||||
| Comment by Nico Jehle [ 2022-11-09 ] | ||||||||||||||||||||||||||||
|
Load graph for the 2 server from the previous comment: | ||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2022-11-28 ] | ||||||||||||||||||||||||||||
|
With the following patch:
one can verify in the debugger that a new Item_string is allocated on the statement arena for every mysql_stmt_execute. This means that memory is growing with every mysql_stmt_execute call and statement cleanup time is proportional to the number of mysql_stmt_execute calls. | ||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2022-11-28 ] | ||||||||||||||||||||||||||||
|
In terms of regular MTR (but not for the regression suite!):
The measurements are very rough as the test was run on a machine not tuned for performance experiments, they just give a general idea. The difference scales a lot with the increase in the number of repetitions. | ||||||||||||||||||||||||||||
| Comment by Michael Widenius [ 2022-11-29 ] | ||||||||||||||||||||||||||||
|
We could have a test for this in MTR where we do a similar loop as the above and then check that memory used for the user has not gone over 500K | ||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2022-11-29 ] | ||||||||||||||||||||||||||||
|
Not this test, at least. Somebody would need to build a test which triggers the memory consumption more quickly. | ||||||||||||||||||||||||||||
| Comment by F K [ 2022-11-30 ] | ||||||||||||||||||||||||||||
|
Would this bug cause the innodb_buffer to fill faster and be larger than needed? | ||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2022-11-30 ] | ||||||||||||||||||||||||||||
|
No, this bug cannot cause that | ||||||||||||||||||||||||||||
| Comment by Cheong Chung Onn [ 2022-12-16 ] | ||||||||||||||||||||||||||||
|
We upgraded our customer production database this week, and we experienced major performance regression since we upgraded from 10.3 to 10.6.11. We have to tuned our a quite a few of our queries to achieve satisfactory performance. | ||||||||||||||||||||||||||||
| Comment by Miroslav Lachman [ 2022-12-28 ] | ||||||||||||||||||||||||||||
|
Just "we too" comment. | ||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2023-01-03 ] | ||||||||||||||||||||||||||||
|
For the record, my attempt to merge the fixes to 10.4 would cause incorrect evaluation of many WHERE conditions. I think that complex changes have to be tested in all relevant major branches before being pushed to any main branch. |