C.9. Glock 统计
GFS2 保留统计数据以帮助跟踪文件系统中的操作。这可以让您准确捕捉性能问题。
GFS2 保留两个计数器:
dcount
,记录要求的 DLM 操作数。这显示有多少数据已进行平均/方差计算。qcount
,记录要求的syscall
级操作数。通常qcount
会大于等于dcount
。
另外,GFS2 还保留三个平均/方差对。这些平均/方差对是平滑指数预估值,所采用算法是计算网络节点中轮询数的算法。GFS2 中保留的这些平均值和方差对不按照比例计算,而是以纳秒整数值为单位计算。
- srtt/srttvar:非阻塞操作的平滑轮询时间
- srttb/srttvarb:阻塞操作的平滑轮询时间
- irtt/irttvar:请求间隔时间(例如:DLM 请求之间的间隔时间)
A non-blocking request is one which will complete right away, whatever the state of the DLM lock in question. That currently means any requests when (a) the current state of the lock is exclusive (b) the requested state is either null or unlocked or (c) the "try lock" flag is set. A blocking request covers all the other lock requests.
较长时间适用于 IRTT,同时较短的时间适用于 RTT。
在两个
sysfs
文件中保存统计数据:
- The
glstats
file. This file is similar to theglocks
file, except that it contains statistics, with one glock per line. The data is initialized from "per cpu" data for that glock type for which the glock is created (aside from counters, which are zeroed). This file may be very large. - The
lkstats
file. This contains "per cpu" stats for each glock type. It contains one statistic per line, in which each column is a cpu core. There are eight lines per glock type, with types following on from each other.