Project: ClickHouse (App Definition and Development / Database)
File: metrics.md

slug: /en/operations/system-tables/metrics Contains metrics which can be calculated instantly, or have a current value. For example, the number of simultaneously processed queries or the current replica delay. This table is always up to date. Columns: `metric` () Metric name. `value` () Metric value. `description` () Metric description. `name` () Alias for `metric`. You can find all supported metrics in source file . Example ``` sql SELECT * FROM system.metrics LIMIT 10 ``` ``` text metricvaluedescription Query 1 Number of executing queries Merge 0 Number of executing background merges PartMutation 0 Number of mutations (ALTER DELETE/UPDATE) ReplicatedFetch 0 Number of data parts being fetched from replicas ReplicatedSend 0 Number of data parts being sent to replicas ReplicatedChecks 0 Number of data parts checking for consistency BackgroundMergesAndMutationsPoolTask 0 Number of active merges and mutations in an associated background pool BackgroundFetchesPoolTask 0 Number of active fetches in an associated background pool BackgroundCommonPoolTask 0 Number of active tasks in an associated background pool BackgroundMovePoolTask 0 Number of active tasks in BackgroundProcessingPool for moves ``` Number of threads in the Aggregator thread pool. Number of threads in the Aggregator thread pool running a task. Number of threads in the async loader foreground thread pool. Number of threads in the async loader foreground thread pool running a task. Number of threads in the async loader background thread pool. Number of threads in the async loader background thread pool running a task. Number of async insert hash id in cache Number of threads in the AsynchronousInsert thread pool. Number of threads in the AsynchronousInsert thread pool running a task. Number of threads waiting for asynchronous read. Limit on number of tasks in BackgroundBufferFlushSchedulePool Number of active tasks in BackgroundBufferFlushSchedulePool. This pool is used for periodic Buffer flushes Limit on number of tasks in an associated background pool Number of active tasks in an associated background pool Limit on number of tasks in BackgroundDistributedSchedulePool Number of active tasks in BackgroundDistributedSchedulePool. This pool is used for distributed sends that is done in background. Limit on number of simultaneous fetches in an associated background pool Number of active fetches in an associated background pool Limit on number of active merges and mutations in an associated background pool Number of active merges and mutations in an associated background pool Limit on number of tasks in BackgroundProcessingPool for message streaming Number of active tasks in BackgroundProcessingPool for message streaming Limit on number of tasks in BackgroundProcessingPool for moves Number of active tasks in BackgroundProcessingPool for moves Limit on number of tasks in BackgroundSchedulePool. This pool is used for periodic ReplicatedMergeTree tasks, like cleaning old data parts, altering data parts, replica re-initialization, etc. Number of active tasks in BackgroundSchedulePool. This pool is used for periodic ReplicatedMergeTree tasks, like cleaning old data parts, altering data parts, replica re-initialization, etc. Number of threads in the BackupsIO thread pool. Number of threads in the BackupsIO thread pool running a task. Number of threads in the thread pool for BACKUP. Number of threads in thread pool for BACKUP running a

Number of files for asynchronous insertion into Distributed tables that has been marked as broken. This metric will starts from 0 on start. Number of files for every shard is summed. Number of existing detached cache file segments Number of threads in the CacheDictionary thread pool. Number of threads in the CacheDictionary thread pool running a task. Number of 'batches' (a set of keys) in update queue in CacheDictionaries. Exact number of keys in update queue in CacheDictionaries. Number of existing cache file segments Number of threads waiting for lock in Context. This is global lock. Number of threads in the DDLWorker thread pool for ON CLUSTER queries. Number of threads in the DDLWORKER thread pool for ON CLUSTER queries running a task. Number of threads in the DatabaseCatalog thread pool. Number of threads in the DatabaseCatalog thread pool running a task. Number of threads in the DatabaseOnDisk thread pool. Number of threads in the DatabaseOnDisk thread pool running a task. Number of INSERT queries that are throttled due to high number of active data parts for partition in a MergeTree table. Number of threads in the thread pool for destroy aggregate states. Number of threads in the thread pool for destroy aggregate states running a task. Number of requests in fly to data sources of dictionaries of cache type. Number of threads in the async thread pool for DiskObjectStorage. Number of threads in the async thread pool for DiskObjectStorage running a task. Disk space reserved for currently running background merges. It is slightly more than the total size of currently merging parts. Number of pending files to process for asynchronous insertion into Distributed tables. Number of files for every shard is summed. Number of connections to remote servers sending data that was INSERTed into Distributed tables. Both synchronous and asynchronous mode. Number of ephemeral nodes hold in ZooKeeper. Filesystem cache elements (file segments) Number of active cache buffers Filesystem cache size in bytes Number of threads in global thread pool. Number of threads in global thread pool running a task. Number of connections to HTTP server Number of threads in the HashedDictionary thread pool. Number of threads in the HashedDictionary thread pool running a task. Number of threads in the IO prefetch thread pool. Number of threads in the IO prefetch thread pool running a task. Number of threads in the IO thread pool. Number of threads in the IO thread pool running a task. Number of io_uring SQEs in flight Number of io_uring SQEs waiting to be submitted Number of threads in the IO writer thread pool. Number of threads in the IO writer thread pool running a task. Number of connections from other replicas to fetch parts Number of partitions Kafka tables currently assigned to Number of background reads currently working (populating materialized views from Kafka) Number of active Kafka consumers Number of consumers which are currently used by direct or background reads Number of active Kafka consumers which have some partitions

