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

Jacob S. Barrett commented on GEODE-6446:
-----------------------------------------

While use of {{AtomicLong}} improved set/get operations on gauges and get 
operations on counters it drastically decreases increment operations on gauges. 
Since gauges can be used to both set a value or increment we would need to find 
a structure that supports both better than a {{LongAdder}} and locking as 
implemented in {{StripedStatisticsImpl}}. Perhaps defining that the combine use 
of set and increment is not supported, such that if set is used the internal 
storage changes to an {{AtomicLong}}. More work needs to be done here to 
justify any change. I am going to close for now.

> Optimize gauge type stats
> -------------------------
>
>                 Key: GEODE-6446
>                 URL: https://issues.apache.org/jira/browse/GEODE-6446
>             Project: Geode
>          Issue Type: Improvement
>          Components: statistics
>            Reporter: Jacob S. Barrett
>            Assignee: Jacob S. Barrett
>            Priority: Major
>         Attachments: Screen Shot 2019-02-23 at 6.43.39 AM.png
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The new {{StripedStatisticsImpl}} uses {{LongAdder}} and {{DoubleAdder}}, 
> which are not optimized for setting specific values like one would with a 
> gauge type statistic. As such, {{StripedStatisticsImpl}} has to synchronize 
> set and get operations to avoid races. Consider optimization that uses 
> {{AtomicLong}} or well suited structure.



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

Reply via email to