MySQL metrics
Database metrics comprehensively collect 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.
For more information about other metrics, see the following.
agent_status_summary
This category collects metrics related to agent status every 10 seconds.
Fields
Field | Type | Unit | Description |
---|---|---|---|
inActTime | - | Millisecond(ms) | Amount of time the agent remains inactive |
isActive | Boolean | - | Whether the agent is active or not |
isRestart | Boolean | - | Whether the agent was restarted recently (true / false ) |
lastActTime | - | Millisecond(ms) | Last time when the agent was activated (0 : Disabled) |
oid | - | - | Unique IDs for each agent in the project |
startTime | - | Millisecond(ms) | Timestamp when the agent was started. |
db_mysql_counter
Tags
The following lists the tags that are collected in the db_mysql_counter
category.
Tags | Description | Additional Info |
---|---|---|
agentIp | IP address per agent | - |
dbIsMulti | Multitenant Supportable or not | - |
dbName | Database name | - |
dbType | Database Type | - |
dbVersion | Version of the database in use | - |
oname | Agent name | Unique value |
Field
The following lists the fields that are collected in the db_mysql_counter
category.
Metric | Category / Unit | Description |
---|---|---|
aborted_clients | Connection | Number of clients that were abnormally terminated |
access_denied_errors | Connection | Number of login failures - It increases when a wrong username/password is used. |
Active sessions | Connection | Query running session count - same as Threads_running |
active_transactions | Throughput | Active transaction count |
bytes_received | Throughput / Byte | Number of bytes received from the client - A high value indicates the server that is heavily focused on write operations. |
bytes_sent | Throughput / Byte | Total bytes transmitted to the client - A high value indicates the server that is heavily focused on read operations - It is useful when analyzed together with Questions and Uptime |
com_commit | Throughput | Number of executions of the COMMIT command |
com_delete | Throughput | Number of executions of the DELETE command |
com_insert | Throughput | Number of executions of the INSERT command |
com_rollback | Throughput | Number of executions of the ROLLBACK command |
com_select | Throughput | Number of executions of the SELECT command |
com_update | Throughput | Number of executions of the UPDATE command |
connections | Connection | Number of client attempts to connect to the MySQL server |
created_tmp_disk_tables | Performance | Number of temporary tables created on disk - It occurs due to insufficient memory when joining/sorting/grouping - Consider adjusting the tmp_table_size and max_heap_table_size |
created_tmp_files | Performance | Number of created temporary files |
created_tmp_tables | Performance | Internal temporary table created by the server - Used in UNION ALL, ORDER BY, and GROUP BY - Disk temporary table ratio is recommended to be less than 10% |
innodb_buffer_pool_pages_free | InnoDB | Number of unused (available) pages in the entire buffer pool |
innodb_buffer_pool_pages_total | InnoDB | Number of pages in the entire buffer pool |
innodb_buffer_pool_read_requests | InnoDB | Number of pages for read operations from the buffer pool - Buffer Hit Ratio = (1 - (innodb_buffer_pool_reads / innodb_buffer_pool_read_requests)) * 100 - 90% or more is recommended. Otherwise, consider increasing the innodb_buffer_pool_size. |
innodb_buffer_pool_reads | InnoDB | Number of pages read from disk - A high value indicates a low buffer pool hit ratio. |
innodb_buffer_pool_wait_free | InnoDB | Number of waits for disk flush because there were no free pages in the buffer pool |
innodb_log_waits | InnoDB | Number of waits for disk write operations because the log buffer was full - Redo log contention ratio = innodb_log_waits / innodb_log_writes - Less than 1 is recommended. If the value is higher, consider increasing the innodb_log_buffer_size. |
innodb_rows_deleted | InnoDB | Number of rows deleted from the InnoDB table |
innodb_rows_inserted | InnoDB | Number of rows inserted in the InnoDB table |
innodb_rows_read | InnoDB | Number of rows processed in SELECT |
innodb_rows_updated | InnoDB | Number of rows updated in the InnoDB table |
innodb_rows_writes | InnoDB | Number of rows processed for write operations - innodb_rows_inserted + innodb_rows_updated + innodb_rows_deleted |
innodb_row_lock_time | InnoDB / ms | Total time spent acquiring row locks (milliseconds) |
innodb_row_lock_waits | InnoDB | Number of waits for row locks - If the value increases rapidly, query tuning is required. |
lock_wait_sessions | Performance | Number of sessions waiting for row locks - It is the same as innodb_row_lock_current_waits. |
max_connections | Connection | Maximum number of simultaneous client connections - The Too Many Connection error may occur when the number of connections is insufficient. |
queries | Throughput | Total number of executed SQL statements - It includes the statements executed in the stored programs. |
questions | Throughput | Number of statements executed by the MySQL server - It excludes the statements executed in the stored programs. |
replication_delay | Performance/sec | Replication delay time (secs) - It is measured in the slave DB. |
select_full_join | Performance | Number of full joins occurred without using indexes - If the value is higher, consider reviewing the missing indexes. |
select_scan | Performance | Number of full table scans without using indexes - Check the type = ALL query in the execution plan. |
slow_queries | Performance | Number of queries that took longer than the long_query_time - If the value increases rapidly, check the slow query log. |
sort_merge_passes | Performance | Number of sort merge passes - If the value is higher, consider improving query indexing or increasing the sort_buffer_size. |
table_locks_waited | Performance | Number of waits for the table because another lock was already using it - Lock wait ratio = table_locks_waited / (table_locks_immediate + table_locks_waited) * 100 - If the value is higher, consider optimizing the query and partitioning/replicating the table. |
table_open_cache_misses | Performance | Number of table opens with no cache |
threads_connected | Connection | Number of connected clients - If it increases rapidly, it is recommended to check for connection leaks. |
threads_running | Throughput | Number of running threads - if it is consistently high, it may be a bottleneck. |
trx_rseg_history_len | Performance | Undo record storage space's usage - If it increases continuously, performance degradation may occur. |
uptime | Performance | Elapsed time (seconds) since start of the MySQL server |
XOS-related metrics
The following describes the metrics collected from the XOS agent.
Metric | Unit | Description |
---|---|---|
cpu(xos) | pct | CPU utilizationcpu_user + cpu_sys + cpu_iowait |
cpu_idle(xos) | pct | CPU idle time |
cpu_iowait(xos) | pct | CPU's I/O waiting time |
cpu_sys(xos) | pct | CPU's kernel code execution time |
cpu_user(xos) | pct | CPU's user code execution time |
disk_read_bytes(xos) | byte | Number of data blocks read from disk |
disk_reads(xos) | block | Number of buffers read from disk |
disk_write_bytes(xos) | byte | Number of pages written to disk |
disk_writes(xos) | block | Number of buffers written to disk |
mem(xos) | pct | Memory utilization |
mem_available(xos) | MB | Shared memory size |
mem_buffcache(xos) | MB | Amount of memory used by the buff/cache |
mem_free(xos) | MB | Memory not in use |
mem_swapfree(xos) | MB | Unused swap space size Because swap uses disk space, it may cause performance degradation. |
mem_swaptotal(xos) | MB | Total swap size It is used when physical memory is insufficient. |
mem_total(xos) | MB | Total memory size |
mem_used(xos) | MB | Memory size in use |
net_recv_bytes(xos) | byte | Amount of data transmitted over the network |
net_recv_packets(xos) | count | Number of data packets transmitted over the network |
net_send_bytes(xos) | byte | Amount of data transmitted over the network |
net_send_packets(xos) | count | Number of data packets transmitted over the network |