hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enis Soztutar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7612) [JDK8] Replace use of high-scale-lib counters with intrinsic facilities
Date Mon, 20 Jun 2016 21:27:57 GMT

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

Enis Soztutar commented on HBASE-7612:
--------------------------------------

Now that HBase-2.0 is JDK-8 only, we can revisit this. I've done a basic test, and LongAdder
is faster than our forked Counter implementation from my micro-benchmark: 

threads=1
{code}
Benchmark                                   Mode  Cnt         Score        Error  Units
CountersBenchmark.testIncrementAtomicLong  thrpt  200  92234852.622 ± 162115.932  ops/s
CountersBenchmark.testIncrementCounter     thrpt  200  59320305.701 ± 482597.475  ops/s
CountersBenchmark.testIncrementLongAdder   thrpt  200  74932942.690 ±  87463.568  ops/s
{code}

threads=8
{code}
Benchmark                                   Mode  Cnt          Score         Error  Units
CountersBenchmark.testIncrementAtomicLong  thrpt  200   34087507.496 ±  666013.635  ops/s
CountersBenchmark.testIncrementCounter     thrpt  200  452497965.994 ± 7419222.873  ops/s
CountersBenchmark.testIncrementLongAdder   thrpt  200  564211175.749 ± 2306961.876  ops/s
{code}

threads=max (24)
{code}
# Detecting actual CPU count: 24 detected
Benchmark                                   Mode  Cnt           Score          Error  Units
CountersBenchmark.testIncrementAtomicLong  thrpt  200    35218226.606 ±   998791.734  ops/s
CountersBenchmark.testIncrementCounter     thrpt  200   653494810.370 ± 48383212.204  ops/s
CountersBenchmark.testIncrementLongAdder   thrpt  200  1169425248.335 ±  4128542.456  ops/s
{code}

This is with jdk1.8.0_71 and 24 virtual cores. 

Counter is one of the classes used in histogram metrics, which shows up pretty hot in the
workloadc profiles. cc [~saint.ack@gmail.com], [~eclark]. 



> [JDK8] Replace use of high-scale-lib counters with intrinsic facilities
> -----------------------------------------------------------------------
>
>                 Key: HBASE-7612
>                 URL: https://issues.apache.org/jira/browse/HBASE-7612
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Priority: Trivial
>             Fix For: 2.0.0
>
>
> JEP155 introduces a few new classes (DoubleAccumulator, DoubleAdder, LongAccumulator,
LongAdder) that "internally employ contention-reduction techniques that provide huge throughput
improvements as compared to Atomic variables". There are applications of these where we are
currently using Cliff Click's high-scale-lib and for metrics.
> See http://openjdk.java.net/jeps/155



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message