> For the complete documentation index, see [llms.txt](https://docs.cennso.com/cennso/cennso-db/latest/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/cennso/cennso-db/latest/observability/dashboard.md).

# Grafana dashboard

Grafana dashboard for Cennso Database helps you visualize and analyze data based on the [metrics](https://docs.cennso.com/cennso/cennso-db/latest/observability/metrics.md) that it exposes. By default, the Cennso Database dashboard is pre-configured with the following sections:

- [MySQL instances information](#mysql-instances-information)
- [MySQL connections and threads](#mysql-connections-and-threads)
- [Locks](#locks)
- [Temporary objects](#temporary-objects)
- [MySQL tables and files](#mysql-tables-and-files)
- [Command, handlers, processes, and queries](#command-handlers-processes-and-queries)
- [Replication](#replication)
- [MySQL checkpoint and flush operations](#mysql-checkpoint-and-flush-operations)
- [CPU and memory usage](#cpu-and-memory-usage)
- [Disks and I/O](#disks-and-io)
- [HAProxy CPU and memory usage](#haproxy-cpu-and-memory-usage)

Read the sections below to learn what information you can get from each Grafana dashboard panel.

## Dashboard variables

Use the dropdowns at the top of the dashboard to choose which data the panels show:

- **Datasource** - the Prometheus data source that stores the Cennso Database metrics. All panels use the data source selected here.
- **ClusterName** - the Kubernetes cluster that runs the MySQL instances
- **Namespace** - the Kubernetes namespace with the MySQL instances
- **MySQL Instance** - one or more MySQL instances, or `All`

## MySQL instances information

This section shows information about MySQL instances, including:

- Uptime for each MySQL instance, showing how long the MySQL server has been running since its last restart
- MySQL instance roles, either `primary` or `replica`
- [Current QPS](#current-qps) - the number of statements that the MySQL server executes per second (queries per second)
- [InnoDB buffer pool](#innodb-buffer-pool) - the size of the memory area where MySQL caches table and index data

![MySQL instances information section](https://docs.cennso.com/api/assets/cennso/cennso-db/latest/assets/dashboard/instances-info.png)

### Current QPS

The **Current QPS** panel shows the number of queries executed per second (QPS) by the MySQL server. The panel provides a real-time view of database activity, showing how the database is loaded, how many queries are executed, and any drops in query volume.

> [!IMPORTANT]
> This panel shows the general number of queries executed by the MySQL server, not just those initiated by client applications. For a more accurate measure of client-initiated workload, see the [MySQL questions](#mysql-questions) panel.

This metric is calculated from the [`Queries`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Queries) status variable, which you can view using the [`SHOW STATUS`](https://dev.mysql.com/doc/refman/8.0/en/show-status.html) command. The `Queries` variable counts all statements executed by the server, including those run within stored procedures and functions. Unlike the `Questions` variable, `Queries` includes internal statements and those triggered by stored programs.

Use this panel to:

- Monitor overall query throughput and detect periods of high or low activity.
- Correlate QPS changes with application events or performance issues.
- Assess whether the server is handling expected workloads or experiencing abnormal query rates.

A consistently high QPS may indicate heavy application usage, batch processing, or inefficient queries. Sudden drops may signal application errors or connectivity issues.

### InnoDB buffer pool

The **InnoDB buffer pool** panel shows the current size and usage of the InnoDB buffer pool, which is a dedicated memory area used by MySQL to cache table and index data for InnoDB tables. The buffer pool is critical for performance, as it reduces disk I/O by keeping frequently accessed data in memory.

Monitoring buffer pool usage helps you determine if the current size is sufficient. If the buffer pool is often full and the cache hit ratio is low, your server may be under memory pressure. In such a case, increasing the buffer pool size (if possible) can improve performance.

> [!IMPORTANT]
> On dedicated database servers, allocating `60–90%` of total system memory to the buffer pool is generally recommended.

For more details, refer to the [InnoDB buffer pool documentation](https://dev.mysql.com/doc/refman/8.0/en/innodb-buffer-pool-resize.html).

## MySQL connections and threads

This section shows information about MySQL connections and threads, including:

- [MySQL connections](#mysql-connections) - the number of client connections, the highest number of connections used at the same time, and the connection limit of the server
- MySQL client thread activity, which includes:
   - [`Threads Connected`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Threads_connected) - the number of open connections
   - [`Threads Running`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Threads_running) - the number of threads that are currently running a query, not waiting idle for the next one from the client
- Number of aborted connections
- Number of threads the MySQL server can cache to handle client connections. This includes:
   - [`Threads_created`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Threads_created) - the number of threads created to handle connections
   - [`Threads_cached`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Threads_cached) - the number of threads in the thread cache
   - When a client disconnects, the client's threads are put in the cache if the cache is not full.
- Amount of MySQL network traffic that MySQL server generates and receives:
   - `Outbound` is network traffic sent from MySQL.
   - `Inbound` is network traffic MySQL received.

![MySQL connections and threads section](https://docs.cennso.com/api/assets/cennso/cennso-db/latest/assets/dashboard/connections-threads.png)

### MySQL connections

The **MySQL connections** panel shows the following metrics:

- **Connections** - the total number of connections to the MySQL server. A high or rapidly increasing or decreasing value may indicate application issues, connection leaks, or brute-force attempts.
- **Max Used Connections** - the highest number of connections that were used at the same time since the server started. This metric helps you assess whether your current [`max_connections`](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_max_connections) setting is sufficient. If this value approaches the maximum, you may need to increase the limit or investigate connection usage patterns.
- **Max Connections** - the maximum number of simultaneous client connections permitted by the MySQL server. By default, this value is `400`, but you can change it using the `max_connections` parameter. Increasing this value allows more clients to connect concurrently but also increases the number of file descriptors required by the MySQL server instance. If the system cannot provide enough file descriptors, MySQL will automatically reduce this limit. If the number of concurrent connections reaches the maximum, new connection attempts will be refused until existing connections are closed.

Use this panel to:

- Monitor the gap between **Max Used Connections** and **Max Connections**. If the gap is small, consider increasing the limit or optimizing application connection handling.
- Watch for sudden changes in **Connections**, which may signal application errors  or security issues.
- Correlate connection usage with application deployments, traffic patterns, or incidents.

> [!NOTE]
> MySQL actually permits `max_connections + 1` clients to connect. The extra connection is reserved for accounts with the `SUPER` privilege (such as `root`), allowing privileged users to connect for troubleshooting even when the server is otherwise full.

## Locks

The **Locks** section provides information about MySQL locking behavior. It can help you identify contention, bottlenecks, and concurrency issues that can impact database performance. Monitoring these metrics is crucial for diagnosing slow queries, deadlocks, and application stalls. The section includes the following panels:

- [MySQL table locks](#mysql-table-locks) - how many table locks MySQL grants right away and how many have to wait
- [InnoDB row-lock events](#innodb-row-lock-events) - how often transactions wait because another transaction has locked the row they need
- [InnoDB row-lock wait time](#innodb-row-lock-wait-time) - how much time transactions spend waiting for row locks

![Locks section](https://docs.cennso.com/api/assets/cennso/cennso-db/latest/assets/dashboard/locks.png)

> [!NOTE]
> In InnoDB, most locks are row-level, which allows for greater concurrency. Table-level locks are less common but may be frequent during schema changes.

### MySQL table locks

The **MySQL table locks** panel shows how many table-level locks MySQL has requested from the storage engine.

Use this panel to compare [`Table_locks_immediate`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Table_locks_immediate) (granted instantly) and [`Table_locks_waited`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Table_locks_waited) (had to wait). Rising `Locks Waited` values show lock contention, which slows down queries and causes application delays. Small increases in table locks during DDL or maintenance are normal, but constantly rising values need investigation.

### InnoDB row-lock events

The **Row lock waits** panel shows the rate of row-level lock wait events in InnoDB. It is calculated from the cumulative [`Innodb_row_lock_waits`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Innodb_row_lock_waits) counter and represents how many times per second transactions are forced to wait because a row is already locked by another transaction.

High or rising values may indicate:

- Hot rows or indexes being updated frequently
- Missing or inefficient indexes causing large lock ranges
- Long-running or stalled transactions holding row locks
- Batch jobs or maintenance tasks colliding with the regular application traffic

### InnoDB row-lock wait time

The **Row lock waits [ms]** panel shows how much time transactions spend waiting for InnoDB row locks, calculated from the [`Innodb_row_lock_time`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Innodb_row_lock_time) counter. The values are in milliseconds per second, summed over all waiting transactions: for example, `500` means that transactions waited for row locks for half a second in total during each second. If many transactions wait at the same time, the value can be higher than `1000`. The panel does not show how long a single wait takes.

Higher values indicate increased transaction contention, long-running transactions, or hot rows/tables causing concurrent clients to wait for locks. Consistently high values may mean:

- Write hotspots or missing indexes
- Long transactions holding row locks
- Slow replication or batch jobs competing with the regular application traffic

## Temporary objects

The **Temporary objects** section shows the rate at which MySQL creates temporary tables and files during query execution:

- **Temporary tables** are often created when queries require sorting, grouping, or joining large datasets, especially if indexes are missing or queries are complex.
- **Temporary files** are used when temporary tables exceed the configured memory limit and must be written to disk, which is slower and can increase I/O load.

![Temporary objects section](https://docs.cennso.com/api/assets/cennso/cennso-db/latest/assets/dashboard/temporary-objects.png)

Monitoring this metric helps you identify inefficient queries, memory limitations, or schema design issues that may impact performance. High or rising values in this panel may indicate:

- Queries that frequently require sorting or grouping without proper indexes
- JOIN operations on large tables
- Insufficient memory allocation for temporary tables (see [`tmp_table_size`](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_tmp_table_size) and [`max_heap_table_size`](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_max_heap_table_size))
- Queries that generate many intermediate results

A consistently high rate of temporary objects may signal the need for query optimization or increased memory allocation.

## MySQL tables and files

This section shows how MySQL opens tables and files and how well it reuses the ones that are already open, including:

- Number of opened tables by the MySQL instance and the number of tables in the table cache
- State of the MySQL table open cache
- [MySQL file openings](#mysql-file-openings) - how often MySQL opens files instead of reusing the files that are already open
- Number of currently open MySQL file descriptors
- State of MySQL table definition cache

![MySQL tables and files section](https://docs.cennso.com/api/assets/cennso/cennso-db/latest/assets/dashboard/tables-files.png)

### MySQL file openings

The **MySQL file openings** graphic shows how frequently MySQL opens new file descriptors.

It is calculated from the cumulative [`Opened_files`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Opened_files) status counter and represents the number of file open operations per second over the selected time window.

A high or rising value usually indicates that MySQL is repeatedly opening a table, an index, or temporary files instead of reusing cached file handles. This can be a sign of:

- The [`open_files_limit`](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_open_files_limit) is too low
- The [`table_open_cache`](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_table_open_cache) or [`table_definition_cache`](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_table_definition_cache) are low
- Frequent creation of temporary tables on disk

## Command, handlers, processes, and queries

The **Command, handlers, processes, and queries** section provides insights into MySQL query execution and server activity, including:

- Top command counters - shows the number of times each statement has been executed
- Statistics of MySQL handlers
- Statistics of MySQL transaction handlers
- [MySQL select types](#mysql-select-types) - the number of queries that read whole tables or join tables without using indexes
- [MySQL sorts](#mysql-sorts) - the number of sorts that MySQL could not do using an index
- [MySQL questions](#mysql-questions) - the number of statements sent by client applications
- Number of MySQL slow queries (queries slower than the [`long_query_time`](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_long_query_time) setting)

![Command, handlers, processes, and queries section](https://docs.cennso.com/api/assets/cennso/cennso-db/latest/assets/dashboard/commands.png)

Monitoring these metrics helps you understand query characteristics and patterns, identify performance bottlenecks, and optimize query execution.

### MySQL select types

As with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. This graphic shows the counters for potentially inefficient query patterns that are not optimized with indexes, including:

- [`Select_scan`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Select_scan) - shows how many queries caused full table scans, in which all data in the table had to be read and either discarded or returned. High values may indicate missing indexes or queries that cannot use indexes efficiently.
- [`Select_range`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Select_range) - shows how many queries used a range scan, which means MySQL scanned all rows in a given range. While less efficient than index lookups, range scans are acceptable for many operations.
- [`Select_full_join`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Select_full_join) - shows the number of joins that are not joined on an index. Without index support, MySQL must match rows across multiple tables, causing high CPU and memory usage.

High or constantly rising values suggest that you should review the queries generating these inefficient selects and consider adding indexes to optimize them.

### MySQL sorts

MySQL sorts query results when an `ORDER BY` clause is used without a suitable index, or when operations like `GROUP BY` or `DISTINCT` require sorting. This panel shows the following metrics:

- `Sort Scan` - sorts that required a full table scan to retrieve the rows before sorting them. These are typically slower as MySQL must read all table data.
- `Sort Range` - sorts that used a range scan (reading a subset of rows based on an index range) before sorting. These are more efficient than full scans but still require sorting.
- `Sort Rows` - the number of rows sorted per second. Unlike the other metrics, it counts rows, not sorts, so its values are usually much higher.
- `Sort Merge Passes` - extra passes that MySQL needs when the rows of a sort do not fit into the memory set by the [`sort_buffer_size`](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_sort_buffer_size) parameter. MySQL then sorts the rows in parts on disk and merges them, which is much slower. This value should stay close to `0`.

`Sort Scan` and `Sort Range` show sorts that could not be performed using an index alone and required MySQL to use its internal sorting algorithm (filesort).

High or rising values may indicate:

- Missing indexes on columns used in `ORDER BY`, `GROUP BY`, `WHERE`, or `DISTINCT` clauses
- Queries that sort large result sets without appropriate index coverage
- Insufficient [`sort_buffer_size`](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_sort_buffer_size) configuration, if `Sort Merge Passes` keeps rising
- Complex sorting requirements that cannot be satisfied by existing indexes

Frequent sort operations can impact performance, especially when sorting large datasets. Consider adding indexes on sorted columns or optimizing query patterns to reduce unnecessary sorting.

### MySQL questions

The **MySQL questions** panel shows the rate of client-initiated statements executed by the MySQL server. It is calculated from the [`Questions`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Questions) status variable, which counts only statements sent directly to the server by client applications.

Unlike the [`Queries`](https://dev.mysql.com/doc/refman/8.0/en/server-status-variables.html#statvar_Queries) metric used in the [QPS calculation](#current-qps), `Questions` excludes statements executed within stored procedures, stored functions, and triggers. This makes it a more accurate measure of application-level workload.

The `Questions` variable also excludes the following protocol-level commands:

- `COM_PING` - connection health checks
- `COM_STATISTICS` - server statistics requests
- `COM_STMT_PREPARE` - prepared statement preparation
- `COM_STMT_CLOSE` - prepared statement cleanup
- `COM_STMT_RESET` - prepared statement reset

Use this panel to:

- Monitor client-initiated statement rates and identify changes in application query patterns
- Compare with the QPS metric to understand the proportion of statements from stored programs versus direct client queries
- Detect sudden drops or spikes that may indicate application issues or deployment changes
- Establish baseline workload patterns for capacity planning

A consistently high rate may indicate heavy application usage or inefficient query patterns. Sudden changes often correlate with application deployments, configuration changes, or connection pool adjustments.

## Replication

The **Replication** section provides information about MySQL replication status and performance. Monitoring these metrics helps you ensure data consistency between primary and replica instances and identify replication issues before they impact your application.

This section includes the following metrics:

- **Replica SQL thread running** - indicates whether the replica SQL thread is actively applying events from the relay log:
   - `1` means the replica is executing changes and replication is active
   - `0` means the SQL thread has stopped, indicating replication is blocked or intentionally stopped. Data is no longer applied to the replica, and it will be behind the primary.
- **Replication lag** - measures the time delay (in seconds) between when a transaction was committed on the primary and when it was applied on the replica. This is one of the most important replication metrics. Low lag (< 1 second) is ideal. High or rising lag indicates the replica cannot keep up with the primary and may signal:
   - Heavy write load on the primary exceeding replica processing capacity
   - Slow queries or long-running transactions on the replica
   - Resource constraints (CPU, disk I/O, or network) on the replica
   - Single-threaded replication unable to match multi-threaded primary writes
- **Relay log size** - shows the total size of [relay log](https://dev.mysql.com/doc/refman/8.0/en/replica-logs-relaylog.html) files on the replica. The relay log stores replication events received from the primary before they are applied. Large relay log sizes may indicate the replica is falling behind or has accumulated many unapplied changes.
- **Binlog size** - shows the total size of [binary log](https://dev.mysql.com/doc/refman/8.0/en/binary-log.html) files. The binary log records all changes to the database and is essential for replication and point-in-time recovery. Continuously growing binlog size is normal, but unusually rapid growth may indicate heavy write activity or missing binlog rotation/purging policies.

![Replication section](https://docs.cennso.com/api/assets/cennso/cennso-db/latest/assets/dashboard/replication.png)

Use this section to:

- Verify that replication is active and the SQL thread is running
- Monitor replication lag to ensure replicas stay synchronized with the primary
- Detect replication delays that could affect read queries on replicas
- Identify when relay logs accumulate, potentially indicating replication bottlenecks
- Track binlog growth for capacity planning and backup strategies

## MySQL checkpoint and flush operations

The **MySQL checkpoint and flush operations** section provides insights into InnoDB's write and durability mechanisms. These metrics help you understand how efficiently MySQL is writing data to disk, managing the redo log, and maintaining data consistency. Monitoring these operations is crucial for identifying I/O bottlenecks, preventing write stalls, and ensuring optimal database performance.

This section includes the following metrics:

- **Checkpoint age** - shows the current checkpoint age and maximum checkpoint age for MySQL instances. InnoDB records every change in the redo log on disk right away, but writes the changed data pages from memory to the data files later. Checkpoint age is the amount of redo log written since the oldest change that is not in the data files yet. InnoDB can reuse the redo log space only after these pages are written, so when checkpoint age approaches the maximum, InnoDB slows down or stops writes until it has written enough pages to disk. Consistently high checkpoint age may indicate:
   - Heavy write workload exceeding disk I/O capacity
   - Insufficient [`innodb_log_file_size`](https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_log_file_size) configuration
   - Slow checkpointing due to I/O constraints
- **FSYNC operations for data** - shows the rate of `fsync(2)` system calls for MySQL data files. These operations ensure that modified data pages are physically written to disk, providing durability. Higher rates indicate frequent data file synchronization, which may be normal under heavy write loads but can also signal I/O pressure.
- **FSYNC operations for log** - shows the rate of `fsync(2)` system calls for the MySQL redo log. These operations are critical for transaction durability, as they ensure committed transactions are safely stored on disk.
- **Pending fsync operations for MySQL data** - shows the number of pending fsync operations for InnoDB data files. High values indicate that fsync requests are queuing up, which may suggest:
   - Disk I/O saturation or slow storage
   - Heavy concurrent write activity
   - Need for faster storage or I/O tuning
- **Pending fsync operations for MySQL redo log** - shows the number of pending fsync operations for the InnoDB redo log. Accumulated pending operations can cause transaction commit delays and indicate that the storage system cannot keep up with the log write rate.
- **MySQL redo log backlog** - shows the distance (in bytes) between the current redo log generation point (where new log entries are written) and the last durable point (what has been flushed to disk). A growing backlog indicates that redo log writes are outpacing disk flushes. This can cause performance degradation or write stalls.
- **Dirty pages** - shows the number of dirty pages in the InnoDB buffer pool. Dirty pages are modified data pages that exist in memory but have not yet been written to disk. A high or growing number of dirty pages may indicate:
   - Heavy write activity
   - Insufficient buffer pool flushing capacity
   - Risk of checkpoint stalls if dirty pages cannot be flushed quickly enough

![MySQL checkpoint and flush operations section](https://docs.cennso.com/api/assets/cennso/cennso-db/latest/assets/dashboard/checkpoint-operations.png)

Use this section to:

- Monitor InnoDB's write and flush patterns to ensure smooth write operations
- Detect I/O bottlenecks that may cause transaction delays or performance degradation
- Identify when checkpoint age approaches critical levels, potentially causing write throttling
- Assess whether storage performance is adequate for current write workloads

> [!NOTE]
> For write-intensive workloads, properly sized redo logs and sufficient I/O capacity are essential. If checkpoint age frequently approaches the maximum, consider increasing `innodb_log_file_size` or improving storage performance.

## CPU and memory usage

The **CPU and memory usage** section provides insights into resource consumption by MySQL instances. These metrics help you identify resource constraints, optimize memory allocation, and ensure the server has sufficient capacity to handle workloads efficiently. Monitoring CPU and memory usage is essential for capacity planning and preventing performance degradation.

This section includes the following metrics:

- **CPU usage** - shows how many CPU cores MySQL instances use. High CPU usage may indicate compute-intensive queries, missing indexes, inefficient query plans, or high transaction throughput. Sustained high CPU usage can slow down query execution and impact overall performance.
- **Memory usage (WS + RSS + Cache)** - shows the memory of the `mysql` container, including:
   - **WS (Working Set)** - the memory that Kubernetes counts against the limit
   - **RSS (Resident Set Size)** - the memory of the MySQL server process, including the InnoDB buffer pool
   - **Cache** - the page cache of the container, which holds recently read and written files and can be released if needed
   - **Limit** - the memory limit of the container

   High memory usage is often normal for database servers, as MySQL caches data to reduce disk I/O. However, when the working set reaches the limit, Kubernetes kills the container with the `OOMKilled` reason.
- [**MySQL internal memory overview**](#mysql-internal-memory-overview) - breakdown of key MySQL memory buffers and their usage.

![CPU and memory usage section](https://docs.cennso.com/api/assets/cennso/cennso-db/latest/assets/dashboard/cpu-memory.png)

Use this section to:

- Monitor resource usage trends and identify capacity constraints
- Detect CPU spikes correlating with specific queries or workload patterns
- Assess whether memory allocation is appropriate for workload requirements
- Plan for scaling or optimization based on resource consumption patterns

### MySQL internal memory overview

The **MySQL internal memory overview** shows the allocation of key memory buffers used by MySQL:

- **InnoDB Buffer Pool Data** - the primary memory cache for InnoDB table data and indexes. This is typically the largest memory allocation in MySQL and directly impacts read performance. A larger buffer pool reduces disk I/O by keeping frequently accessed data in memory. See the [InnoDB buffer pool](#innodb-buffer-pool) for more details.
- **Key Buffer Size** - memory allocated for caching MyISAM table indexes. Controlled by the [`key_buffer_size`](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_key_buffer_size) parameter, this buffer is shared across all threads. For InnoDB-only workloads, this value can remain small. For MyISAM tables, increasing this buffer improves index read performance.
- **InnoDB Log Buffer Size** - memory buffer for redo log entries before they are written to disk. Controlled by the [`innodb_log_buffer_size`](https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_log_buffer_size) parameter, this buffer allows transactions to complete without waiting for log writes. A larger buffer benefits write-intensive workloads by reducing the frequency of log flushes.

These memory allocations should be tuned based on workload characteristics and available system memory. Properly sized buffers reduce disk I/O and improve overall performance.

## Disks and I/O

The **Disks and I/O** section provides critical insights into storage performance and I/O patterns. These metrics help you identify disk bottlenecks, assess storage capacity, and understand how efficiently your MySQL instances are reading and writing data. Monitoring disk and I/O performance is essential for preventing performance degradation and ensuring that storage systems can handle database workloads.

This section includes the following metrics:

- **Disk utilization** - shows how much wall time (as a percentage) the storage device spent processing I/O operations. This metric represents how busy the disk is, not how full it is. Values approaching 100% indicate the disk is saturated with continuous I/O operations and has no idle time remaining. High disk utilization may signal:
   - I/O-intensive workloads exceeding storage capacity
   - Slow storage unable to handle request rates
   - Need for faster storage (SSD or NVMe instead of HDD) or distributed I/O across multiple disks
   - Inefficient queries causing excessive disk reads
- **Disk weighted I/O** - shows the average number of concurrent I/O requests waiting in the queue while the disk is busy. This metric, also known as average queue length, indicates I/O pressure. Values consistently above 1-2 suggest that I/O requests are queuing up because the disk cannot process them quickly enough. High values may indicate:
   - Storage performance bottleneck
   - Need for better I/O scheduling or caching strategies
   - Workload exceeding disk throughput capacity
- **Average disk read latency** - measures the average time (in milliseconds) it takes to complete a disk read operation. Lower latency indicates faster storage performance. Typical values depend on storage type:
   - NVMe: 0.01-0.1 ms (excellent), 0.1-0.5 ms (good)
   - SSDs: 0.1-1 ms (excellent), 1-5 ms (good)
   - HDDs: 5-10 ms (good), 10-20 ms (acceptable), >20 ms (slow)

   High read latency can slow down queries significantly, especially for read-heavy workloads or when data cannot be served from the buffer pool cache.
- **Average disk write latency** - measures the average time (in milliseconds) required to complete a disk write operation. Write latency affects transaction commit times and overall write performance. High write latency may indicate:
   - Slow storage devices
   - Write-intensive workloads exceeding disk capabilities
   - Insufficient write caching
   - Storage contention with other processes
- **Disk read IOPS** - shows the number of read operations per second. This metric indicates how many read requests the disk is handling. High read IOPS may be normal for read-intensive applications, but if combined with high latency, it suggests the storage system is struggling to keep up with the workload.
- **Disk write IOPS** - shows the number of write operations per second. This metric reflects the rate of write operations on the disk. Write IOPS vary based on workload characteristics and the `innodb_flush_log_at_trx_commit` setting. High write IOPS combined with high latency or utilization indicates storage performance limitations.

![Disks and I/O section](https://docs.cennso.com/api/assets/cennso/cennso-db/latest/assets/dashboard/disk.png)

Use this section to:

- Identify storage bottlenecks affecting database performance
- Determine whether storage upgrades or configuration changes are needed
- Correlate disk performance with query slowdowns or transaction delays
- Monitor whether storage can handle current and future workloads
- Assess the effectiveness of buffer pool sizing and query optimization efforts

> [!NOTE]
> The panels show the load of the whole disk that a MySQL instance uses, and the legend names the MySQL instance that uses this disk. If other pods use the same disk, they add to this load too, so not all of it comes from MySQL.

## HAProxy CPU and memory usage

The **HAProxy CPU and memory usage** section shows how much CPU and memory the HAProxy pods use. The panels show all HAProxy pods in the selected cluster and namespace.

This section includes the following metrics:

- **HAProxy CPU usage** - shows how many CPU cores each HAProxy container uses. In addition, this panel shows how much of the time Kubernetes throttled the container because it reached its CPU limit. If throttling stays above zero, HAProxy needs more CPU than its limit, and every query that goes through it is slower.
- **HAProxy memory usage (WS + RSS + Cache)** - shows the memory each HAProxy container uses, including:
   - **WS (Working Set)** - the memory that Kubernetes counts against the limit
   - **RSS (Resident Set Size)** - the memory of the HAProxy processes
   - **Cache** - the page cache of the container
   - **Limit** - the memory limit of the container

   When the working set reaches the limit, Kubernetes kills the container with the `OOMKilled` reason, and the client connections through this HAProxy pod are interrupted.

![HAProxy CPU and memory usage section](https://docs.cennso.com/api/assets/cennso/cennso-db/latest/assets/dashboard/haproxy.png)

To change the CPU and memory limits of HAProxy, see [HAProxy configuration](https://docs.cennso.com/cennso/cennso-db/latest/concepts/cennso-db-instance.md#haproxy-configuration).
