MySQL metrics
Database metric comprehensively collects the database workload and resource usage. The WhaTap monitoring service continuously collects metric data to identify bottlenecks in the database and provides data to help identify the root cause of the performance issue.
Indicators | Unit | Description | Category |
---|---|---|---|
Aborted_connects | - | Server connection failure count | Connection |
active_sessions | - | Query running session count. It is the same as Threads_running . | Connection |
Connection_errors_internal | - | Number of connections rejected by server errors | Connection |
Connection_errors_max_connections | - | Number of connections rejected by the limit of max_connections | Connection |
Connections | - | DB connection trial count | Connection |
Max_used_connections | - | Maximum number of used connections after startup | Connection |
Threads_connected | - | Number of connected sessions | Connection |
max_connections | - | Too ManyConnection Error may occur if the maximum number of concurrent client connections exceeds or the connection count is insufficient. | Info |
Bytes_received | - | If bytes and Bytes_received of the DB server are high, it indicates that this server is a write-oriented server (e.g. insert). | MySQL Resource |
Bytes_sent | - | If bytes and Bytes_sent from the DB server are high, it indicates that this server is a read-oriented (select) server. If you apply it together with Questions and Uptime , the average bytes per query and the processing bytes per hour can be counted. | MySQL Resource |
Created_tmp_disk_tables | - | Number of temporary tables on disk created by the server while executing commands. Because disk usage can degrade the performance, if this value increases, consider adjusting values for tmp_table_size or max_heap_table_size . | MySQL Resource |
Created_tmp_files | - | Number of temporary files created by mysqld | MySQL Resource |
Created_tmp_tables | - | Number of internal temporary tables created by the server while executing commands. Temporary tables can be used in a few cases, typically when using UNION ALL in a query or when using ORDER BY, GROUP BY, or DISTINCT. It is recommended that the number of temporary tables on disk (Created_tmp_disk_tables ) is not high (less than 10%) relative to the total number of internal temporary tables (Created_tmp_disk_tables + Created_tmp_tables ). | MySQL Resource |
Innodb_buffer_pool_bytes_dirty | - | Number of changed data bytes in the buffer pool (number of dirty data) | MySQL Resource |
Innodb_buffer_pool_pages_data | - | Number of pages in use in the total buffer pool. | MySQL Resource |
Innodb_buffer_pool_pages_dirty | - | Number of changed data pages in the buffer pool (number of dirty pages) | MySQL Resource |
Innodb_buffer_pool_pages_flushed | - | Number of InnoDB buffer pool pages flushed. Excessive flushing can put a strain on the disk while writing dirty data, it must be monitored along with the disk performance. | MySQL Resource |
Innodb_buffer_pool_pages_free | - | Number of unused (available) pages in the entire buffer pool | MySQL Resource |
Innodb_buffer_pool_pages_total | - | Number of pages in the entire buffer pool | MySQL Resource |
Innodb_buffer_pool_read_requests | - | Number of logical read requests (including physical reads). Inodb buffer pool hit ratio can be calculated as follows, and 90% or higher is recommended. If the hit ratio is low, consider adding Innodb_buffer_pool_size .Buffer Hit Ratio = (1 - ( Innodb_buffer_pool_reads /Innodb_buffer_pool_read_requests )) * 100 | MySQL Resource |
Innodb_buffer_pool_reads | - | The number of physical (disk) reads. The number of logical read requests that are not in the Innodb buffer pool and must be read directly from the disk. | MySQL Resource |
Innodb_data_reads | - | Number of InnoDB reads (not to be confused with InnoDB_Data_Read ) | MySQL Resource |
Innodb_data_writes | - | Number of InnoDB writes. | MySQL Resource |
Innodb_dblwr_writes | - | Number of writes to the Innodb Doublewrite buffers. | MySQL Resource |
Innodb_log_waits | - | The number of times waited for the log buffer to be flushed because it was small. The redo log contention rate can be calculated as (Innodb_log_waits /Innodb_log_writes ), a value less than 1 is recommended. If Wait is high, consider increasing innodb_log_buffer_size . | MySQL Resource |
Innodb_log_writes | - | Number of physical writes to the innodb redo log file. | MySQL Resource |
Binlog_bytes_written | - | Number of bytes recorded in the binary log. | Performance |
Binlog_commits | - | Number of commits recorded in the binary log. | Performance |
Innodb_row_lock_time | - | Total time spent acquiring row locks (milliseconds) | Performance |
Innodb_row_lock_waits | - | Count to wait for a row lock in the Innodb storage engine table. This is the waiting count to acquire a lock, not the number of lock acquisitions. If this metric increases more than usual, the query wait occurs (lock contention), and query tuning is required. | Performance |
lock_wait_sessions | - | Number of waits for acquiring row lock. It is the number of innodb_lock_waits (data_lock_waits ). | Performance |
replication_delay | - | Delay time reflected in the replication DB for the replication structure. This is a metric measured in the slave DB. | Performance |
Slaves_running | - | Number of slave SQL threads executing | Performance |
Slow_queries | - | Number of queries executed longer than the time set in the DB parameter, long_query_time (seconds). | Performance |
Sort_rows | - | Number of rows sorted | Performance |
Com_commit | - | Number of commits | Throughput |
Com_delete | - | Number of delete commands executed. It counts the number of rows deleted from the table and the row that are different from handler_delete . | Throughput |
Com_insert | - | Number of inserted commands that have been executed | Throughput |
Com_rollback | - | Rollback count | Throughput |
Com_select | - | Number of executed Select commands | Throughput |
Com_update | - | Number of executed update commands | Throughput |
Innodb_rows_read | - | Number of processed rows by Select | Throughput |
Innodb_rows_writes | - | Number of rows processed by Write. It is the same as Innodb_rows_inserted + Innodb_rows_updated + Innodb_rows_deleted . | Throughput |
Queries | - | Number of statements executed by the server, excluding com_ping and com_statistics . It differs from Questions because it also counts the statements executed in the stored program. | Throughput |
Questions | - | Number of queries executed | Throughput |
Select_full_join | - | Number of full scans for driven tables without using indexes when joining more than one table. | Throughput |
Select_scan | - | Number of full scans for the driving table. In this case, ALL appears in the type column of the plan. | Throughput |
Writes | - | Number of commands used by Write. It is the same as Com_insert + Com_update + Com_delete . | Throughput |
cpu(xos2) | pct | CPU utilization, cpu_user + cpu_sys + cpu_iowait . | XOS |
cpu_user(xos2) | pct | Time spent for CPU to execute user code | XOS |
cpu_sys(xos2) | pct | Time spent for CPU to execute the kernel code | XOS |
cpu_iowait(xos2) | pct | CPU time waited for IO | XOS |
cpu_idle(xos2) | pct | CPU processor's idle time | XOS |
mem(xos) | pct | Memory utilization | XOS |
mem_total(xos) | MB | Total amount of memory | XOS |
mem_free(xos) | MB | Amount of memory not in use by the system | XOS |
mem_used(xos) | MB | Amount of memory in use by the system | XOS |
mem_buffcache(xos) | MB | Amount of memory used by the buff/cache | XOS |
mem_swaptotal(xos) | MB | Set this in preparation for the case where the total Swap size and physical memory are insufficient. | XOS |
mem_swapfree(xos) | MB | Because the unused Swap area and Swap area are secured in disk space, the system performance may drop drastically while using Swap. | XOS |
mem_available(xos) | MB | Available memory area | XOS |
disk_reads(xos) | block | Amount of data read from disk | XOS |
disk_read_bytes(xos) | byte | Amount of data read from disk | XOS |
disk_writes(xos) | block | Amount of data written to disk | XOS |
disk_write_bytes(xos) | byte | Amount of data written to disk | XOS |
net_recv_bytes(xos) | byte | Amount of data received over the network | XOS |
net_recv_packets(xos) | - | Number of data packets received over the network | XOS |
net_send_bytes(xos) | byte | Amount of data transmitted over the network | XOS |
net_send_packets(xos) | - | Number of data packets transmitted over the network | XOS |