1

I am using couchbase 1.8.1. This is the output cbstats command

ubuntu@ip-10-128-117-9:~$ /MEMBASEDATA/opt/couchbase/bin/cbstats localhost:11210 all | egrep "hit|miss"
 cas_hits:                       0
 cas_misses:                     0
 decr_hits:                      0
 decr_misses:                    0
 delete_hits:                    76
 delete_misses:                  78
 get_hits:                       636552
 get_misses:                     1450283
 incr_hits:                      0
 incr_misses:                    0

it is showing very high number of misses. but when I check in web console, miss ratio is almost 0. web console showing 0 miss ratio Does it mean there is something wrong? If yes, is there any way to know what keys are being missed, so that I can investigate my code.

hridayesh
  • 1,123
  • 1
  • 14
  • 36
  • One thing you can so to test this is to telnet into your cluster and do a get on a key you know doesn't exist and then do a get on a key that does exist and watch the stats to see if they change appropriately. Also, it is possible that at some point in time you tried to get keys that did not exist, but right now you are only hitting existing keys. Can you also post which version of Couchbase you are using? – mikewied Dec 06 '12 at 08:40
  • Thanks for suggestions. I have edited to specify that I am using 1.8.1 version. I have tried your suggestion and it looks like stats from cbstats command(first one) are correct. Graph is showing % of reads from disk. for non existent keys it does not his the disk. Misses continue to grow in similar way. So can something be done on couchbase server to know request for which keys are non existent? – hridayesh Dec 07 '12 at 10:30
  • There isn't a way at the moment to be able to get a list of keys that are non-resident. Nor is their a way to find out if a single key is resident or not. What is the use case that requires this feature? – mikewied Dec 07 '12 at 19:56
  • Sorry for my bad english. Actually I wanted to find those non-existent keys which are being requested by some client. Its like client never set a key and calling get on it. I could not find a way to log those on server, but was able to log them on client, so this solved my problem. Earlier I worried if the some other libraries I am using might be making get request for non-existent keys. By making different buckets for library, I was able to figure out that my code was making such request. Thank you for your suggestions. – hridayesh Dec 09 '12 at 04:13

1 Answers1

1

get_misses actually refers to the number of times a requested document was not found, and in fact not the number of cache misses. That stat is given by ep_bg_fetched.

http://docs.couchbase.com/admin/admin/Concepts/bp-maintenance.html

shivknight
  • 96
  • 1
  • 1
  • 5