Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.6.0, 7.2.0, 7.2.1, 7.2.4, 7.2.3, 7.2.5
-
Untriaged
-
0
-
Unknown
Description
kv_ep_cache_miss_ratio is a metric derived by ns_server and used for the UI Dashboard.
It is calculated as:
get_metric(<<"kv_ep_cache_miss_ratio">>) ->
|
percent(_(<<"kv_ep_bg_fetched">>),
|
?cut(promQL:sum_without([<<"op">>, <<"result">>],
|
_({[{eq, <<"name">>, <<"kv_ops">>},
|
{eq, <<"op">>, <<"get">>}]}))), 0);
|
100 * kv_ep_bg_fetched / kv_ops{op="get"}
|
kv_ep_bg_fetched is the number of performed BGFetches. kv_ops{op="get"} is the number of "get" operations, which includes GET/GAT/Subdoc Lookup. KV can perform BGFetches for non-get operations. For example, sets can require a BGFetch, if XATTRs are used or if replacement is not allowed.
I'm not sure what the "cache miss rate" should represent, but I don't think having a value larger than 100% makes sense (there are more cache misses than requests).
If the intention of the metric is to be specifically looking at get/access operations, it can be replaced with get misses / (miss+hit).
100 * kv_ops{op="get", result="miss"} / sum without (result) (kv_ops{op="get"})
|