Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-7293

Incorrect active resident ratio calculation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Major
    • 2.0.1
    • 2.0
    • ns_server
    • Security Level: Public
    • None
    • 2.0-1967-rel

    Description

      Seeing incorrect active_resident ratio on some nodes in a cluster.

      The web UI shows 0 percent active resident ratio, while ep-engine shows 83 %, which is the correct value.

      • added screenshot from UI.

      Stats from node -
      [root@grape-004 ~]# /opt/couchbase/bin/cbstats localhost:11210 -b default all | grep resident
      ep_num_non_resident: 850006
      ep_tap_backfill_resident: 0.9
      vb_active_num_non_resident: 122506
      vb_active_perc_mem_resident: 83
      vb_pending_num_non_resident: 0
      vb_pending_perc_mem_resident: 0
      vb_replica_num_non_resident: 727500
      vb_replica_perc_mem_resident: 0

      The current ns_server code shows the following calculation for the "active resident ratio" and it seems to be hitting the exception

      In menalus_stats.erl:

      ResidenceCalculator = fun (NonResident, Total) ->
      try (Total - NonResident) * 100 / Total
      catch error:badarith -> 0
      end

      It looks like there is an exception being thrown in Alk's calculation which causes the result to be 0.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ketaki Ketaki Gangal (Inactive)
            ketaki Ketaki Gangal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty