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 | 250 |
| 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 | 1000 |
| performance_schema_max_rwlock_classes | 20 |
| performance_schema_max_rwlock_instances | 1000 |
| 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 20.1. Performance Schema Variable Reference
The variables have the following meanings:
The value of this variable is ON or
OFF to indicate whether Performance Schema
is enabled. By default, the value is OFF.
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 of
open_files_limit:
open_files_limit affects the
maximum number of open file handles the server can support and
performance_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 and
max_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 increase
max_connections or
max_delayed_threads, you
should consider increasing
performance_schema_max_thread_instances
so that
performance_schema_max_thread_instances
is greater than the sum of
max_connections and
max_delayed_threads.

User Comments
Add your own comment.