PostgreSQL metrics
Database metrics are a comprehensive collection of database workloads and resource usages. 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 link.
Indicators | Unit | Description | Category |
---|---|---|---|
active_sessions | - | Total number of connections for query | Connection |
blk_read_time | millisecond | Time spent writing data file blocks on the backend | I/O |
blk_write_time | millisecond | Time spent writing data file blocks on the backend | I/O |
blks_hit | - | Total count where a disk block was found in the buffer cache and did not require a read | I/O |
blks_hit_ratio | pct | It indicates the buffer cache hit rate. This can be calculated by sum(blks_hit )/sum(blks_hit + blks_read ) * 100. | I/O |
blks_read | - | Number of disk blocks read from the database | I/O |
buffers_checkpoint | - | Total number of buffers written by the checkpointer process | Info |
check_point | - | checkpoint execution count | Troughput |
checkpoint_write_time | millisecond | Total time in milliseconds for disk write caused by the checkpoint operation | Troughput |
checkpoints_timed | - | Number of checkpoint operations according to the checkpoint_timeout setting | Troughput |
commit_count | - | Number of transactions in the database committed | Troughput |
conflicts | - | Number of queries that were aborted because they conflicted with database recovery operations | Troughput |
connect_error | - | Counted number when the agent failed to access the database | Connection |
deadlock_count | - | Total number of deadlocks detected in the database | Performance |
dml_count | - | Number of DML executions | Troughput |
index_hit_ratio | pct | Rate at which indexes were read from the buffer cache | Performance |
lock_wait_sessions | - | Number of sessions waiting for a lock | Performance |
long_running_sessions | - | Number of sessions running for more than the long running time (default:10 seconds) | Performance |
max_connections | - | This value is set in pg_settings for the maximum number of possible connections. If it is not enough, FATAL ERROR: too many clients already. Errors may occur. | Info |
node_state | - | This database consists of replication relationships. 1 : Master, 2 : Slave. | Info |
numbackends | - | Number of connected backends | Info |
replication_count | - | Number of replication databases (Slave) | Performance |
replication_delay | - | Delay time reflected in the replication database for the replication structure, this is a metric measured in the slave DB | Performance |
rollback_count | - | Total number of transactions in the database rolled back | Performance |
table_hit_ratio | - | Rate at which the tables were read from the buffer cache | Performance |
temp_bytes | - | Total amount of data written to temporary files by queries in the database | Performance |
temp_files | - | Total number of temporary files generated by queries in the database | Performance |
total_runtime | - | Sum of runtimes (elapsed time) for all active sessions | Performance |
total_sessions | - | Total number of connected sessions | Connection |
tup_deleted | - | Total number of rows deleted by the queries in the database | Troughput |
tup_fetched | - | Total number of rows fetched by the queries in the database | Troughput |
tup_inserted | - | Total number of rows added by the queries in the database | Troughput |
tup_returned | - | Number of rows returned by the queries in the database | Troughput |
tup_updated | - | Total number of rows updated by the queries in the database | Troughput |
vacuum_running_count | - | Number of processes for vacuuming | Performance |
wait_sessions | - | Total number of queued connections | Performance |
seq_scan | - | Method to read records during full table scanning. Select this when any index does not exist or if an index exists, the range to be read is wide. This metric has the values queried every minute. | Performance |
idx_scan | - | With this method, table records are accessed using keys stored in index leaf blocks. This metric has values retrieved every minute. | Performance |
wal | - | Number of WAL files. Spikes in the WAL file counts are usually caused by the large amount of changes in a short period or vacuum-like maintenance operations that generate temporary tables and objects. They should slowly return to normal levels. This usually results in lots of disk I/O and CPU activity, slowing the application query's execution until things get back to normal. This metric has the values queried every minute. | Performance |
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 |