asynchronous_metrics
The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the clusterAllReplicas
function. See here for further details.
Contains metrics that are calculated periodically in the background. For example, the amount of RAM in use.
Columns:
metric
(String) — Metric name.value
(Float64) — Metric value.description
(String - Metric description)
Example
SELECT * FROM system.asynchronous_metrics LIMIT 10
┌─metric──────────────────────────────────┬──────value─┬─description────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ AsynchronousMetricsCalculationTimeSpent │ 0.00179053 │ Time in seconds spent for calculation of asynchronous metrics (this is the overhead of asynchronous metrics). │
│ NumberOfDetachedByUserParts │ 0 │ The total number of parts detached from MergeTree tables by users with the `ALTER TABLE DETACH` query (as opposed to unexpected, broken or ignored parts). The server does not care about detached parts and they can be removed. │
│ NumberOfDetachedParts │ 0 │ The total number of parts detached from MergeTree tables. A part can be detached by a user with the `ALTER TABLE DETACH` query or by the server itself it the part is broken, unexpected or unneeded. The server does not care about detached parts and they can be removed. │
│ TotalRowsOfMergeTreeTables │ 2781309 │ Total amount of rows (records) stored in all tables of MergeTree family. │
│ TotalBytesOfMergeTreeTables │ 7741926 │ Total amount of bytes (compressed, including data and indices) stored in all tables of MergeTree family. │
│ NumberOfTables │ 93 │ Total number of tables summed across the databases on the server, excluding the databases that cannot contain MergeTree tables. The excluded database engines are those who generate the set of tables on the fly, like `Lazy`, `MySQL`, `PostgreSQL`, `SQlite`. │
│ NumberOfDatabases │ 6 │ Total number of databases on the server. │
│ MaxPartCountForPartition │ 6 │ Maximum number of parts per partition across all partitions of all tables of MergeTree family. Values larger than 300 indicates misconfiguration, overload, or massive data loading. │
│ ReplicasSumMergesInQueue │ 0 │ Sum of merge operations in the queue (still to be applied) across Replicated tables. │
│ ReplicasSumInsertsInQueue │ 0 │ Sum of INSERT operations in the queue (still to be replicated) across Replicated tables. │
└─────────────────────────────────────────┴────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Metric descriptions
AsynchronousHeavyMetricsCalculationTimeSpent
Time in seconds spent for calculation of asynchronous heavy (tables related) metrics (this is the overhead of asynchronous metrics).
AsynchronousHeavyMetricsUpdateInterval
Heavy (tables related) metrics update interval
AsynchronousMetricsCalculationTimeSpent
Time in seconds spent for calculation of asynchronous metrics (this is the overhead of asynchronous metrics).
AsynchronousMetricsUpdateInterval
Metrics update interval
BlockActiveTime_name
Time in seconds the block device had the IO requests queued. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockDiscardBytes_name
Number of discarded bytes on the block device. These operations are relevant for SSD. Discard operations are not used by ClickHouse, but can be used by other processes on the system. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockDiscardMerges_name
Number of discard operations requested from the block device and merged together by the OS IO scheduler. These operations are relevant for SSD. Discard operations are not used by ClickHouse, but can be used by other processes on the system. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockDiscardOps_name
Number of discard operations requested from the block device. These operations are relevant for SSD. Discard operations are not used by ClickHouse, but can be used by other processes on the system. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockDiscardTime_name
Time in seconds spend in discard operations requested from the block device, summed across all the operations. These operations are relevant for SSD. Discard operations are not used by ClickHouse, but can be used by other processes on the system. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockInFlightOps_name
This value counts the number of I/O requests that have been issued to the device driver but have not yet completed. It does not include IO requests that are in the queue but not yet issued to the device driver. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockQueueTime_name
This value counts the number of milliseconds that IO requests have waited on this block device. If there are multiple IO requests waiting, this value will increase as the product of the number of milliseconds times the number of requests waiting. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockReadBytes_name
Number of bytes read from the block device. It can be lower than the number of bytes read from the filesystem due to the usage of the OS page cache, that saves IO. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockReadMerges_name
Number of read operations requested from the block device and merged together by the OS IO scheduler. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockReadOps_name
Number of read operations requested from the block device. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockReadTime_name
Time in seconds spend in read operations requested from the block device, summed across all the operations. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockWriteBytes_name
Number of bytes written to the block device. It can be lower than the number of bytes written to the filesystem due to the usage of the OS page cache, that saves IO. A write to the block device may happen later than the corresponding write to the filesystem due to write-through caching. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockWriteMerges_name
Number of write operations requested from the block device and merged together by the OS IO scheduler. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockWriteOps_name
Number of write operations requested from the block device. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
BlockWriteTime_name
Time in seconds spend in write operations requested from the block device, summed across all the operations. This is a system-wide metric, it includes all the processes on the host machine, not just clickhouse-server. Source: /sys/block
. See https://www.kernel.org/doc/Documentation/block/stat.txt
CPUFrequencyMHz_name
The current frequency of the CPU, in MHz. Most of the modern CPUs adjust the frequency dynamically for power saving and Turbo Boosting.
CompiledExpressionCacheBytes
Total bytes used for the cache of JIT-compiled code.
CompiledExpressionCacheCount
Total entries in the cache of JIT-compiled code.
DiskAvailable_name
Available bytes on the disk (virtual filesystem). Remote filesystems can show a large value like 16 EiB.
DiskTotal_name
The total size in bytes of the disk (virtual filesystem). Remote filesystems can show a large value like 16 EiB.
DiskUnreserved_name
Available bytes on the disk (virtual filesystem) without the reservations for merges, fetches, and moves. Remote filesystems can show a large value like 16 EiB.
DiskUsed_name
Used bytes on the disk (virtual filesystem). Remote filesystems not always provide this information.
FilesystemCacheBytes
Total bytes in the cache
virtual filesystem. This cache is hold on disk.
FilesystemCacheFiles
Total number of cached file segments in the cache
virtual filesystem. This cache is hold on disk.
FilesystemLogsPathAvailableBytes
Available bytes on the volume where ClickHouse logs path is mounted. If this value approaches zero, you should tune the log rotation in the configuration file.
FilesystemLogsPathAvailableINodes
The number of available inodes on the volume where ClickHouse logs path is mounted.
FilesystemLogsPathTotalBytes
The size of the volume where ClickHouse logs path is mounted, in bytes. It's recommended to have at least 10 GB for logs.
FilesystemLogsPathTotalINodes
The total number of inodes on the volume where ClickHouse logs path is mounted.
FilesystemLogsPathUsedBytes
Used bytes on the volume where ClickHouse logs path is mounted.
FilesystemLogsPathUsedINodes
The number of used inodes on the volume where ClickHouse logs path is mounted.
FilesystemMainPathAvailableBytes
Available bytes on the volume where the main ClickHouse path is mounted.
FilesystemMainPathAvailableINodes
The number of available inodes on the volume where the main ClickHouse path is mounted. If it is close to zero, it indicates a misconfiguration, and you will get 'no space left on device' even when the disk is not full.
FilesystemMainPathTotalBytes
The size of the volume where the main ClickHouse path is mounted, in bytes.
FilesystemMainPathTotalINodes
The total number of inodes on the volume where the main ClickHouse path is mounted. If it is less than 25 million, it indicates a misconfiguration.
FilesystemMainPathUsedBytes
Used bytes on the volume where the main ClickHouse path is mounted.
FilesystemMainPathUsedINodes
The number of used inodes on the volume where the main ClickHouse path is mounted. This value mostly corresponds to the number of files.
HTTPThreads
Number of threads in the server of the HTTP interface (without TLS).
InterserverThreads
Number of threads in the server of the replicas communication protocol (without TLS).
Jitter
The difference in time the thread for calculation of the asynchronous metrics was scheduled to wake up and the time it was in fact, woken up. A proxy-indicator of overall system latency and responsiveness.
LoadAverageN
The whole system load, averaged with exponential smoothing over 1 minute. The load represents the number of threads across all the processes (the scheduling entities of the OS kernel), that are currently running by CPU or waiting for IO, or ready to run but not being scheduled at this point of time. This number includes all the processes, not only clickhouse-server. The number can be greater than the number of CPU cores, if the system is overloaded, and many processes are ready to run but waiting for CPU or IO.
MMapCacheCells
The number of files opened with mmap
(mapped in memory). This is used for queries with the setting local_filesystem_read_method
set to mmap
. The files opened with mmap
are kept in the cache to avoid costly TLB flushes.