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

ASF subversion and git services commented on GEODE-6424:
--------------------------------------------------------

Commit b7e90539f978b8def9fe1a872dfda4a2683862ab in geode's branch 
refs/heads/release/1.9.0 from Jacob Barrett
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=b7e9053 ]

GEODE-6424: Greatly improves statistic counter storage throughput. (#3204)

Reduces thread contention by using LongAdder and DoubleAdder to store
counters. Benchmarking (on specific hardware) showed
Atomic50StatisticsImpl could perform about 41M increments/second
regardless of the number of threads updating the counter. Poor use of
volatile memory access and CAS operations created unnecessary
contention. The replacement, StripedStatisticsImpl, uses LongAdder and
DoubleAdder to reduce contention. The same benchmark showed the
throughput in increments/second scale nearly linearly up to the
physical hardware threads of the host, seeing values as high as 2.8B
increments/second on a 36 thread host.

LocalStatisticsImpl benchmarks even worse that Atomic50StatisticsImpl.
It is tightly integrated with OS stats.

(cherry picked from commit 888d2b2c62c48c5da92451ee7cd631541c0bcc8f)


> Reduce overhead of stats storage
> --------------------------------
>
>                 Key: GEODE-6424
>                 URL: https://issues.apache.org/jira/browse/GEODE-6424
>             Project: Geode
>          Issue Type: Improvement
>          Components: statistics
>            Reporter: Jacob S. Barrett
>            Priority: Major
>             Fix For: 1.10.0
>
>         Attachments: 32-thread.png, image.png
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> The current stats storage system is based on a very old and complicated 
> implementation of a thread striped counter. See {{Atomic50StatisticsImpl}}. 
> This implementation makes now incorrect assumptions about certain performance 
> characteristics of volatile memory access. Combined with it's complexity it 
> is causing large variances in performance numbers on the function benchmarks. 
> Runs can differ by as much as 45%.
> Replace this implementation with one based on the Java 8 {{LongAdder}}, which 
> is a modern and JDK maintained implementation of a striped counter. Also use 
> {{DoubleAdder}} to support doubles, which the {{Atomic50StatisticsImpl}} does 
> not support.



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

Reply via email to