Spec-Zone .ru
спецификации, руководства, описания, API
|
The Performance Schema implements several system variables that provide configuration information:
mysql> SHOW VARIABLES LIKE 'perf%';
+--------------------------------------------------------+---------+| Variable_name | Value |+--------------------------------------------------------+---------+| performance_schema | ON || performance_schema_accounts_size | 100 || performance_schema_digests_size | 200 || performance_schema_events_stages_history_long_size | 10000 || performance_schema_events_stages_history_size | 10 || performance_schema_events_statements_history_long_size | 10000 || performance_schema_events_statements_history_size | 10 || performance_schema_events_waits_history_long_size | 10000 || performance_schema_events_waits_history_size | 10 || performance_schema_hosts_size | 100 || 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_socket_classes | 10 || performance_schema_max_socket_instances | 1000 || performance_schema_max_stage_classes | 150 || performance_schema_max_statement_classes | 165 || performance_schema_max_table_handles | 10000 || performance_schema_max_table_instances | 1000 || performance_schema_max_thread_classes | 50 || performance_schema_max_thread_instances | 1000 || performance_schema_session_connect_attrs_size | 512 || performance_schema_setup_actors_size | 100 || performance_schema_setup_objects_size | 100 || performance_schema_users_size | 100 |+--------------------------------------------------------+---------+
Performance Schema system variables can be set at server startup on the command line or in option files, and many can be set at runtime. See Section 21.10, "Performance Schema Option and Variable Reference".
As of MySQL 5.6.6, the Performance Schema automatically sizes the values of several of its parameters at server startup if they are not set explicitly. For more information, see Section 21.2.2, "Performance Schema Startup Configuration".
Performance Schema variables have the following meanings:
Command-Line Format | --performance_schema=# |
||
Option-File Format | performance_schema |
||
System Variable Name | performance_schema
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | boolean |
||
Default | OFF |
||
Permitted Values (>= 5.6.6) | |||
Type | boolean |
||
Default | ON |
The value of this variable is ON
or OFF
to
indicate whether the Performance Schema is enabled. By default, the value is ON
by default as of MySQL 5.6.6 and OFF
before that. At server startup,
you can specify this variable with no value or a value of ON
or 1 to
enable it, or with a value of OFF
or 0 to disable it.
performance_schema_accounts_size
Introduced | 5.6.3 | ||
Command-Line Format | --performance_schema_accounts_size=# |
||
Option-File Format | performance_schema_accounts_size |
||
System Variable Name | performance_schema_accounts_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 10 |
||
Range | 0 .. 1048576 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
||
Range | -1 .. 1048576 |
The number of rows in the accounts
table. If this variable is 0, the Performance Schema does
not maintain connection statistics in the accounts
table. This variable was added in MySQL 5.6.3.
performance_schema_digests_size
Introduced | 5.6.5 | ||
Command-Line Format | --performance_schema_digests_size=# |
||
Option-File Format | performance_schema_digests_size |
||
System Variable Name | performance_schema_digests_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | -1 (autosized) |
||
Range | -1 .. 1048576 |
The maximum number of rows in the events_statements_summary_by_digest
table. This variable was added in
MySQL 5.6.5.
performance_schema_events_stages_history_long_size
Introduced | 5.6.3 | ||
Command-Line Format | --performance_schema_events_stages_history_long_size=# |
||
Option-File Format | performance_schema_events_stages_history_long_size |
||
System Variable Name | performance_schema_events_stages_history_long_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 10000 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The number of rows in the events_stages_history_long
table. This variable was added in MySQL
5.6.3.
performance_schema_events_stages_history_size
Introduced | 5.6.3 | ||
Command-Line Format | --performance_schema_events_stages_history_size=# |
||
Option-File Format | performance_schema_events_stages_history_size
|
||
System Variable Name | performance_schema_events_stages_history_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 10 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The number of rows per thread in the events_stages_history
table. This variable was added in MySQL 5.6.3.
performance_schema_events_statements_history_long_size
Introduced | 5.6.3 | ||
Command-Line Format | --performance_schema_events_statements_history_long_size=#
|
||
Option-File Format | performance_schema_events_statements_history_long_size |
||
System Variable Name | performance_schema_events_statements_history_long_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 10000 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The number of rows in the events_statements_history_long
table. This variable was added in
MySQL 5.6.3.
performance_schema_events_statements_history_size
Introduced | 5.6.3 | ||
Command-Line Format | --performance_schema_events_statements_history_size=# |
||
Option-File Format | performance_schema_events_statements_history_size |
||
System Variable Name | performance_schema_events_statements_history_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 10 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The number of rows per thread in the events_statements_history
table. This variable was added in MySQL
5.6.3.
performance_schema_events_waits_history_long_size
Command-Line Format | --performance_schema_events_waits_history_long_size=# |
||
Option-File Format | performance_schema_events_waits_history_long_size |
||
System Variable Name | performance_schema_events_waits_history_long_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 10000 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The number of rows in the events_waits_history_long
table.
performance_schema_events_waits_history_size
Command-Line Format | --performance_schema_events_waits_history_size=# |
||
Option-File Format | performance_schema_events_waits_history_size
|
||
System Variable Name | performance_schema_events_waits_history_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 10 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The number of rows per thread in the events_waits_history
table.
Introduced | 5.6.3 | ||
Command-Line Format | --performance_schema_hosts_size=# |
||
Option-File Format | performance_schema_hosts_size |
||
System Variable Name | performance_schema_hosts_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 10 |
||
Range | 0 .. 1048576 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
||
Range | -1 .. 1048576 |
The number of rows in the hosts
table. If this variable is 0, the Performance Schema does not
maintain connection statistics in the hosts
table. This variable was added in MySQL 5.6.3.
performance_schema_max_cond_classes
Command-Line Format | --performance_schema_max_cond_classes=# |
||
Option-File Format | performance_schema_max_cond_classes |
||
System Variable Name | performance_schema_max_cond_classes
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | 80 |
The maximum number of condition instruments.
performance_schema_max_cond_instances
Command-Line Format | --performance_schema_max_cond_instances=# |
||
Option-File Format | performance_schema_max_cond_instances |
||
System Variable Name | performance_schema_max_cond_instances
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 1000 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The maximum number of instrumented condition objects.
performance_schema_max_file_classes
Command-Line Format | --performance_schema_max_file_classes=# |
||
Option-File Format | performance_schema_max_file_classes |
||
System Variable Name | performance_schema_max_file_classes
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | 50 |
The maximum number of file instruments.
performance_schema_max_file_handles
Command-Line Format | --performance_schema_max_file_handles=# |
||
Option-File Format | performance_schema_max_file_handles |
||
System Variable Name | performance_schema_max_file_handles
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | 32768 |
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
Command-Line Format | --performance_schema_max_file_instances=# |
||
Option-File Format | performance_schema_max_file_instances |
||
System Variable Name | performance_schema_max_file_instances
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 10000 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The maximum number of instrumented file objects.
performance_schema_max_mutex_classes
Command-Line Format | --performance_schema_max_mutex_classes=# |
||
Option-File Format | performance_schema_max_mutex_classes |
||
System Variable Name | performance_schema_max_mutex_classes
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | 200 |
The maximum number of mutex instruments.
performance_schema_max_mutex_instances
Command-Line Format | --performance_schema_max_mutex_instances=# |
||
Option-File Format | performance_schema_max_mutex_instances |
||
System Variable Name | performance_schema_max_mutex_instances
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 1000 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The maximum number of instrumented mutex objects.
performance_schema_max_rwlock_classes
Command-Line Format | --performance_schema_max_rwlock_classes=# |
||
Option-File Format | performance_schema_max_rwlock_classes |
||
System Variable Name | performance_schema_max_rwlock_classes
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | 20 |
The maximum number of rwlock instruments.
performance_schema_max_rwlock_instances
Command-Line Format | --performance_schema_max_rwlock_instances=#
|
||
Option-File Format | performance_schema_max_rwlock_instances |
||
System Variable Name | performance_schema_max_rwlock_instances
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 1000 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The maximum number of instrumented rwlock objects.
performance_schema_max_socket_classes
Introduced | 5.6.3 | ||
Command-Line Format | --performance_schema_max_socket_classes=# |
||
Option-File Format | performance_schema_max_socket_classes |
||
System Variable Name | performance_schema_max_socket_classes
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | 10 |
The maximum number of socket instruments. This variable was added in MySQL 5.6.3.
performance_schema_max_socket_instances
Introduced | 5.6.3 | ||
Command-Line Format | --performance_schema_max_socket_instances=#
|
||
Option-File Format | performance_schema_max_socket_instances |
||
System Variable Name | performance_schema_max_socket_instances
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 1000 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The maximum number of instrumented socket objects. This variable was added in MySQL 5.6.3.
performance_schema_max_stage_classes
Introduced | 5.6.3 | ||
Command-Line Format | --performance_schema_max_stage_classes=# |
||
Option-File Format | performance_schema_max_stage_classes |
||
System Variable Name | performance_schema_max_stage_classes
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | 100 |
The maximum number of stage instruments. This variable was added in MySQL 5.6.3.
performance_schema_max_statement_classes
Introduced | 5.6.3 | ||
Command-Line Format | --performance_schema_max_statement_classes=#
|
||
Option-File Format | performance_schema_max_statement_classes |
||
System Variable Name | performance_schema_max_statement_classes
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | autosized |
The maximum number of statement instruments. The default value is calculated at server build time based on the number of commands in the client/server protocol and the number of SQL statement types supported by the server.
This variable should not be changed, unless to set it to 0 to disable all statement instrumentation and save all memory associated with it. Setting the variable to nonzero values other than the default has no benefit; in particular, values larger than the default cause more memory to be allocated then is needed.
This variable was added in MySQL 5.6.3.
performance_schema_max_table_handles
Command-Line Format | --performance_schema_max_table_handles=# |
||
Option-File Format | performance_schema_max_table_handles |
||
System Variable Name | performance_schema_max_table_handles
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 100000 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The maximum number of opened table objects.
performance_schema_max_table_instances
Command-Line Format | --performance_schema_max_table_instances=# |
||
Option-File Format | performance_schema_max_table_instances |
||
System Variable Name | performance_schema_max_table_instances
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 50000 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The maximum number of instrumented table objects.
performance_schema_max_thread_classes
Command-Line Format | --performance_schema_max_thread_classes=# |
||
Option-File Format | performance_schema_max_thread_classes |
||
System Variable Name | performance_schema_max_thread_classes
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | 50 |
The maximum number of thread instruments.
performance_schema_max_thread_instances
Command-Line Format | --performance_schema_max_thread_instances=#
|
||
Option-File Format | performance_schema_max_thread_instances |
||
System Variable Name | performance_schema_max_thread_instances
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 1000 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
The maximum number of instrumented thread objects.
The max_connections
system variable affects how many threads are run in the server. performance_schema_max_thread_instances
affects how many of these
running threads can be instrumented. The default value of performance_schema_max_thread_instances
is autosized based on the
value of max_connections
.
performance_schema_session_connect_attrs_size
Introduced | 5.6.6 | ||
Command-Line Format | --performance_schema_session_connect_attrs_size=# |
||
Option-File Format | performance_schema_session_connect_attrs_size
|
||
System Variable Name | performance_schema_session_connect_attrs_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | -1 (autosized) |
||
Range | -1 .. 1048576 |
The amount of preallocated memory per thread used to hold connection attribute strings. If the
connection attribute strings are larger than the reserved storage, the Performance_schema_session_connect_attrs_lost
status variable is
incremented. This variable was added in MySQL 5.6.7.
performance_schema_setup_actors_size
Introduced | 5.6.1 | ||
Command-Line Format | --performance_schema_setup_actors_size=# |
||
Option-File Format | performance_schema_setup_actors_size |
||
System Variable Name | performance_schema_setup_actors_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | 100 |
The number of rows in the setup_actors
table.
performance_schema_setup_objects_size
Introduced | 5.6.1 | ||
Command-Line Format | --performance_schema_setup_objects_size=# |
||
Option-File Format | performance_schema_setup_objects_size |
||
System Variable Name | performance_schema_setup_objects_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type | numeric |
||
Default | 100 |
The number of rows in the setup_objects
table.
Introduced | 5.6.3 | ||
Command-Line Format | --performance_schema_users_size=# |
||
Option-File Format | performance_schema_users_size |
||
System Variable Name | performance_schema_users_size
|
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values (<= 5.6.5) | |||
Type | numeric |
||
Default | 10 |
||
Range | 0 .. 1048576 |
||
Permitted Values (>= 5.6.6) | |||
Type | numeric |
||
Default | -1 (autosized) |
||
Range | -1 .. 1048576 |
The number of rows in the users
table. If this variable is 0, the Performance Schema does not
maintain connection statistics in the users
table. This variable was added in MySQL 5.6.3.