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 | -1 |
| performance_schema_digests_size | 10000 |
| performance_schema_error_size | 5377 |
| 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_transactions_history_long_size | 10000 |
| performance_schema_events_transactions_history_size | 10 |
| performance_schema_events_waits_history_long_size | 10000 |
| performance_schema_events_waits_history_size | 10 |
| performance_schema_hosts_size | -1 |
| performance_schema_max_cond_classes | 150 |
| performance_schema_max_cond_instances | -1 |
| performance_schema_max_digest_length | 1024 |
| performance_schema_max_digest_sample_age | 60 |
| performance_schema_max_file_classes | 80 |
| performance_schema_max_file_handles | 32768 |
| performance_schema_max_file_instances | -1 |
| performance_schema_max_index_stat | -1 |
| performance_schema_max_memory_classes | 470 |
| performance_schema_max_metadata_locks | -1 |
| performance_schema_max_meter_classes | 30 |
| performance_schema_max_metric_classes | 600 |
| performance_schema_max_mutex_classes | 350 |
| performance_schema_max_mutex_instances | -1 |
| performance_schema_max_prepared_statements_instances | -1 |
| performance_schema_max_program_instances | -1 |
| performance_schema_max_rwlock_classes | 100 |
| performance_schema_max_rwlock_instances | -1 |
| performance_schema_max_socket_classes | 10 |
| performance_schema_max_socket_instances | -1 |
| performance_schema_max_sql_text_length | 1024 |
| performance_schema_max_stage_classes | 175 |
| performance_schema_max_statement_classes | 220 |
| performance_schema_max_statement_stack | 10 |
| performance_schema_max_table_handles | -1 |
| performance_schema_max_table_instances | -1 |
| performance_schema_max_table_lock_stat | -1 |
| performance_schema_max_thread_classes | 100 |
| performance_schema_max_thread_instances | -1 |
| performance_schema_session_connect_attrs_size | 512 |
| performance_schema_setup_actors_size | -1 |
| performance_schema_setup_objects_size | -1 |
| performance_schema_show_processlist | OFF |
| performance_schema_users_size | -1 |
+----------------------------------------------------------+-------+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 29.13, “Performance Schema Option and Variable Reference”.
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 29.3, “Performance Schema Startup Configuration”.
Performance Schema system variables have the following meanings:
-
Command-Line Format --performance-schema[={OFF|ON}]System Variable performance_schemaScope Global Dynamic No SET_VARHint AppliesNo Type Boolean Default Value ONThe value of this variable is
ONorOFFto indicate whether the Performance Schema is enabled. By default, the value isON. At server startup, you can specify this variable with no value or a value ofONor 1 to enable it, or with a value ofOFFor 0 to disable it.Even when the Performance Schema is disabled, it continues to populate the
global_variables,session_variables,global_status, andsession_statustables. This occurs as necessary to permit the results for theSHOW VARIABLESandSHOW STATUSstatements to be drawn from those tables. The Performance Schema also populates some of the replication tables when disabled. performance_schema_accounts_sizeCommand-Line Format --performance-schema-accounts-size=#System Variable performance_schema_accounts_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The number of rows in the
accountstable. If this variable is 0, the Performance Schema does not maintain connection statistics in theaccountstable or status variable information in thestatus_by_accounttable.performance_schema_digests_sizeCommand-Line Format --performance-schema-digests-size=#System Variable performance_schema_digests_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The maximum number of rows in the
events_statements_summary_by_digesttable. If this maximum is exceeded such that a digest cannot be instrumented, the Performance Schema increments thePerformance_schema_digest_loststatus variable.For more information about statement digesting, see Section 29.10, “Performance Schema Statement Digests and Sampling”.
-
Command-Line Format --performance-schema-error-size=#System Variable performance_schema_error_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value number of server error codesMinimum Value 0Maximum Value 1048576The number of instrumented server error codes. The default value is the actual number of server error codes. Although the value can be set anywhere from 0 to its maximum, the intended use is to set it to either its default (to instrument all errors) or 0 (to instrument no errors).
Error information is aggregated in summary tables; see Section 29.12.20.11, “Error Summary Tables”. If an error occurs that is not instrumented, information for the occurrence is aggregated to the
NULLrow in each summary table; that is, to the row withERROR_NUMBER=0,ERROR_NAME=NULL, andSQLSTATE=NULL. performance_schema_events_stages_history_long_sizeCommand-Line Format --performance-schema-events-stages-history-long-size=#System Variable performance_schema_events_stages_history_long_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The number of rows in the
events_stages_history_longtable.performance_schema_events_stages_history_sizeCommand-Line Format --performance-schema-events-stages-history-size=#System Variable performance_schema_events_stages_history_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1024The number of rows per thread in the
events_stages_historytable.performance_schema_events_statements_history_long_sizeCommand-Line Format --performance-schema-events-statements-history-long-size=#System Variable performance_schema_events_statements_history_long_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The number of rows in the
events_statements_history_longtable.performance_schema_events_statements_history_sizeCommand-Line Format --performance-schema-events-statements-history-size=#System Variable performance_schema_events_statements_history_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1024The number of rows per thread in the
events_statements_historytable.performance_schema_events_transactions_history_long_sizeCommand-Line Format --performance-schema-events-transactions-history-long-size=#System Variable performance_schema_events_transactions_history_long_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The number of rows in the
events_transactions_history_longtable.performance_schema_events_transactions_history_sizeCommand-Line Format --performance-schema-events-transactions-history-size=#System Variable performance_schema_events_transactions_history_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1024The number of rows per thread in the
events_transactions_historytable.performance_schema_events_waits_history_long_sizeCommand-Line Format --performance-schema-events-waits-history-long-size=#System Variable performance_schema_events_waits_history_long_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The number of rows in the
events_waits_history_longtable.performance_schema_events_waits_history_sizeCommand-Line Format --performance-schema-events-waits-history-size=#System Variable performance_schema_events_waits_history_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1024The number of rows per thread in the
events_waits_historytable.-
Command-Line Format --performance-schema-hosts-size=#System Variable performance_schema_hosts_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The number of rows in the
hoststable. If this variable is 0, the Performance Schema does not maintain connection statistics in thehoststable or status variable information in thestatus_by_hosttable. performance_schema_max_cond_classesCommand-Line Format --performance-schema-max-cond-classes=#System Variable performance_schema_max_cond_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 150Minimum Value 0Maximum Value 1024The maximum number of condition instruments. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_cond_instancesCommand-Line Format --performance-schema-max-cond-instances=#System Variable performance_schema_max_cond_instancesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The maximum number of instrumented condition objects. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_digest_lengthCommand-Line Format --performance-schema-max-digest-length=#System Variable performance_schema_max_digest_lengthScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 1024Minimum Value 0Maximum Value 1048576Unit bytes The maximum number of bytes of memory reserved per statement for computation of normalized statement digest values in the Performance Schema. This variable is related to
max_digest_length; see the description of that variable in Section 7.1.8, “Server System Variables”.For more information about statement digesting, including considerations regarding memory use, see Section 29.10, “Performance Schema Statement Digests and Sampling”.
performance_schema_max_digest_sample_ageCommand-Line Format --performance-schema-max-digest-sample-age=#System Variable performance_schema_max_digest_sample_ageScope Global Dynamic Yes SET_VARHint AppliesNo Type Integer Default Value 60Minimum Value 0Maximum Value 1048576Unit seconds This variable affects statement sampling for the
events_statements_summary_by_digesttable. When a new table row is inserted, the statement that produced the row digest value is stored as the current sample statement associated with the digest. Thereafter, when the server sees other statements with the same digest value, it determines whether to use the new statement to replace the current sample statement (that is, whether to resample). Resampling policy is based on the comparative wait times of the current sample statement and new statement and, optionally, the age of the current sample statement:Resampling based on wait times: If the new statement wait time has a wait time greater than that of the current sample statement, it becomes the current sample statement.
Resampling based on age: If the
performance_schema_max_digest_sample_agesystem variable has a value greater than zero and the current sample statement is more than that many seconds old, the current statement is considered “too old” and the new statement replaces it. This occurs even if the new statement wait time is less than that of the current sample statement.
For information about statement sampling, see Section 29.10, “Performance Schema Statement Digests and Sampling”.
performance_schema_max_file_classesCommand-Line Format --performance-schema-max-file-classes=#System Variable performance_schema_max_file_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 80Minimum Value 0Maximum Value 1024The maximum number of file instruments. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_file_handlesCommand-Line Format --performance-schema-max-file-handles=#System Variable performance_schema_max_file_handlesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 32768Minimum Value 0Maximum Value 1048576The maximum number of opened file objects. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
The value of
performance_schema_max_file_handlesshould be greater than the value ofopen_files_limit:open_files_limitaffects the maximum number of open file handles the server can support andperformance_schema_max_file_handlesaffects how many of these file handles can be instrumented.performance_schema_max_file_instancesCommand-Line Format --performance-schema-max-file-instances=#System Variable performance_schema_max_file_instancesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The maximum number of instrumented file objects. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_index_statCommand-Line Format --performance-schema-max-index-stat=#System Variable performance_schema_max_index_statScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The maximum number of indexes for which the Performance Schema maintains statistics. If this maximum is exceeded such that index statistics are lost, the Performance Schema increments the
Performance_schema_index_stat_loststatus variable. The default value is autosized using the value ofperformance_schema_max_table_instances.performance_schema_max_memory_classesCommand-Line Format --performance-schema-max-memory-classes=#System Variable performance_schema_max_memory_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 470Default Value 450Minimum Value 0Maximum Value 1024The maximum number of memory instruments. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_metadata_locksCommand-Line Format --performance-schema-max-metadata-locks=#System Variable performance_schema_max_metadata_locksScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 10485760The maximum number of metadata lock instruments. This value controls the size of the
metadata_lockstable. If this maximum is exceeded such that a metadata lock cannot be instrumented, the Performance Schema increments thePerformance_schema_metadata_lock_loststatus variable.performance_schema_max_meter_classesCommand-Line Format --performance-schema-max-meter-classes=#System Variable performance_schema_max_meter_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 30Minimum Value 0Maximum Value 64Maximum number of meter instruments which can be created
performance_schema_max_metric_classesCommand-Line Format --performance-schema-max-metric-classes=#System Variable performance_schema_max_metric_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 600Minimum Value 30Maximum Value 11000Maximum number of metric instruments which can be created.
performance_schema_max_mutex_classesCommand-Line Format --performance-schema-max-mutex-classes=#System Variable performance_schema_max_mutex_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 350Minimum Value 0Maximum Value 1024The maximum number of mutex instruments. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_mutex_instancesCommand-Line Format --performance-schema-max-mutex-instances=#System Variable performance_schema_max_mutex_instancesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 104857600The maximum number of instrumented mutex objects. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_prepared_statements_instancesCommand-Line Format --performance-schema-max-prepared-statements-instances=#System Variable performance_schema_max_prepared_statements_instancesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 4194304The maximum number of rows in the
prepared_statements_instancestable. If this maximum is exceeded such that a prepared statement cannot be instrumented, the Performance Schema increments thePerformance_schema_prepared_statements_loststatus variable. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.The default value of this variable is autosized based on the value of the
max_prepared_stmt_countsystem variable.performance_schema_max_rwlock_classesCommand-Line Format --performance-schema-max-rwlock-classes=#System Variable performance_schema_max_rwlock_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 100Minimum Value 0Maximum Value 1024The maximum number of rwlock instruments. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_program_instancesCommand-Line Format --performance-schema-max-program-instances=#System Variable performance_schema_max_program_instancesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The maximum number of stored programs for which the Performance Schema maintains statistics. If this maximum is exceeded, the Performance Schema increments the
Performance_schema_program_loststatus variable. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.performance_schema_max_rwlock_instancesCommand-Line Format --performance-schema-max-rwlock-instances=#System Variable performance_schema_max_rwlock_instancesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autosizing; do not assign this literal value)Maximum Value 104857600The maximum number of instrumented rwlock objects. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_socket_classesCommand-Line Format --performance-schema-max-socket-classes=#System Variable performance_schema_max_socket_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 10Minimum Value 0Maximum Value 1024The maximum number of socket instruments. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_socket_instancesCommand-Line Format --performance-schema-max-socket-instances=#System Variable performance_schema_max_socket_instancesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The maximum number of instrumented socket objects. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_sql_text_lengthCommand-Line Format --performance-schema-max-sql-text-length=#System Variable performance_schema_max_sql_text_lengthScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 1024Minimum Value 0Maximum Value 1048576Unit bytes The maximum number of bytes used to store SQL statements. The value applies to storage required for these columns:
The
SQL_TEXTcolumn of theevents_statements_current,events_statements_history, andevents_statements_history_longstatement event tables.The
QUERY_SAMPLE_TEXTcolumn of theevents_statements_summary_by_digestsummary table.
Any bytes in excess of
performance_schema_max_sql_text_lengthare discarded and do not appear in the column. Statements differing only after that many initial bytes are indistinguishable in the column.Decreasing the
performance_schema_max_sql_text_lengthvalue reduces memory use but causes more statements to become indistinguishable if they differ only at the end. Increasing the value increases memory use but permits longer statements to be distinguished.performance_schema_max_stage_classesCommand-Line Format --performance-schema-max-stage-classes=#System Variable performance_schema_max_stage_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 175Minimum Value 0Maximum Value 1024The maximum number of stage instruments. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_statement_classesCommand-Line Format --performance-schema-max-statement-classes=#System Variable performance_schema_max_statement_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Minimum Value 0Maximum Value 256The maximum number of statement instruments. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
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.
performance_schema_max_statement_stackCommand-Line Format --performance-schema-max-statement-stack=#System Variable performance_schema_max_statement_stackScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 10Minimum Value 1Maximum Value 256The maximum depth of nested stored program calls for which the Performance Schema maintains statistics. When this maximum is exceeded, the Performance Schema increments the
Performance_schema_nested_statement_loststatus variable for each stored program statement executed.performance_schema_max_table_handlesCommand-Line Format --performance-schema-max-table-handles=#System Variable performance_schema_max_table_handlesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The maximum number of opened table objects. This value controls the size of the
table_handlestable. If this maximum is exceeded such that a table handle cannot be instrumented, the Performance Schema increments thePerformance_schema_table_handles_loststatus variable. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.performance_schema_max_table_instancesCommand-Line Format --performance-schema-max-table-instances=#System Variable performance_schema_max_table_instancesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The maximum number of instrumented table objects. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_table_lock_statCommand-Line Format --performance-schema-max-table-lock-stat=#System Variable performance_schema_max_table_lock_statScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The maximum number of tables for which the Performance Schema maintains lock statistics. If this maximum is exceeded such that table lock statistics are lost, the Performance Schema increments the
Performance_schema_table_lock_stat_loststatus variable.performance_schema_max_thread_classesCommand-Line Format --performance-schema-max-thread-classes=#System Variable performance_schema_max_thread_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 100Minimum Value 0Maximum Value 1024The maximum number of thread instruments. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.
performance_schema_max_thread_instancesCommand-Line Format --performance-schema-max-thread-instances=#System Variable performance_schema_max_thread_instancesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The maximum number of instrumented thread objects. The value controls the size of the
threadstable. If this maximum is exceeded such that a thread cannot be instrumented, the Performance Schema increments thePerformance_schema_thread_instances_loststatus variable. For information about how to set and use this variable, see Section 29.7, “Performance Schema Status Monitoring”.The
max_connectionssystem variable affects how many threads can run in the server.performance_schema_max_thread_instancesaffects how many of these running threads can be instrumented.The
variables_by_threadandstatus_by_threadtables contain system and status variable information only about foreground threads. If not all threads are instrumented by the Performance Schema, this table misses some rows. In this case, thePerformance_schema_thread_instances_loststatus variable is greater than zero.performance_schema_session_connect_attrs_sizeCommand-Line Format --performance-schema-session-connect-attrs-size=#System Variable performance_schema_session_connect_attrs_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autosizing; do not assign this literal value)Minimum Value -1(signifies autosizing; do not assign this literal value)Maximum Value 1048576Unit bytes The amount of preallocated memory per thread reserved to hold connection attribute key-value pairs. If the aggregate size of connection attribute data sent by a client is larger than this amount, the Performance Schema truncates the attribute data, increments the
Performance_schema_session_connect_attrs_loststatus variable, and writes a message to the error log indicating that truncation occurred if thelog_error_verbositysystem variable is greater than 1. A_truncatedattribute is also added to the session attributes with a value indicating how many bytes were lost, if the attribute buffer has sufficient space. This enables the Performance Schema to expose per-connection truncation information in the connection attribute tables. This information can be examined without having to check the error log.The default value of
performance_schema_session_connect_attrs_sizeis autosized at server startup. This value may be small, so if truncation occurs (Performance_schema_session_connect_attrs_lostbecomes nonzero), you may wish to setperformance_schema_session_connect_attrs_sizeexplicitly to a larger value.Although the maximum permitted
performance_schema_session_connect_attrs_sizevalue is 1MB, the effective maximum is 64KB because the server imposes a limit of 64KB on the aggregate size of connection attribute data it accepts. If a client attempts to send more than 64KB of attribute data, the server rejects the connection. For more information, see Section 29.12.9, “Performance Schema Connection Attribute Tables”.performance_schema_setup_actors_sizeCommand-Line Format --performance-schema-setup-actors-size=#System Variable performance_schema_setup_actors_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autosizing; do not assign this literal value)Maximum Value 1048576The number of rows in the
setup_actorstable.performance_schema_setup_objects_sizeCommand-Line Format --performance-schema-setup-objects-size=#System Variable performance_schema_setup_objects_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The number of rows in the
setup_objectstable.performance_schema_show_processlistCommand-Line Format --performance-schema-show-processlist[={OFF|ON}]Deprecated Yes System Variable performance_schema_show_processlistScope Global Dynamic Yes SET_VARHint AppliesNo Type Boolean Default Value OFFThe
SHOW PROCESSLISTstatement provides process information by collecting thread data from all active threads. Theperformance_schema_show_processlistvariable determines whichSHOW PROCESSLISTimplementation to use:The default implementation iterates across active threads from within the thread manager while holding a global mutex. This has negative performance consequences, particularly on busy systems.
The alternative
SHOW PROCESSLISTimplementation is based on the Performance Schemaprocesslisttable. This implementation queries active thread data from the Performance Schema rather than the thread manager and does not require a mutex.
To enable the alternative implementation, enable the
performance_schema_show_processlistsystem variable. To ensure that the default and alternative implementations yield the same information, certain configuration requirements must be met; see Section 29.12.22.9, “The processlist Table”.-
Command-Line Format --performance-schema-users-size=#System Variable performance_schema_users_sizeScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value -1(signifies autoscaling; do not assign this literal value)Minimum Value -1(signifies autoscaling; do not assign this literal value)Maximum Value 1048576The number of rows in the
userstable. If this variable is 0, the Performance Schema does not maintain connection statistics in theuserstable or status variable information in thestatus_by_usertable. performance_schema_max_logger_classesCommand-Line Format --performance_schema_max_logger_classes[=value]System Variable performance_schema_max_logger_classesScope Global Dynamic No SET_VARHint AppliesNo Type Integer Default Value 80Minimum Value 0Maximum Value 200The value indicates the maximum number of logger client instruments that can be created. Modifying this setting requires server restart.