[Ann] Potential performance regression in 4.5.0 and above

26 views
Skip to first unread message

Olivier Michallat

unread,
May 6, 2020, 2:16:47 PM5/6/20
to DataStax Java Driver for Apache Cassandra User Mailing List
Hi,

We are currently investigating JAVA-2676, a performance issue affecting versions 4.5.0, 4.5.1 and 4.6.0.

It was initially reported by the Akka Persistence library, and more recently on a cassandra-users mailing list thread. It manifests as a noticeable drop in query latencies. From our current findings, it looks like this only happens when executing one query at a time, for example running synchronous queries in a for loop. When the load spreads across multiple threads that call session.execute concurrently, the issue goes away.

What we know so far:
  • this appeared when we upgraded Netty to 4.1.45 in driver 4.5.0.
  • more precisely, we've narrowed it down to this Netty commit, a refactoring of the NIO event loop.
  • the driver's write coalescer also seems to come into play. It's an internal component that batches writes together to avoid too many I/O syscalls (aka flush() in Netty).
We're investigating what changed in the event loop behavior, and how we need to adapt the coalescer. This is our top priority and we're working towards a patch version in the next few days.

In the meantime, if you think you're affected, you can downgrade Netty manually as a workaround:

<dependency>
  <groupId>com.datastax.oss</groupId>
  <artifactId>java-driver-core</artifactId>
  <version>4.6.0</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-handler</artifactId>
    <version>4.1.43.Final</version>
</dependency>

--
The Java driver team
Reply all
Reply to author
Forward
0 new messages