[MDEV-7899] 10.1 is 3% slower than 10.0 in OLTP RO Created: 2015-04-02 Updated: 2015-04-09 Resolved: 2015-04-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.1 |
| Fix Version/s: | 10.1.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergey Vojtovich | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | analyze-stmt | ||
| Attachments: |
|
| Epic Link: | Performance: micro optimizations |
| Description |
|
Even though 10.1 has quite a few generic optimizations it still shows slightly worse performance compared to 10.0. This trend can be reproduced quite reliably on different platforms (10.0 -> 10.1):
One of the biggest contributors to this slowdown (~2%) seem to be Exec_time_tracker. I get the following numbers if it is commented out (10.0 -> 10.1):
|
| Comments |
| Comment by Sergei Petrunia [ 2015-04-03 ] | |||||||||||||||
|
Following the IRC discussion, I've made a patch that make ANALYZE timing hooks not to be invoked for non-ANALYZE statements. However, it made no difference in execution on my system. svoj, could you please check if the patch fixes the problem? | |||||||||||||||
| Comment by Sergei Petrunia [ 2015-04-03 ] | |||||||||||||||
|
(Note to self: before this patch is pushed, sort out how it works with UNIONs) | |||||||||||||||
| Comment by Sergey Vojtovich [ 2015-04-04 ] | |||||||||||||||
|
The patch seem to be incomplete: ANALYZE_START_TRACKING /ANALYZE_STOP_TRACKING in sql_delete.cc and sql_update.cc were not updated. I'll call those with do_tracking= 1. | |||||||||||||||
| Comment by Sergey Vojtovich [ 2015-04-04 ] | |||||||||||||||
|
I can see little improvement, almost as good as if it was when I commented it out. perf proof (event: cycles):
So we freed up 0.49% CPU cycles. When tracker functionality is removed from TABLE_IO_WAIT perf says:
That is 0.56%. Ideally we should have different method with out-of-loop condition check. But that may be complex. Reducing number of conditions from 2 to 1 is trivial and should be worthy:
|