# MySQL 8.0

This page describes the Optimization Pack for the component type MySQL 8.0.

## Metrics

### Query

| Metric                            | Unit         | Description                                                                                                                          |
| --------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| mysql\_aborted\_connection        | connections  | The number of failed attempts to connect to the MySQL                                                                                |
| mysql\_connections\_current       | connections  | The current number of connection opened towards MySql                                                                                |
| mysql\_connections\_max           | connections  | The maximum number of connections that can be opened towards MySQL                                                                   |
| mysql\_innodb\_buffer\_pool\_size | bytes        | The size of the memory area where InnoDB caches tables and indexes                                                                   |
| mysql\_mem\_usage                 | bytes        | MySQL instance memory consumption divided by type (innodb\_buffer\_pool\_data, innodb\_log\_buffer, query\_cache, key\_buffer\_size) |
| mysql\_query\_throughput          | queries/s    | The number of queries per second processed by mysql                                                                                  |
| mysql\_slow\_query\_rate          | querys/s     | The rate of queries that are considered slow based on parameters mysql\_long\_query\_time and mysql\_long\_query\_min\_examined\_row |
| mysql\_statements\_rate           | statements/s | The rate at which each type of statement (select, insert, update, delete) executed per second.                                       |
| mysql\_threads\_running           | threads      | The number of threads running in the MySQL instance                                                                                  |
| mysql\_transactions\_rate         | transactions | The rate at which each type of transaction (handler label) is executed (commit. rollback, prepare, savepoint)                        |
| network\_in\_bytes\_rate          | bytes/s      | The number of network inbound data in bytes per second                                                                               |
| network\_out\_bytes\_rate         | bytes/s      | The number of network outbound data in bytes per second                                                                              |

## Parameters

### InnoDB

| Parameter                              | Type    | Unit         | Default value | Domain                                                                                                                                                                                                  | Description                                                                                                                                    | Restart |
| -------------------------------------- | ------- | ------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| mysql\_innodb\_buffer\_pool\_size      | integer | bytes        | `134217728`   | `5242880` → `25769803776`                                                                                                                                                                               | The size of the buffer pool used by InnoDB to cache tables and indexes in memory                                                               | no      |
| mysql\_innodb\_buffer\_pool\_instances | integer | regions      | `8`           | `1`→`64`                                                                                                                                                                                                | The number of regions that the InnoDB buffer pool is divided into                                                                              | no      |
| mysql\_innodb\_thread\_sleep\_delay    | integer | milliseconds | `10000`       | `0` → `1000000`                                                                                                                                                                                         | The number of milliseconds each InnoDB thread sleeps before joining the InnoDB queue                                                           | no      |
| mysql\_innodb\_flush\_method           | string  | -            | `fsync`       | <ul><li><code>fsync</code></li><li><code>O\_DSYNC</code></li><li><code>littlesync</code></li><li><code>nosyn</code>c</li><li><code>O\_DIRECT</code></li><li><code>O\_DIRECT\_NO\_FSYNC</code></li></ul> | The method used to flush data to InnoDB's datafiles and log files                                                                              | yes     |
| mysql\_innodb\_log\_file\_size         | integer | bytes        | `50331648`    | `4194304` →`5368709120`                                                                                                                                                                                 | The size of each log file in each log group maintained by InnoDB. The total size of log files cannot exceed 4GB.                               | yes     |
| mysql\_innodb\_thread\_concurrency     | integer | threads      | `0`           | `0` → `1000`                                                                                                                                                                                            | The limit on the number of os threads used by InnoDB to serve user requests                                                                    | no      |
| mysql\_innodb\_max\_dirty\_pages\_pct  | real    | percentage   | `10.0`        | `0.0` → `99.99`                                                                                                                                                                                         | The limit on the percentage of dirty pages in the buffer pool of InnoDB                                                                        | no      |
| mysql\_innodb\_read\_ahead\_threshold  | integer | pages        | `56`          | `0` → `64`                                                                                                                                                                                              | The number of sequentially read pages after which MySQL initiates an async read of the following extend (a group of pages within a tablespace) | no      |
| mysql\_innodb\_adaptive\_hash\_index   |         | -            | `ON`          | <ul><li><code>ON</code></li><li><code>OFF</code></li></ul>                                                                                                                                              | Whether or not enable the adaptive hash index optimization for InnoDB tables                                                                   | no      |
| mysql\_innodb\_fill\_factor            | integer | percentage   | `100`         | `10`→`100`                                                                                                                                                                                              | The percentage of each B-tree page that is filled during a sorted index build                                                                  | no      |

## Constraints

There are no constraints related to the component type MySQL 8.0.
