Description
Two different customers are getting the warning "Metadata overhead warning. Over 50% of RAM allocated to bucket..."
The percentage for this warning is determined by an erlang -define macro here:
https://github.com/couchbase/ns_server/blob/master/src/menelaus_web_alerts_srv.erl#L39
In one case, the amount of the warnings coming in are making the use of the web admin UI slow. In the other case, a backup cluster is being configured with fewer resources, so they are aware of this being the case.
My understanding is that the macro will be substituted at beam compile time, and therefore MAX_OVERHEAD_PERC cannot be tuned at runtime. Would it be possible to patch/override the over_threshold function at runtime? That is, could we change or rebind the method at runtime to eliminate this logging and alert?
I'm hoping for something to post to eval, if possible, even if it means doing so every restart. I believe hotloading (based on previous experience) requires modifying the source, recompiling the beam, and hotloading the beam in addition to placing it somewhere it would be picked up in the future on restart. I'd like to avoid the recompile/hotload scenario if possible.
Thanks much.