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

Incorrect active resident ratio calculation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: ns_server
    • Security Level: Public
    • Labels:
      None
    • Environment:
      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.

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

        Activity

        Hide
        alkondratenko Aleksey Kondratenko (Inactive) added a comment -

        I need fuller stats here. Particularly curr-items is missing here

        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - I need fuller stats here. Particularly curr-items is missing here
        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        ketaki please post all the stats if cluster is stillin this state

        Show
        farshid Farshid Ghods (Inactive) added a comment - ketaki please post all the stats if cluster is stillin this state
        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        closing the ticket as Ketaki does not have the cluster anymore

        Show
        farshid Farshid Ghods (Inactive) added a comment - closing the ticket as Ketaki does not have the cluster anymore
        Hide
        ketaki Ketaki Gangal added a comment -

        resolved.

        Show
        ketaki Ketaki Gangal added a comment - resolved.

          People

          • Assignee:
            ketaki Ketaki Gangal
            Reporter:
            ketaki Ketaki Gangal
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes