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
The current ns_server code shows the following calculation for the "active resident ratio" and it seems to be hitting the exception
ResidenceCalculator = fun (NonResident, Total) ->
try (Total - NonResident) * 100 / Total
catch error:badarith -> 0
It looks like there is an exception being thrown in Alk's calculation which causes the result to be 0.