Number of active librdkafka threads Number of active Kafka producer created Number of currently running inserts to Kafka Number of alive connections Number of outstanding requests Number of threads in local thread pools. The threads in local thread pools are taken from the global thread pool. Number of threads in local thread pools running a task. Sum bytes of mmapped allocations Total number of mmapped allocations Sum size of mmapped file regions. Total number of mmapped files. Number of threads in thread pool for loading marks. Number of threads in the thread pool for loading marks running a task. Max processed DDL entry of DDLWorker. Max DDL entry of DDLWorker that pushed to zookeeper. Total amount of memory (bytes) allocated by the server. Number of executing background merges The current number of announcement being sent in flight from the remote server to the initiator server about the set of data parts (for MergeTree tables). Measured on the remote server side. Number of threads in the MergeTreeBackgroundExecutor thread pool. Number of threads in the MergeTreeBackgroundExecutor thread pool running a task. Number of threads in the MergeTreeDataSelectExecutor thread pool. Number of threads in the MergeTreeDataSelectExecutor thread pool running a task. Number of threads in the MergeTree parts cleaner thread pool. Number of threads in the MergeTree parts cleaner thread pool running a task. Number of threads in the MergeTree parts loader thread pool. Number of threads in the MergeTree parts loader thread pool running a task. The current number of callback requests in flight from the remote server back to the initiator server to choose the read task (for MergeTree tables). Measured on the remote server side. Number of currently executing moves Number of client connections using MySQL protocol Number of threads receiving data from network. Only ClickHouse-related network interaction is included, not by 3rd party libraries. Number of threads sending data to network. Only ClickHouse-related network interaction is included, not by 3rd party libraries. Number of files open for reading Number of files open for writing Number of threads in the ParallelFormattingOutputFormatThreads thread pool. Number of threads in the ParallelFormattingOutputFormatThreads thread pool running a task. Number of threads in the ParallelParsingInputFormat thread pool. Number of threads in the ParallelParsingInputFormat thread pool running a task. Number of mutations (ALTER DELETE/UPDATE) Active data part, used by current and upcoming SELECTs. Deprecated. See PartsActive. Compact parts. Part was moved to another disk and should be deleted in own destructor. Not active data part with identity refcounter, it is deleting right now by a cleaner. Not active data part, but could be used by only current SELECTs, could be deleted after SELECTs finishes. The part is in data_parts, but not used for SELECTs. Deprecated. See PartsPreActive. The part is generating now, it is not in data_parts list. Wide parts. Number of asynchronous inserts that are waiting for flush. Number of client connections using PostgreSQL protocol Number of executing queries Number of queries that are stopped and waiting due to 'priority' setting. Number of query processing threads Number of threads holding read lock in a table RWLock. Number of threads holding write lock in a table RWLock. Number of threads waiting for read on a table

Number of threads waiting for write on a table RWLock. Number of read (read, pread, io_getevents, etc.) syscalls in fly The current number of callback requests in flight from the remote server back to the initiator server to choose the read task (for s3Cluster table function and similar). Measured on the remote server side. Number of Replicated tables that are currently in readonly state due to re-initialization after ZooKeeper session loss or due to startup without ZooKeeper configured. Number of read with remote reader in fly Number of data parts checking for consistency Number of data parts being fetched from replica Number of data parts being sent to replicas Number of threads in the RESTART REPLICA thread pool. Number of threads in the RESTART REPLICA thread pool running a task. Number of threads in the thread pool for RESTORE. Number of threads in the thread pool for RESTORE running a task. Revision of the server. It is a number incremented for every release or release candidate except patch releases. S3 requests Number of connections that are sending data for external tables to remote servers. External tables are used to implement GLOBAL IN and GLOBAL JOIN operators with distributed subqueries. Number of connections that are sending data for scalars to remote servers. Number of bytes in buffers of Buffer tables Number of rows in buffers of Buffer tables Number of threads in the StorageDistributed thread pool. Number of threads in the StorageDistributed thread pool running a task. Number of threads in the StorageHive thread pool. Number of threads in the StorageHive thread pool running a task. Number of threads in the StorageS3 thread pool. Number of threads in the StorageS3 thread pool running a task. Number of threads in the system.replicas thread pool. Number of threads in the system.replicas thread pool running a task. Number of connections to TCP server (clients with native interface), also included server-server distributed query connections Number of dropped tables, that are waiting for background data removal. Number of temporary files created for external aggregation Number of temporary files created for JOIN Number of temporary files created for external sorting Number of temporary files created without known purpose Number of threads in the thread pool for localfilesystemread_method=threadpool. Number of threads in the thread pool for localfilesystemread_method=threadpool running a task. Number of threads in the thread pool for remotefilesystemread_method=threadpool. Number of threads in the thread pool for remotefilesystemread_method=threadpool running a task. Number of waiting threads inside of OvercommitTracker Number of temporary files created Version of the server in a single integer number in base-1000. For example, version 11.22.33 is translated to 11022033. Number of write (write, pwrite, io_getevents, etc.) syscalls in fly Number of requests to ZooKeeper in fly. Number of sessions (connections) to ZooKeeper. Should be no more than one, because using more than one connection to ZooKeeper may lead to bugs due to lack of linearizability (stale reads) that ZooKeeper consistency model allows. Number of watches (event subscriptions) in ZooKeeper. See Also Contains periodically calculated metrics. Contains a number of events that occurred. Contains a history of metrics values from tables `system.metrics` and `system.events`. Base concepts of ClickHouse monitoring.