Performance Schema implements several system variables that provide configuration information:
mysql> SHOW VARIABLES LIKE 'perf%';
+---------------------------------------------------+---------+
| Variable_name | Value |
+---------------------------------------------------+---------+
| performance_schema | ON |
| performance_schema_events_waits_history_long_size | 10000 |
| performance_schema_events_waits_history_size | 10 |
| performance_schema_max_cond_classes | 80 |
| performance_schema_max_cond_instances | 1000 |
| performance_schema_max_file_classes | 50 |
| performance_schema_max_file_handles | 32768 |
| performance_schema_max_file_instances | 10000 |
| performance_schema_max_mutex_classes | 200 |
| performance_schema_max_mutex_instances | 1000000 |
| performance_schema_max_rwlock_classes | 30 |
| performance_schema_max_rwlock_instances | 1000000 |
| performance_schema_max_table_handles | 100000 |
| performance_schema_max_table_instances | 50000 |
| performance_schema_max_thread_classes | 50 |
| performance_schema_max_thread_instances | 1000 |
+---------------------------------------------------+---------+
Table 21.1. Performance Schema Variable Reference
The variables have the following meanings:
The value of this variable is
ON
orOFF
to indicate whether Performance Schema is enabled. By default, the value isOFF
. At server startup, you can specify this variable with no value or a value of 1 to enable it, or with a value of 0 to disable it.performance_schema_events_waits_history_long_size
The number of rows in the
events_waits_history_long
table.performance_schema_events_waits_history_size
The number of rows per thread in the
events_waits_history
table.performance_schema_max_cond_classes
The maximum number of condition instruments.
performance_schema_max_cond_instances
The maximum number of instrumented condition objects.
performance_schema_max_file_classes
The maximum number of file instruments.
performance_schema_max_file_handles
The maximum number of opened file objects.
The value of
performance_schema_max_file_handles
should be greater than the value ofopen_files_limit
:open_files_limit
affects the maximum number of open file handles the server can support andperformance_schema_max_file_handles
affects how many of these file handles can be instrumented.performance_schema_max_file_instances
The maximum number of instrumented file objects.
performance_schema_max_mutex_classes
The maximum number of mutex instruments.
performance_schema_max_mutex_instances
The maximum number of instrumented mutex objects.
performance_schema_max_rwlock_classes
The maximum number of rwlock instruments.
performance_schema_max_rwlock_instances
The maximum number of instrumented rwlock objects.
performance_schema_max_table_handles
The maximum number of opened table objects.
performance_schema_max_table_instances
The maximum number of instrumented table objects.
performance_schema_max_thread_classes
The maximum number of thread instruments.
performance_schema_max_thread_instances
The maximum number of instrumented thread objects.
The
max_connections
andmax_delayed_threads
system variables affect how many threads are run in the server.performance_schema_max_thread_instances
affects how many of these running threads can be instrumented. If you increasemax_connections
ormax_delayed_threads
, you should consider increasingperformance_schema_max_thread_instances
so thatperformance_schema_max_thread_instances
is greater than the sum ofmax_connections
andmax_delayed_threads
.