Bug #77886 | User locks slow down after some time in heavy contension | ||
---|---|---|---|
Submitted: | 30 Jul 2015 13:05 | Modified: | 30 Aug 2015 15:08 |
Reporter: | Ben Clewett | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S4 (Feature request) |
Version: | 5.6.24 | OS: | Any (5.6.24-ndb-7.4.6-cluster-gpl-log) |
Assigned to: | CPU Architecture: | Any |
[30 Jul 2015 13:05]
Ben Clewett
[30 Jul 2015 14:01]
MySQL Verification Team
Hi! What you are describing is expected behavior. This is how GET_LOCK() was designed since MySQL 4.0. There is a single mutex lock for all named locks. However, it would be possible to make a separate mutex for each different name. This would make a feature request. Unless you have any comments, this is what I would do.
[30 Jul 2015 14:09]
Ben Clewett
Thanks for replying to my report, and explaining how the names locks work. Certainly this might explain something. However it does not explain the degradation of performance over time. My qualitative observation is that the named lock has a 'slow' mode and a 'fast' mode, which significant difference in performance. Once MySQL is in the 'slow' mode, you cannot break out of it. Accept by issuing an unrelated OPTIMIZE TABLE statement. This feels like a bug...
[30 Jul 2015 14:14]
MySQL Verification Team
What you describe is exactly the expected behavior. Since there is a single mutex for all user locks, increasing their number will lead to a very large slowdown.
[30 Jul 2015 14:32]
Ben Clewett
Thanks again for getting back to me. I am sorry I am not explaining my self very well. At all times I have the same number of connections/threads in MySQL, all running at the same rate. This is constant. At the start it runs fast. Then something happens, and MySQL goes into 'slow' mode. Same number of connections and same rate. Then I issue some OPTIMIZE TABLE, and MySql jumps back into 'fast' mode. Until the next onset at some later time. When it jumps into 'slow' mode, by threads are spending so much time waiting for the lock that they don't actually do much work.
[30 Jul 2015 15:08]
MySQL Verification Team
Can you provide the entire, fully repeatable test case, that will prove what you are claiming on each of its runs. Test case should contain all necessary details and must repeat its behavior on every run.
[31 Aug 2015 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".