[ https://issues.apache.org/jira/browse/CASSANDRA-12787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17746187#comment-17746187 ]
Jacek Lewandowski commented on CASSANDRA-12787: ----------------------------------------------- Reopening because [https://bugs.openjdk.org/browse/JDK-8180450] is not going to be fixed sooner than in JDK-22. However, there are more information about the issue and the ways how we can detect this kind of problems in our code: * [https://github.com/RedHatPerf/type-pollution-agent] * [https://redhatperf.github.io/post/type-check-scalability-issue/] * [https://netflixtechblog.com/seeing-through-hardware-counters-a-journey-to-threefold-performance-increase-2721924a2822] btw. With CASSANDRA-17992 we will upgrade Netty to the version which includes a fix for that issue in Netty. > Reduce instanceOf() type checking to improve performance > -------------------------------------------------------- > > Key: CASSANDRA-12787 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12787 > 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 > Priority: Normal > 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 (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org