Bug #46352 PERFORMANCE_SCHEMA: Inconsistencies in EVENTS_WAITS_SUMMARY

Submitted: 23 Jul 2009 11:59 Modified: 24 Jul 2009 18:47
Reporter: Jørgen Austvik Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Marc ALFF CPU Architecture:Any

[23 Jul 2009 11:59] Jørgen Austvik
Description:
Adding bug report since I don't want to forget this while on vacation.

The numbers in the EVENTS_WAITS_SUMMARY tables are not consistent.

See also bug#46351

How to repeat:
I have pruned the result tables a bit, but kept at least one row of the different invariants (col A and B having the same value, having different values, one of them being 0).)

# First you must add some load

# EVENTS_WAITS_SUMMARY
SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT), SUM(t.SUM_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING e.SUM_TIMER_WAIT <> SUM(i.SUM_TIMER_WAIT)
OR e.SUM_TIMER_WAIT <> SUM(t.SUM_TIMER_WAIT);
EVENT_NAME      SUM_TIMER_WAIT  SUM(i.SUM_TIMER_WAIT) SUM(t.SUM_TIMER_WAIT)
wait/io/file/maria/control      32477250        97431750        32477250
wait/io/file/maria/key_file     178720125       142551000       0
wait/io/file/maria/log_descriptor_directory     16033125        48099375        16033125
wait/io/file/myisam/dfile       503808000       1511424000      2336287500
wait/synch/mutex/maria/LOCK_checkpoint  45750   0       45750
wait/synch/mutex/sql/BML_class::THR_LOCK_BML_active     103500  310500 103500
wait/synch/mutex/sql/LOCK_delete        561375  0       499125

SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT), MIN(t.MIN_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING e.MIN_TIMER_WAIT <> MIN(i.MIN_TIMER_WAIT)
OR e.MIN_TIMER_WAIT <> MIN(t.MIN_TIMER_WAIT);
EVENT_NAME      MIN_TIMER_WAIT  MIN(i.MIN_TIMER_WAIT) MIN(t.MIN_TIMER_WAIT)
wait/io/file/maria/control      409875  409875  0
wait/io/file/maria/key_file     654375  1094625 0
wait/synch/mutex/maria/LOCK_checkpoint  45750   0       0
wait/synch/mutex/maria/PAGECACHE::cache_lock    34500   0       0
wait/synch/mutex/myisam/MYISAM_SHARE::intern_lock       34500   35625   0
wait/synch/mutex/mysys/THR_LOCK_lock    33375   33375   0
wait/synch/mutex/mysys/THR_LOCK_mutex   35625   0       0
wait/synch/mutex/mysys/THR_LOCK_myisam  35625   35625   0
wait/synch/mutex/sql/LOG::LOCK_log      44625   0       0

SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT), MAX(t.MAX_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING e.MAX_TIMER_WAIT <> MAX(i.MAX_TIMER_WAIT)
OR e.MAX_TIMER_WAIT <> MAX(t.MAX_TIMER_WAIT);
EVENT_NAME      MAX_TIMER_WAIT  MAX(i.MAX_TIMER_WAIT) MAX(t.MAX_TIMER_WAIT)
wait/io/file/maria/key_file     24632250        6087750 0
wait/io/file/tina/data  5054250 5054250 2625750
wait/io/file/tina/metadata      5290875 5290875 0
wait/synch/mutex/maria/LOCK_checkpoint  45750   0       45750
wait/synch/mutex/maria/LOCK_trn_list    96750   96750   0
wait/synch/mutex/maria/PAGECACHE::cache_lock    187875  187875  0
wait/synch/mutex/myisam/MYISAM_SHARE::intern_lock       121125  121125 90000
wait/synch/mutex/mysys/THR_LOCK_time    129750  129750  95625
wait/synch/mutex/sql/hash_filo::lock    64500   64500   57750
wait/synch/mutex/sql/LOCK_delete        65625   0       65625
wait/synch/mutex/sql/LOCK_event_metadata        45750   45750   0
wait/synch/mutex/sql/LOCK_open  107625  107625  106500
wait/synch/mutex/tina/tina_mutex        95625   95625   0
wait/synch/mutex/tina/TINA_SHARE::mutex 90000   90000   68625
wait/synch/rwlock/myisam/MYISAM_SHARE::key_root_lock    473250  473250 436500
wait/synch/rwlock/sql/LOCK_grant        513375  513375  430125
wait/synch/rwlock/sql/LOCK_logger       4948875 4948875 4582125
[24 Jul 2009 18:47] Marc ALFF
This is not a bug, the test script does not account for deleted instruments and threads

A new test script has been checked in to cover this case,
which shows that the performance schema aggregates are consistent.

See aggregate.test in mysql-azalea-perfschema

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.