[MDEV-29104] Performance Issues Reading information_schema.PARAMETERS Created: 2022-07-14 Updated: 2023-03-21 Resolved: 2022-10-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Fix Version/s: | 10.11.0 |
| Type: | Task | Priority: | Major |
| Reporter: | Juan | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Preview_10.11 | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Reading from information_schema.PARAMETERS table in MariaDB is slower than MySQL by a factor of 20x in the best of cases, and deteriorates linearly in MariaDB once the number of reading threads exceeds the number of available cores, whereas in MySQL the deterioration remains more-or-less flat. The following table shows relative performance running mysqlslap against the dataset provided in the attached sql file cs0401486-test.sql with this series of commands
Tests conducted in CentOS 7 machines with 1G RAM and approx. 800 real IOPS with one and four Intel i7-9750H cores @ 2.592GHz, average times reported:
Timings all on MariaDB 10.6.7. Confirmed on 10.6.8, 10.7.4, and 10.8.3 in Rocky Linux. |
| Comments |
| Comment by Elena Stepanova [ 2022-07-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Assigning to psergei because it was previously discussed that he was looking into similar issues. Please reassign if needed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2022-09-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Closing as Duplicate of | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2022-09-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Wait this MDEV (and the underlying support issue) uses this query:
That is, they search for the routine aaa_sp50001 *in all databases*. I doubt Also they claim MySQL is faster for such query. oleg.smirnov can you check if MySQL-8.0 has any optimizations for this? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleg Smirnov [ 2022-09-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MySQL has significantly different structure here - I_S.PARAMETERS is a view:
So the explain plans looks like as follows:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleg Smirnov [ 2022-09-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Short overview of how the Data Dictionary architecture has been reworked in MySQL 8.0: https://www.slideshare.net/StleDeraas/data-dictionary-pl17. One of the reasons mentioned is low performance of queries to INFORMATION_SCHEMA tables. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleg Smirnov [ 2022-09-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Implemented an optimization suggested by psergei:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2022-09-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramesh Sivaraman [ 2022-10-11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
okay to push | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleg Smirnov [ 2022-10-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pushed to 10.11. |