Some wait instruments are enabled by default; others are disabled. For example: 

mysql> SELECT NAME, ENABLED, TIMED FROM performance_schema.setup_instruments WHERE NAME LIKE ’wait/io/file/innodb%’; +-------------------------------------------------+---------+-------+ | NAME | ENABLED | TIMED | +-------------------------------------------------+---------+-------+ | wait/io/file/innodb/innodb_tablespace_open_file | YES | YES | | wait/io/file/innodb/innodb_data_file | YES | YES | | wait/io/file/innodb/innodb_log_file | YES | YES | | wait/io/file/innodb/innodb_temp_file | YES | YES | | wait/io/file/innodb/innodb_arch_file | YES | YES | | wait/io/file/innodb/innodb_clone_file | YES | YES | +-------------------------------------------------+---------+-------+ mysql> SELECT NAME, ENABLED, TIMED FROM performance_schema.setup_instruments WHERE NAME LIKE ’wait/io/socket/%’; +----------------------------------------+---------+-------+ | NAME | ENABLED | TIMED | +----------------------------------------+---------+-------+ | wait/io/socket/sql/server_tcpip_socket | NO | NO | | wait/io/socket/sql/server_unix_socket | NO | NO | | wait/io/socket/sql/client_connection | NO | NO | +----------------------------------------+---------+-------+ 

The wait consumers are disabled by default: 

mysql> SELECT * FROM performance_schema.setup_consumers WHERE NAME LIKE ’events_waits%’; +---------------------------+---------+ | NAME | ENABLED | +---------------------------+---------+ | events_waits_current | NO | | events_waits_history | NO | | events_waits_history_long | NO | +---------------------------+---------+ 

To control wait event collection at server startup, use lines like these in your my.cnf  file: 

•Enable: 

[mysqld] performance-schema-instrument=’wait/%=ON’ performance-schema-consumer-events-waits-current=ON performance-schema-consumer-events-waits-history=ON performance-schema-consumer-events-waits-history-long=ON 

•Disable: 

[mysqld] performance-schema-instrument=’wait/%=OFF’ performance-schema-consumer-events-waits-current=OFF performance-schema-consumer-events-waits-history=OFF performance-schema-consumer-events-waits-history-long=OFF 

To control wait event collection at runtime, update the setup_instruments  and setup_consumers tables: 

•Enable: 

UPDATE performance_schema.setup_instruments SET ENABLED = ’YES’, TIMED = ’YES’ WHERE NAME LIKE ’wait/%’; 

