[MB-6628] Seeing incorrect cache-miss-ratio ( very large ranging upto 500) during bidirectional XDCR. Created: 12/Sep/12  Updated: 10/Jan/13  Resolved: 19/Sep/12

Status: Closed
Project: Couchbase Server
Component/s: couchbase-bucket, cross-datacenter-replication
Affects Version/s: 2.0-beta-2
Fix Version/s: 2.0-beta-2
Security Level: Public

Type: Bug Priority: Critical
Reporter: Ketaki Gangal Assignee: Mike Wiederhold
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: 2.0-1717
1024 vbuckets

Load 1M and 1M items on 2 clusters.
Setup a 2:2 bidirectional replication.
Start mutations on the cluster1 and cluster2.

Noticing a very large cache-miss-ratio on one of the clusters. = (ep_bg_fetch/ cmd_get)

Here ep_bg_fetch contains bg_fetches from xdcr also and is much larger. This needs to be correctly reflected on the stats.

ketaki@ubu-1512:~$ /opt/couchbase/bin/cbstats all | egrep "cmd_get|ep_bg|get_meta"
 cmd_get: 14816
 ep_bg_fetch_delay: 0
 ep_bg_fetched: 371532
 ep_bg_load: 76857782
 ep_bg_load_avg: 206
 ep_bg_max_load: 238681
 ep_bg_max_wait: 202492
 ep_bg_min_load: 0
 ep_bg_min_wait: 0
 ep_bg_num_samples: 371532
 ep_bg_remaining_jobs: 0
 ep_bg_wait: 108839514
 ep_bg_wait_avg: 292
 ep_num_ops_get_meta: 1575784
ketaki@ubu-1512:~$ /opt/couchbase/bin/cbstats all | egrep "cmd_get|ep_bg|get_meta"
 cmd_get: 14892
 ep_bg_fetch_delay: 0
 ep_bg_fetched: 371592
 ep_bg_load: 76875865
 ep_bg_load_avg: 206
 ep_bg_max_load: 238681
 ep_bg_max_wait: 202492
 ep_bg_min_load: 0
 ep_bg_min_wait: 0
 ep_bg_num_samples: 371592
 ep_bg_remaining_jobs: 0
 ep_bg_wait: 108853566
 ep_bg_wait_avg: 292
 ep_num_ops_get_meta: 1576593

Please let me know if you need additional information.

Comment by Chiyoung Seo [ 12/Sep/12 ]

This is a bug in ep-engine. We should not increment "ep_bg_fetched" for GET_META background fetches. We may need to add a separate stat for GET_META bg fetches.
Comment by Chiyoung Seo [ 19/Sep/12 ]
Comment by Thuan Nguyen [ 20/Sep/12 ]
Integrated in github-ep-engine-2-0 #432 (See [http://qa.hq.northscale.net/job/github-ep-engine-2-0/432/])
    MB-6628: Seperate meta data bg fetch stats from bg fetch stats. (Revision f0352955cd4f2b60352d1ba6bac0d44446b8882f)

     Result = SUCCESS
Mike Wiederhold :
Files :
* tests/ep_testsuite.cc
* src/ep.cc
* src/ep_engine.cc
* src/stats.hh
* docs/stats.org
Generated at Fri Oct 24 13:12:06 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.