Skip to main content

JuiceFS Metrics

If you haven't yet set up monitoring for JuiceFS, read monitoring and data visualization" to learn how.

Global labels​

NameDescription
vol_nameVolume name
instanceClient host name in format <host>:<port>. Refer to official document for more information
mpMount point path, if metrics are reported through Prometheus Pushgateway, for example, JuiceFS Hadoop Java SDK, mp will be sdk-<PID>

File system​

Metrics​

NameDescriptionUnit
juicefs_used_spaceTotal used spacebyte
juicefs_used_inodesTotal number of used inodes
juicefs_total_spaceTotal space of the volumebyte
juicefs_total_inodesTotal number of inodes

Operating system​

Metrics​

NameDescriptionUnit
juicefs_uptimeTotal running timesecond
juicefs_cpu_usageAccumulated CPU usagesecond
juicefs_memoryUsed memorybyte

Metadata engine​

Labels​

NameDescription
methodMetadata engine operation (e.g. getattr, setattr, lookup)

Metrics​

NameDescriptionUnit
juicefs_transaction_durations_histogram_secondsTransactions latency distributionssecond
juicefs_transaction_restartNumber of times a transaction restarted
juicefs_meta_ops_durations_histogram_secondsMetadata engine operations latency distributionssecond
juicefs_meta_ops_totalNumber of metadata engine operations
juicefs_meta_ops_duration_secondsAccumulated time of metadata engine operationssecond

Redis connection pools​

When using Redis or KeyDB as the metadata engine, the following client-side metrics describe the main command connection pool used by standalone and Sentinel clients. Redis Cluster pool metrics are not collected. These metrics are provided by the official go-redis Prometheus collector and have no additional labels. Sentinel control connections and Pub/Sub pools are excluded. Scraping reads local pool statistics without sending Redis commands.

NameTypeDescription
juicefs_redis_pool_hit_totalCounterTotal number of times an idle connection was reused from the pool
juicefs_redis_pool_miss_totalCounterTotal number of times no reusable idle connection was found in the pool
juicefs_redis_pool_timeout_totalCounterTotal number of timeouts acquiring a connection from the pool
juicefs_redis_pool_conn_total_currentGaugeCurrent number of connections in the command pool
juicefs_redis_pool_conn_idle_currentGaugeCurrent number of idle connections in the command pool
juicefs_redis_pool_conn_stale_totalCounterTotal number of stale connections removed from the pool

A pool miss triggers an attempt to create a new connection. Counters accumulate over the lifetime of the client's pool and can reset when the pool is recreated. Use rate() or increase() to observe changes over a specified time window.

TiKV client​

For the TiKV metadata engine, the following metrics expose TiKV Go client's RPC and request queue activity. They read in-process statistics without querying TiKV.

These collectors are shared by all TiKV clients in the process. When the Java or Python SDK opens multiple volumes, each volume's metrics export the same process totals. The vol_name and mp labels identify the exporter context, not the owner of these statistics; do not sum these metrics across volumes in the same process.

NameTypeDescription
juicefs_tikv_client_go_request_secondsHistogramRPC request duration in seconds; labels: type, store, stale_read, scope
juicefs_tikv_client_go_batch_pending_requestsHistogramNumber of requests pending in the batch channel; label: store
juicefs_tikv_client_go_batch_client_wait_connection_establishHistogramTime spent waiting for a batch connection to be established, in seconds
juicefs_tikv_client_go_batch_client_no_available_connection_totalCounterNumber of times no batch client is available to send requests

The metric names and types follow the TiKV Go client. The connection establishment histogram uses seconds despite not having a _seconds suffix. The unavailable batch client counter can increase because of concurrency limits or a busy sender; it is not a SQL-style connection pool timeout counter.

When the SDK pushes metrics to Pushgateway, Graphite, or a remote write endpoint, a custom push label that conflicts with a TiKV metric label causes that TiKV collector to be skipped with a warning. Existing JuiceFS metrics and non-conflicting TiKV collectors continue to be exported.

Quota​

Metrics​

Directory quotas carry an inode label, user quotas a uid label, and group quotas a gid label.

NameDescriptionUnit
juicefs_dir_quota_max_space_bytesDirectory quota maximum spacebyte
juicefs_dir_quota_max_inodesDirectory quota maximum number of inodes
juicefs_dir_quota_used_space_bytesDirectory quota used spacebyte
juicefs_dir_quota_used_inodesDirectory quota used number of inodes
juicefs_user_quota_max_space_bytesUser quota maximum spacebyte
juicefs_user_quota_max_inodesUser quota maximum number of inodes
juicefs_user_quota_used_space_bytesUser quota used spacebyte
juicefs_user_quota_used_inodesUser quota used number of inodes
juicefs_group_quota_max_space_bytesGroup quota maximum spacebyte
juicefs_group_quota_max_inodesGroup quota maximum number of inodes
juicefs_group_quota_used_space_bytesGroup quota used spacebyte
juicefs_group_quota_used_inodesGroup quota used number of inodes

SQL connection pool​

For MySQL, PostgreSQL, and SQLite metadata engines, the following metrics describe each client's connection pool. They use the Prometheus Go SQL collector and have the additional label db_name="metadata". Scraping reads local pool statistics without querying the database. These are client-side statistics, not database server totals.

