cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Ruiz (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-12787) Reduce instanceOf() type checking to improve performance
Date Thu, 04 Jan 2018 18:51:03 GMT


Tony Ruiz commented on CASSANDRA-12787:

Hi Jeff,

I work with Shylaja.  The instanceOf patch was submitted and accepted to the OpenJDK back
in mid 2017 with the identifier JDK-8180450.  When Cassandra picks up JDK9, it will pick up
this fix.   

> Reduce instanceOf() type checking to improve performance
> --------------------------------------------------------
>                 Key: CASSANDRA-12787
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>         Environment: The tests and examples stated were run on:
> Intel (R) Xeon (R) CPU E5-2699 v3 @ 2.30GHz, HT Enabled
> Oracle JDK 1.8
> Cassandra 3.10-SNAPSHOT
> Linux kernel 4.7
>            Reporter: shylaja kokoori
>             Fix For: 4.x
>         Attachments: instanceof.png, reduce_instanceof_typechecking.pdf
> While performance profiling Cassandra with cassandra-stress test on a  pure write workload,
we noticed that one of the hot methods for Cassandra server is the compareTo( PartitionPosition
pos) function in org.apache.cassandra.db.DecoratedKey. The actual root cause of the problem
is a slowdown in Java's instanceof operator.
> Our initial performance testing using a hacked JVM shows about 61% increase in throughput
and about 15% reduction in 99 percentile latency. Data shows that improvements are from the
removal of thread contention caused by Instanceof operator.
> Currently, we are working on a JDK fix to solve this issue. In the meantime, we think
it will be beneficial to address this issue at Java application level as well. We are in the
process of creating a patch to Cassandra replacing instanceof check with virtual method calls.
The patch will be available in this thread for review soon. Please let us know your feedback
and comments.
> For more details please refer to the attached pdf.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message