Bug #100537 | Performance degradation caused by monitoring sys.innodb_lock_waits in MySQL 8.0 | ||
---|---|---|---|
Submitted: | 15 Aug 2020 8:11 | Modified: | 19 Sep 9:44 |
Reporter: | Sho Iizuka | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S5 (Performance) |
Version: | 8.0.21 | OS: | Ubuntu (18.04 LTS) |
Assigned to: | CPU Architecture: | x86 | |
Tags: | regression |
[15 Aug 2020 8:11]
Sho Iizuka
[15 Aug 2020 8:12]
Sho Iizuka
test script
Attachment: lock_test.py (application/octet-stream, text), 2.22 KiB.
[15 Aug 2020 8:12]
Sho Iizuka
monitoring process
Attachment: monitor.py (application/octet-stream, text), 673 bytes.
[15 Aug 2020 8:13]
Sho Iizuka
monitor.py is the monitoring process written in Python 3. CREATE USER `monitor`@`localhost`; GRANT SELECT ON sys.* TO `monitor`@`localhost`; GRANT EXECUTE ON sys.* TO `monitor`@`localhost`; GRANT SELECT ON performance_schema.* TO `monitor`@`localhost`; GRANT PROCESS ON *.* TO `monitor`@`localhost`; lock_test.py is the test script written in Python 3. CREATE USER test@localhost; CREATE DATABASE test; GRANT ALL ON test.* TO test@localhost;
[17 Aug 2020 11:59]
MySQL Verification Team
Hello Sho Iizuka-San, Thank you for the report and test case. regards, Umesh
[19 Sep 9:44]
Edward Gilmore
Posted by developer: Added the following note to the MySQL Server 8.0.40, 8.4.3, and 9.1.0 release notes: Running SELECT * FROM sys.innodb_lock_waits; on an instance which was under heavy load affected the performance of the server. As of this release, SELECT * FROM sys.innodb_lock_waits; fetches only 2 locks for each wait, instead of scanning all locks twice for each wait. As part of this fix, primary keys were added to the DATA_LOCKS and DATA_LOCK_WAITS Performance Schema tables. Thank you for the bug report.