NameTypeDescription
juicefs_go_sql_max_open_connectionsGaugeMaximum number of open connections; 0 means unlimited
juicefs_go_sql_open_connectionsGaugeNumber of open connections, including in-use and idle connections
juicefs_go_sql_in_use_connectionsGaugeNumber of connections currently in use
juicefs_go_sql_idle_connectionsGaugeNumber of idle connections
juicefs_go_sql_wait_count_totalCounterTotal number of waits for a connection
juicefs_go_sql_wait_duration_seconds_totalCounterTotal time spent waiting for a connection, in seconds
juicefs_go_sql_max_idle_closed_totalCounterTotal connections closed because of the idle connection limit
juicefs_go_sql_max_idle_time_closed_totalCounterTotal connections closed because of the maximum idle time
juicefs_go_sql_max_lifetime_closed_totalCounterTotal connections closed because of the maximum connection lifetime

The wait counters help identify pool contention when metadata operations slow down. Counters accumulate over the lifetime of the client's pool; use rate() or increase() to observe changes over a time window.

FUSE​

Labels​

NameDescription
methodFUSE operation (e.g. read, write, lookup)
errnoError name of failed operations (e.g. EIO, ENOENT)

Metrics​

NameDescriptionUnit
juicefs_fuse_read_size_bytesSize distributions of read requestbyte
juicefs_fuse_written_size_bytesSize distributions of write requestbyte
juicefs_fuse_ops_durations_histogram_secondsOperations latency distributionssecond
juicefs_fuse_ops_totalNumber of operations
juicefs_fuse_ops_durations_secondsAccumulated time of operationssecond
juicefs_fuse_ops_io_errorsNumber of I/O errors
juicefs_fuse_open_handlersNumber of open files and directories

SDK​

Metrics​

NameDescriptionUnit
juicefs_sdk_read_size_bytesSize distributions of read requestbyte
juicefs_sdk_written_size_bytesSize distributions of write requestbyte
juicefs_sdk_ops_durations_histogram_secondsLatency distributions of internal SDK operations (one request may issue many)second

Cache​

Metrics​

NameDescriptionUnit
juicefs_blockcache_blocksNumber of cached blocks
juicefs_blockcache_bytesSize of cached blocksbyte
juicefs_blockcache_hitsCount of cached block hits
juicefs_blockcache_missCount of cached block miss
juicefs_blockcache_writesCount of cached block writes
juicefs_blockcache_dropsCount of cached block drops
juicefs_blockcache_evictsCount of cached block evicts
juicefs_blockcache_hit_bytesSize of cached block hitsbyte
juicefs_blockcache_miss_bytesSize of cached block missbyte
juicefs_blockcache_write_bytesSize of cached block writesbyte
juicefs_blockcache_read_hist_secondsLatency distributions of read cached blocksecond
juicefs_blockcache_write_hist_secondsLatency distributions of write cached blocksecond
juicefs_staging_blocksNumber of blocks in the staging path
juicefs_staging_block_bytesTotal bytes of blocks in the staging pathbyte
juicefs_staging_block_delay_secondsTotal seconds of delay for staging blockssecond
juicefs_staging_block_errorsCount of errors when staging blocks
juicefs_staging_write_bytesTotal bytes written to the staging pathbyte
juicefs_staging_writing_blocksNumber of blocks being written to the staging path

Object storage​

Labels​

NameDescription
methodMethod to request object storage (e.g. GET, PUT, HEAD, DELETE)
storage_classStorage class of the requested objects, when configured

Metrics​

NameDescriptionUnit
juicefs_object_request_durations_histogram_secondsObject storage request latency distributionssecond
juicefs_object_request_errorsCount of failed requests to object storage
juicefs_object_request_data_bytesSize of requests to object storagebyte
juicefs_object_request_uploadingNumber of on-going upload requests

Internal​

Metrics​

NameDescriptionUnit
juicefs_compact_size_histogram_bytesSize distributions of compacted databyte
juicefs_used_read_buffer_size_bytesSize of currently used buffer for readbyte
juicefs_used_buffer_size_bytesSize of currently used buffer for writebyte
juicefs_store_cache_size_bytesSize of in-memory store cachebyte
juicefs_last_successful_backupUnix timestamp of the last successful metadata backup (only exported when --backup-meta is enabled)second
juicefs_last_backup_durationDuration of the last metadata backup (only exported when --backup-meta is enabled)second
juicefs_bgjob_duration_secondsDuration of background cleanup jobs (labels: job, status)second
juicefs_bgjob_deletions_totalTotal number of deletions performed by background jobs (label: job)

Mount configuration​

Metrics​

NameDescriptionUnit
juicefs_subdir_infoIndicates the subdir configuration for the current mount (label: subdir, value is always 1)

The subdir label contains the mounted subdirectory path. An empty string indicates a root mount.

Data synchronization​

Metrics​

NameDescriptionUnit
juicefs_sync_scannedNumber of all objects scanned from the source
juicefs_sync_handledNumber of objects from the source that have been processed
juicefs_sync_pendingNumber of objects waiting to be synchronized
juicefs_sync_copiedNumber of objects that have been synchronized
juicefs_sync_copied_bytesTotal size of data that has been synchronizedbyte
juicefs_sync_skippedNumber of objects that skipped during synchronization
juicefs_sync_skipped_bytesTotal size of data that skipped during synchronizationbyte
juicefs_sync_excludedNumber of objects excluded by rules during synchronization
juicefs_sync_excluded_bytesTotal size of objects excluded by rules during synchronizationbyte
juicefs_sync_extraNumber of extra objects found in the destination
juicefs_sync_extra_bytesTotal size of extra objects found in the destinationbyte
juicefs_sync_failedNumber of objects that failed during synchronization
juicefs_sync_deletedNumber of objects that deleted during synchronization
juicefs_sync_checkedNumber of objects that have been verified by checksum during synchronization
juicefs_sync_checked_bytesTotal size of data that has been verified by checksum during synchronizationbyte
juicefs_sync_listed_prefixNumber of listed prefixes during synchronization