监控项说明
JuiceFS 为每个文件系统提供一个 Prometheus API,本章仅罗列和介绍部分常用监控指标,完整列表请访问控制台,在「监控」页面点击「Prometheus API」,直接查看接口数据。
部分指标由于子项众多,并未完整列出,比如 juicefs_fuse_ops_lookup
、juicefs_fuse_ops_open
就统一收录在 juicefs_fuse_ops_<name>
。
另外,本章介绍的指标全部冠以 juicefs_
前缀,在私有部署的 Grafana 中并没有这个统一前缀,比如:
juicefs_trash_size
叫作jfs_stat_trash_size
juicefs_operationDuration
叫作mount_operationDuration
因此,如果你关心的指标没搜到,试试掐头去尾重新搜索其中的部分关键字。
文件系统
标签
名称 | 说明 |
---|---|
name | 文件系统名 |
指标
名称 | 说明 | 单位 |
---|---|---|
juicefs_size | 文件系统大小 | 字节 |
juicefs_inodes | inodes 数量 | |
juicefs_trash_size | 回收站文件大小 | 字节 |
juicefs_trash_files | 回收站文件数量 |
客户端
标签
名称 | 说明 |
---|---|
name | 文件系统名 |
host | 客户端所在主机名 |
ip | 客户端所在主机 IP 地址 |
mountpoint | 挂载点路径 |
指标
操作系统
名称 | 说明 | 单位 |
---|---|---|
juicefs_uptime | 运行时长 | 秒 |
juicefs_cpuusage | 累计 CPU 使用时间 | 微秒 |
juicefs_memusage | 当前占用 RSS 内存量 | 字节 |
juicefs_heapSys | Go 申请的内存总量,同 Sys | 字节 |
juicefs_heapInuse | 同 HeapInuse | 字节 |
juicefs_handles | 客户端持有文件句柄数 | |
juicefs_threads | 客户端 Go 线程数量,详见 ThreadCreateProfile | |
juicefs_goroutines | 客户端 Go 协程数量 | |
juicefs_gcPause | 同 PauseTotalNs | 纳秒 |
元数据服务
名称 | 说明 | 单位 |
---|---|---|
juicefs_metaDuration | 元数据服务请求延迟 | 微秒 |
juicefs_metaRequest | 元数据服务请求数 | |
juicefs_meta | meta 前缀的指标汇总,不单独参考 | |
juicefs_meta_operations | 元数据操作量 | |
juicefs_meta_bytes_sent | 元数据服务请求发送流量 | 字节 |
juicefs_meta_bytes_received | 元数据服务请求接受流量 | 字节 |
juicefs_meta_packets_sent | 元数据服务请求包发送流量 | |
juicefs_meta_packets_received | 元数据服务请求包接受流量 | |
juicefs_meta_reconnects | 元数据服务重连次数 | |
juicefs_meta_usec_ping | 元数据服务 ping 延迟 | 微秒 |
juicefs_meta_dircache | 客户端内存元数据缓存的操作总量 | |
juicefs_meta_dircache_<name> | 客户端内存元数据缓存的各种操作 | |
juicefs_meta_dircache0_dirs | 客户端内存元数据缓存的目录数量 | |
juicefs_meta_dircache0_inodes | 客户端内存元数据缓存的 inodes 数量 |
文件操作
名称 | 说明 | 单位 |
---|---|---|
juicefs_read_bytes | 读取总量,与 juicefs_get_bytes 不同,这是文件操作层级的统计 | 字节 |
juicefs_write_bytes | 写入总量,与 juicefs_put_bytes 不同,这是文件操作层级的统计 | 字节 |
juicefs_operations | 文件操作总量 | |
juicefs_operationDuration | 文件操作延迟 | |
juicefs_fuse_ops | 文件操作总量(分类再汇总统计,与 juicefs_operations 有少量差别) | |
juicefs_fuse_ops_<name> | 单个文件操作的计数,例如 getattr 、lookup 、open | |
juicefs_openfiles | 打开的文件数 | |
juicefs_bgjobs | 正在运行的后台任务数 | |
juicefs_bgjobs_compact | 正在运行的后台任务中,碎片合并任务数 | |
juicefs_bgjobs_delete | 正在运行的后台任务中,回收站文件删除任务数 | |
juicefs_compacts | 累计碎片合并次数 | |
juicefs_compact_bytes | 累计碎片合并上传流量 | 字节 |
缓冲区
名称 | 说明 | 单位 |
---|---|---|
juicefs_totalBufferUsed | 读写缓冲区已使用大小 | 字节 |
juicefs_readBufferUsed | 读缓冲区已使用大小 | 字节 |
本地缓存
名称 | 说明 | 单位 |
---|---|---|
juicefs_blockcache_blocks | 缓存块的总个数 | |
juicefs_blockcache_bytes | 缓存块的总大小 | 字节 |
juicefs_blockcache_hits | 命中缓存块的总次数 | |
juicefs_blockcache_hitBytes | 命中缓存块的总大小 | 字节 |
juicefs_blockcache_miss | 没有命中缓存块的总次数 | |
juicefs_blockcache_missBytes | 没有命中缓存块的总大小 | 字节 |
juicefs_blockcache_evict | 淘汰缓存块的总次数 | |
juicefs_blockcache_evictBytes | 淘汰缓存块的总大小 | 字节 |
juicefs_blockcache_evictDur | 淘汰缓存块的时间 | 微秒 |
juicefs_blockcache_readDuration | 读缓存块的延迟 | 微秒 |
juicefs_blockcache_write | 写缓存块的总次数 | |
juicefs_blockcache_writeBytes | 写缓存块的总大小 | 字节 |
juicefs_blockcache_writeDuration | 写缓存块的延迟 | 微秒 |
juicefs_symlink_cache | 软链缓存指标汇总,一般不单独参考 | |
juicefs_symlink_cache_<name> | 各种具体的软链缓存操作指标 |
分布式缓存
在缓存组中,读数据和写数据都会存在「发送方」和「接收方」的对应指标,下方也称作「服务端」、「客户端」。需要注意,这里的「服务端」指的是缓存组架构中,负责提供缓存服务的那一方,「客户端」指代读取数据的一方。在一个缓存组中,服务端和客户端可能是同一批 JuiceFS 客户端,但如果将缓存组单独部署成「独立缓存集群」,这时候客户端不对外共享自身的缓存数据,那么服务端和客户端就时分离的两批 JuiceFS 客户端。
比方说通过缓存组读取文件时,成员节点既会从其他成员接收数据,也会把自身的缓存数据共享、发送给其他成员。
分布式缓存监控指标中存在着两组互相对照的指标,分别对应不同的应用场景:
remotecache_get
和remotecache_send
:客户端的读、服务端的发送remotecache_put
和remotecache_receive
:客户端往分布式缓存写数据、服务端收到的写数据。对于分布式缓存组而言,缓存写请求来自于开启--fill-group-cache
选项时,客户端的写请求贡献,或者分布式缓存发生节点间数据均衡
可想而知,正常情况下,如果对所有缓存组成员(同样包含 --no-sharing
节点)的监控指标进行求和,那么 remotecache_sendBytes
的大小应该与 remotecache_getBytes
大致相等。如果发现 remotecache_sendBytes
远大于 remotecache_getBytes
,则代表收发存在异常,这时需要关注 remotecache_errors
指标,并且关注客户端日志,定位异常的来源。
名称 | 说明 | 单位 |
---|---|---|
juicefs_remotecache_errors | 缓存组客户端所有请求的失败数 | |
juicefs_remotecache_get | 缓存组客户端读数据的请求数 | |
juicefs_remotecache_getBytes | 缓存组客户端读请求的数据大小 | 字节 |
juicefs_remotecache_getDuration | 缓存组客户端读请求延迟 | 微秒 |
juicefs_remotecache_send | 缓存组服务端发送数据的请求数 | |
juicefs_remotecache_sendBytes | 缓存组服务端发送数据的大小 | 字节 |
juicefs_remotecache_sendDuration | 缓存组服务端发送数据的延迟,该延迟包含读取本地缓存的延迟(juicefs_blockcache_readDuration )。如果本地缓存没有命中,那么也包含对象存储的请求时间(juicefs_objectDuration_get ),如果对象存储响应慢或者存在限速,都会导致该指标增大 | 微秒 |
juicefs_remotecache_put | 缓存组客户端写数据的请求数 | |
juicefs_remotecache_putBytes | 缓存组客户端写请求的数据大小 | 字节 |
juicefs_remotecache_putDuration | 缓存组客户端写请求延迟 | 微秒 |
juicefs_remotecache_receive | 缓存组服务端接收数据的请求数 | |
juicefs_remotecache_receiveBytes | 缓存组服务端接收数据的大小 | 字节 |
juicefs_remotecache_recvDuration | 缓存组服务端接收数据的延迟 | 微秒 |
对象存储
名称 | 说明 | 单位 |
---|---|---|
juicefs_object | 对象存储总请求数 | |
juicefs_object_get | 对象存储 GetObject 请求数 | |
juicefs_object_put | 对象存储 PutObject 请求数 | |
juicefs_object_delete | 对象存储 DeleteObject 请求数 | |
juicefs_object_copy | 对象存储 CopyObject 请求数 | |
juicefs_object_head | 对象存储 HeadObject 请求数 | |
juicefs_object_list | 对象存储 ListObjects 请求数 | |
juicefs_objectDuration | 对象存储所有请求延迟 | 微秒 |
juicefs_objectDuration_get | 对象存储 GetObject 请求延迟 | 微秒 |
juicefs_objectDuration_getDelay | 对象存储 GetObject 请求的程序内的排队等待时间,包括因为客户端令牌限速或者--max-downloads 过低导致并发拥堵 | 微秒 |
juicefs_objectDuration_put | 对象存储 PutObject 请求延迟 | 微秒 |
juicefs_objectDuration_putDelay | 对象存储 PutObject 请求延迟,包含程序内的排队等待时间,包括因为客户端令牌限速或者--max-uploads 过低导致并发拥堵 | 微秒 |
juicefs_objectDuration_delete | 对象存储 DeleteObject 请求延迟 | 微秒 |
juicefs_object_error | 对象存储请求失败数 | |
juicefs_get_bytes | 对象存储读取总量 | 字节 |
juicefs_put_bytes | 对象存储写入总量 | 字节 |