[ 
https://issues.apache.org/jira/browse/HBASE-20603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16489597#comment-16489597
 ] 

Andrew Purtell edited comment on HBASE-20603 at 5/24/18 7:15 PM:
-----------------------------------------------------------------

bq. Do you think creating a new FastLongHistogram on every metrics snapshot 
(and all of the stuff inside of it) a concern

There is no other way to do it without modifying FLH itself. Sure, I could hack 
that, but then it changes everything, even legacy users of FLH. If you think 
that is fine, then I could do whatever I like with FLH. Some unit tests for FLH 
that expect new bins to inherit state from old bins will have to be removed. 

Note internally at every snapshot in FLH a new Bins object is allocated, which 
is the bulk of allocation for FLH state. 

It's true that this change does in effect a double allocation of Bins for every 
reset. That is a concession to legacy as mentioned above. I'm not sure how much 
of a concern it will be in practice. I doubt the extra object will ever leave 
eden or TLAB, and won't have a measurable impact unless we construct an 
artificial test case that resets a million histograms at once or something like 
that.


was (Author: apurtell):
> Do you think creating a new FastLongHistogram on every metrics snapshot (and 
> all of the stuff inside of it) a concern

There is no other way to do it without modifying FLH itself. Sure, I could hack 
that, but then it changes everything, even legacy users of FLH. If you think 
that is fine, then I could do whatever I like with FLH. Some unit tests for FLH 
that expect new bins to inherit state from old bins will have to be removed. 

Note internally at every snapshot in FLH a new Bins object is allocated, which 
is the bulk of allocation for FLH state. 

It's true that this change does in effect a double allocation of Bins for every 
reset. That is a concession to legacy as mentioned above. I'm not sure how much 
of a concern it will be in practice. I doubt the extra object will ever leave 
eden or TLAB, and won't have a measurable impact unless we construct an 
artificial test case that resets a million histograms at once or something like 
that.

> Histogram metrics should reset min and max
> ------------------------------------------
>
>                 Key: HBASE-20603
>                 URL: https://issues.apache.org/jira/browse/HBASE-20603
>             Project: HBase
>          Issue Type: Bug
>          Components: metrics
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>            Priority: Minor
>         Attachments: HBASE-20603-branch-1-WIP.patch
>
>
> It's weird that the bins are reset at every monitoring interval but min and 
> max are tracked over the lifetime of the process. Makes it impossible to set 
> alarms on max value as they'll never shut off unless the process is 
> restarted. Histogram metrics should reset min and max at snapshot time too.
> For discussion.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to