Use the fully asynchronous execution feature of PolarDB
This topic describes the features of the asynchronous execution architecture.
Prerequisites
To use the asynchronous authentication feature, your cluster must meet one of the following version requirements:
PolarDB for MySQL 8.0.2, revision 8.0.2.2.23 or later.
PolarDB for MySQL 8.0.1, revision 8.0.1.1.42 or later.
To use the asynchronous logging feature, your cluster must be PolarDB for MySQL 8.0.2, revision 8.0.2.2.29 or later.
Enabling the asynchronous execution feature for PolarDB for MySQL requires support from the Alibaba Cloud backend. To enable or configure this feature, join the DingTalk group 63840000309 for assistance.
Parameters
Parameter name | Level | Description |
loose_thread_pool_async_auth | Global | Specifies whether to enable the asynchronous authentication feature.
|
loose_thread_pool_async_switch | Global | Controls the scheduling of asynchronous task execution.
|
loose_thread_pool_ct_cache_size | Global | The number of asynchronous tasks to cache. A larger value can improve asynchronous execution performance but consumes more memory. Value range: 1 to 100000. Default value: 100. Unit: bytes. |
Asynchronous execution statistics
The information_schema.thread_pool_wait_status table has been added to collect statistics on wait events during SQL execution. This table contains the following fields:
Column | Description |
ID | The ID of the asynchronous execution group. |
WAIT_AUTH_HS_RESP | The number of connections for which authentication is being processed asynchronously. |
WAIT_REDO_LOG_FLUSH_ASYNC | The number of connections for which logs are being asynchronously flushed to disk. |
WAIT_ROW_LOCK_ASYNC | The number of connections waiting for row locks that are being processed asynchronously. |
Example
After you enable the async_redo_log_flush feature, you may see information similar to the following. This information indicates the current number of connections that are asynchronously waiting for logs to be flushed to disk.
