[MDEV-5448] Performance regression between 10.0.4 and 10.0.5 (~8%) Created: 2013-12-14 Updated: 2013-12-16 Resolved: 2013-12-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.6 |
| Fix Version/s: | 10.0.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergey Vojtovich | Assignee: | Sergey Vojtovich |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
As Axel mentioned in his E-mail, there is performance regression between 10.0.4 and 10.0.5:
Looking for this regression I can see clear performance drop with the following revision:
Specifically sys_vars.cc part:
If I comment it out, I get nice performance boost. Note that it doesn't seem to have anything to do with gtid functionality accessed by Sys_var_gtid_binlog_state methods: I removed all references to gtid code and still observe performance degradation. It seem to be somehow caused by increase of system variables. If I add new system variable (on revision 3816), I can see performance degradation:
The difference is like: vs 64 threads, time spent: 60s, queries executed: 9879031, qps: 164650, 1 thread qps: 2572 I was unable to reproduce performance boost with fresh 10.0 by commenting out gtid_binlog_state. Even simpler patch for revision 3816 to see performance degradation:
|
| Comments |
| Comment by Sergey Vojtovich [ 2013-12-15 ] |
|
When we add new system variable (e.g. ptr= 0x1061d40, size= 208), addresses of other global C++ variables may change. Among other things address of LOCK_open and unused_tables changes. rev.3816 (fast): rev.3816 + "char buf[sizeof(Sys_table_cache_instances)]" (slow): Note that in fast version LOCK_open resides on 2 cache lines (32 bytes on first + 16 bytes on second). Second cache line is shared with unused_tables. But since these last 16 bytes are quite static, there should be no false sharing issues. In slow version LOCK_open resides on 1 cache line which is shared with unused_tables. oprofile proves that LLC_MISSES increase in slow version: 3816 (slow) 3816 (slow + padding) Adding dummy padding around LOCK_open restore performance: |
| Comment by Sergey Vojtovich [ 2013-12-16 ] |
|
|