Skip to content

Commit 7ad6076

Browse files
authored
Merge pull request ceph#57628 from joscollin/wip-B66173-doc-per-client-metrics
doc: document metrics exported by CephFS Reviewed-by: Zac Dover <[email protected]>
2 parents 423a086 + f8f4785 commit 7ad6076

File tree

2 files changed

+133
-0
lines changed

2 files changed

+133
-0
lines changed

doc/cephfs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ Developer Guides
193193
Client's Capabilities <capabilities>
194194
Java and Python bindings <api/index>
195195
Mantle <mantle>
196+
Metrics <metrics>
196197

197198

198199
.. raw:: html

doc/cephfs/metrics.rst

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
.. _cephfs_metrics:
2+
3+
Metrics
4+
=======
5+
6+
CephFS uses :ref:`Perf Counters` to track metrics. The counters can be labeled (:ref:`Labeled Perf Counters`).
7+
8+
Client Metrics
9+
--------------
10+
11+
CephFS exports client metrics as :ref:`Labeled Perf Counters`, which could be used to monitor the client performance. CephFS exports the below client metrics.
12+
13+
.. list-table:: Client Metrics
14+
:widths: 25 25 75
15+
:header-rows: 1
16+
17+
* - Name
18+
- Type
19+
- Description
20+
* - num_clients
21+
- Gauge
22+
- Number of client sessions
23+
* - cap_hits
24+
- Gauge
25+
- Percentage of file capability hits over total number of caps
26+
* - cap_miss
27+
- Gauge
28+
- Percentage of file capability misses over total number of caps
29+
* - avg_read_latency
30+
- Gauge
31+
- Mean value of the read latencies
32+
* - avg_write_latency
33+
- Gauge
34+
- Mean value of the write latencies
35+
* - avg_metadata_latency
36+
- Gauge
37+
- Mean value of the metadata latencies
38+
* - dentry_lease_hits
39+
- Gauge
40+
- Percentage of dentry lease hits handed out over the total dentry lease requests
41+
* - dentry_lease_miss
42+
- Gauge
43+
- Percentage of dentry lease misses handed out over the total dentry lease requests
44+
* - opened_files
45+
- Gauge
46+
- Number of opened files
47+
* - opened_inodes
48+
- Gauge
49+
- Number of opened inodes
50+
* - pinned_icaps
51+
- Gauge
52+
- Number of pinned Inode Caps
53+
* - total_inodes
54+
- Gauge
55+
- Total number of Inodes
56+
* - total_read_ops
57+
- Gauge
58+
- Total number of read operations generated by all process
59+
* - total_read_size
60+
- Gauge
61+
- Number of bytes read in input/output operations generated by all process
62+
* - total_write_ops
63+
- Gauge
64+
- Total number of write operations generated by all process
65+
* - total_write_size
66+
- Gauge
67+
- Number of bytes written in input/output operations generated by all processes
68+
69+
Getting Metrics
70+
===============
71+
72+
The metrics could be scraped from the MDS admin socket as well as using the tell interface. The ``mds_client_metrics-<fsname>`` section in the output of ``counter dump`` command displays the metrics for each client as shown below::
73+
74+
"mds_client_metrics": [
75+
{
76+
"labels": {
77+
"fs_name": "<fsname>",
78+
"id": "14213"
79+
},
80+
"counters": {
81+
"num_clients": 2
82+
}
83+
}
84+
],
85+
"mds_client_metrics-<fsname>": [
86+
{
87+
"labels": {
88+
"client": "client.0",
89+
"rank": "0"
90+
},
91+
"counters": {
92+
"cap_hits": 5149,
93+
"cap_miss": 1,
94+
"avg_read_latency": 0.000000000,
95+
"avg_write_latency": 0.000000000,
96+
"avg_metadata_latency": 0.000000000,
97+
"dentry_lease_hits": 0,
98+
"dentry_lease_miss": 0,
99+
"opened_files": 1,
100+
"opened_inodes": 2,
101+
"pinned_icaps": 2,
102+
"total_inodes": 2,
103+
"total_read_ops": 0,
104+
"total_read_size": 0,
105+
"total_write_ops": 4836,
106+
"total_write_size": 633864192
107+
}
108+
},
109+
{
110+
"labels": {
111+
"client": "client.1",
112+
"rank": "0"
113+
},
114+
"counters": {
115+
"cap_hits": 3375,
116+
"cap_miss": 8,
117+
"avg_read_latency": 0.000000000,
118+
"avg_write_latency": 0.000000000,
119+
"avg_metadata_latency": 0.000000000,
120+
"dentry_lease_hits": 0,
121+
"dentry_lease_miss": 0,
122+
"opened_files": 1,
123+
"opened_inodes": 2,
124+
"pinned_icaps": 2,
125+
"total_inodes": 2,
126+
"total_read_ops": 0,
127+
"total_read_size": 0,
128+
"total_write_ops": 3169,
129+
"total_write_size": 415367168
130+
}
131+
}
132+
]

0 commit comments

Comments
 (0)