Help To Understand Hit_Ratio In Bucket Stats

Hi Team,

We encountered a statistic known as “hit_ratio” while retrieving data related to buckets. Despite our efforts to find more information in the Couchbase documentation, we were unable to locate any additional details.

If “hit_ratio” indicates the number of items retrieved from Couchbase memory, it suggests that both the “hit_ratio” and “ep_cache_miss_rate” cannot be 100 percent at the same time. However, during our read-only test (where we created a scenario in which all reads came from disk) conducted over a one-hour period using cbc-pillowfight, we observed a situation where both metrics reported 100 percent for the entire hour.

Could you please help us to understand on the metric hit_ratio?

Thanks,
Debasis

Please show the command used, the bucket definition and the results so that someone can reproduce.

@mreiche We are using below url to check bucket stats and we are taking about the highlighted metrics.

http://xx.xx.xx.xx:8091/pools/default/buckets/config/stats

Please help us to understand above two metrics.

Thanks,
Debasis

Please show the command used, the bucket definition and the results so that someone can reproduce.

@mreiche Sorry for the late reply. Please find the bucket definition attached .
To get the stats we used below url in browser after providing admin credentials.
http://xx.xx.xx.xx:8091/pools/default/buckets/config/stats

Please find the updated screenshot where we found hit_ratio and ep_cache_miss_rate both are showing as 100 percent. As requested before please help us to understand both metrices.

config_bucket.zip (2.1 KB)

Thanks,
Debasis

ep_cache_miss_rate is described incorrectly.

It should be “The ratio between the number of read operations which failed due to the key not being present, and all read operations (kv_ops{op=‘get’, result=‘miss’} / kv_ops{op=‘get’})”

Thanks, @mreiche. When you say “not being present,” I assume you meant “not being present in memory” — and not “not being present in the bucket,” since the latter would result in a get_miss, right?

If you did mean “not in memory,” then can it really be 100% if the hit ratio is 100%? That seems contradictory, which brings us back to the original point of this thread. Did I miss anything?

That’s from a comment in the code. I understand it to mean “not present at all”. If you want more information, I suggest opening a support ticket.